A nonconducting spherical shell, with an inner radius of 4 cm and an outer radius of 6 cm, has charge spread non uniformly through its volume between its inner and outer surfaces. The volume charge density ρ is the charge per unit volume, with the unit coulomb per cubic meter. For this shell ρ = b/r where r is the distance in meters from the center of the shell and b = 3 μ C/m2. What is the net charge in the shell?
In other words a infinitesimal segment dV caries the charge dQ = ρ dV
Let dV be a spherical shell between between r and (r + dr): dV = (4π/3)·( (r + dr)² - r³ ) = (4π/3)·( r³ + 3·r²·dr + 3·r·(dr)² + /dr)³ - r³ ) = (4π/3)·( 3·r²·dr + 3·r·(dr)² + /dr)³ ) drop higher order terms = 4·π·r²·dr
To get total charge integrate over the whole volume of your object, i.e. from ri to ra: Q = ∫ dQ = ∫ ρ dV = ∫ri→ra { (b/r)·4·π·r² } dr = ∫ri→ra { 4·π·b·r } dr = 2·π·b·( ra² - ri² )