# Gauss Law and Flux for variable charge density in a sphere

1. Jan 14, 2012

### engineer_ja

Gauss Law and Flux for variable charge density in a sphere

1. The problem statement, all variables and given/known data

The charge density within a sphere varies as a constant, a, times its radius, r. Find an expression for the direction and magnitude of the electric flux, D, within the sphere

2. Relevant equations

Gauss' Law
sphere volume = $\frac{4}{3}$ $\pi$ r$^{3}$

3. The attempt at a solution

I have some difficulty understanding the question, but this is what I think I should do:

Charge Density = ar

Charge in volume moving from r to r+δr , δQ, is: ar x volume
=(4/3) $\pi$ ar [(r+δr)^3 - r^3)]
=(4/3) $\pi$ ar (3 r^2 δr) (ignoring double differentials as negligible)
=4 $\pi$ a r^3 δr

integrating from 0 to r(an arbitrary distance from centre) gives charge within that volume, Q:
Q = $\pi$ a r^4

Gauss Law says flux through an area is equal to charge enclosed so;
Magnitude of the flux ,D, = Q = $\pi$ a r^4
Direction is radially outward (assuming charge is positive). (not sure on how to argue this...)

Notes: I have no idea if this is correct, or if I'm completely of the plot!! any help greatly appreciated.
I thought D was the flux density, though the question calls it flux, so do I need to divide by area?

Thanks Everyone!...