# Electrostatics - finding the total charge of a sphere with varying charge density

by iejedijuerijr
Tags: charge, density, electrostatics, sphere, varying
 P: 207 I believe your approach is correct. Just remember that when integrating from 0 to R in spherical coordinates your must remember to use the factors associated with this change of variable. That is, I think you will want to integrate: Q = $\int^{2\pi}_{0}$ $\int^{\pi}_{0}$ $\int^{R}_{0}$ $\delta$(r) r$^{2}$ sin$\theta$ dr d$\theta$ d$\phi$ where Q is the total charge enclosed by the sphere and R is the radius of the sphere.