Equations for the Electron Density of the Two-Dimensional Electron Gas in Realistic AlGaN/GaN Heterostructures