# Expression for volume charge density of a sphere

## Homework Statement

I'm having a bit of trouble with this problem:

"A spherical ball of charge has radius R and total charge Q. The electric field strength inside the ball (r≤R) is E(r)=r^4Emax/R^4.
a. What is Emax in terms of Q and R?
b. Find an expression for the volume charge density ρ(r) inside the ball as a function of r."

Φ=EA
Φ=Q/ε0
Q=ρV

E(r)=r^4Emax/R^4

## The Attempt at a Solution

I found the answer for part (a.) with no trouble:

Emax=Q/(4πR^2ε0)

However, part (b) has proved to be a lot harder. Here is my attempt:

Since φ=EA and φ=Q/ε0,, I chose to use the original equation for electric field (since I have a correct answer for Emax), multiply it by the surface area of a smaller sphere with radius "r" (inside the original sphere with radius R), and set this equal to Q/ε0 as follows:

Q/ε0=(4πr^2)(r^4Emax/R^4)

Then, I determined the charge of the small sphere with radius "r" (inside the original sphere with radius R) as follows:
ρ=charge density
Q=ρV

Find charge of small sphere (inside the original sphere with radius R):

dQ=ρ4πr^2dr
Q=∫ρ4πr^2dr (with the limits of the integral being 0 to r)
Q=(4/3)πr^3ρ

Then I used the equation I found earlier:

Q/ε0=(4πr^2)(r^4Emax/R^4)

Then I input the values for Emax and Q, and I get the formula for charge density:

(4/3)πr^3ρ/ε0=r^4(Q/4πR^2ε0)/R^4

ρ(r)=3r^3Q/4πR^6

I tried entering the value to see if it is correct and the program tells me that I am missing or failing to add a numerical value. I've tried going through it and I can't seem to find the error. If one of you all can help me out I'd be grateful.

vela
Staff Emeritus
Homework Helper
Then, I determined the charge of the small sphere with radius "r" (inside the original sphere with radius R) as follows:
ρ=charge density
Q=ρV

Find charge of small sphere (inside the original sphere with radius R):

dQ=ρ4πr^2dr
Q=∫ρ4πr^2dr (with the limits of the integral being 0 to r)
Q=(4/3)πr^3ρ

This calculation relies on the charge density ##\rho## being constant, but that's not the case here. It's a function of ##r##.

Try applying Gauss's law to a spherical volume where the inner radius is ##r## and the outer radius is ##r+dr##. Because ##dr## is small, the charge density inside this infinitesimal volume ##dV## will essentially be constant, so you can say ##dQ = \rho\,dV##.

Ok, so since:

dQ=ρdV

and V=(4/3)πr^3

then, dQ=ρ4πr^2

I'm drawing a blank on what I should do from here. I can't plug the value (ρ4πr^2) into the equation Q/ε0, (I tried, it's wrong), so I'm missing a step.

vela
Staff Emeritus
Homework Helper
Ok, so since:

dQ=ρdV

and V=(4/3)πr^3

then, dQ=ρ4πr^2
That should be ##dQ = \rho 4\pi r^2\,dr##.

I'm drawing a blank on what I should do from here. I can't plug the value (ρ4πr^2) into the equation Q/ε0, (I tried, it's wrong), so I'm missing a step.
What's the flux through the inner surface and the outer surface of the volume?

The flux should be the charge inside the small sphere (radius r) sphere divided by ε0, or the electric field inside the small sphere multiplied by the surface area of the sphere. The flux through the inner surface and the outer surface should be the same, since dr is really small (I think?).

I thought that the charge inside the small sphere would be found by integrating dQ=ρ4πr^2dr with the limits 0 and r, and that would produce Q=ρ(4/3)πr^3, but this is incorrect, because that takes me back where I started.

vela
Staff Emeritus
Homework Helper
The flux through the inner surface and the outer surface should be the same, since dr is really small.
Your mistake is here. The flux through the two surfaces isn't the same. There's an infinitesimal difference because of the infinitesimal amount of charge inside the volume. Gauss's law gives you ##\Phi(r+dr)-\Phi(r) = dQ/\epsilon_0##. You have the expression for ##dQ## to plug in on the right hand side. You just need to write the lefthand side in terms of ##E##, ##r##, and ##dr##.

Ok, that makes sense to me. So,

Φ=EA, so

Φ(r+dr)=E4π(r+dr)^2, and φ(r)=E4πr^2

This would give
(E4π(r+dr)^2) - (E4πr^2)=dQ/ε0

dQ=ρ4πr^2dr, so I can input that into the equation:

(E4π(r+dr)^2) - (E4πr^2)=(ρ4πr^2dr)/ε0

Does this seem correct so far? I feel like I'm still missing something important.

vela
Staff Emeritus
Homework Helper
Yes, but remember ##E## also depends on ##r##, so the first term should be ##E(r+dr)4\pi(r+dr)^2##.

Right.

So, taking the equation I had for Emax and combining it with the given equation for E(r), I get:

E=r^4Q/4πR^6ε0

Using the equation:

[E(r+dr)]4π(r+dr)^2 - [E(r)]4πr^2)=ρ4πr^2dr/ε0

Then imputing the formula for E, I get:

(r+dr)^4Q4π(r+dr)^2/4πε0R^6-4πr^4r^2Q/4πR^6ε0=ρ4πr^2dr/ε0

Which, simplified, should be:

ρ(r)=[(r+dr)^6Q-r^6Q)/R^6]/4πr^2dr

How does this look?

vela
Staff Emeritus
Homework Helper
ρ(r)=[(r+dr)^6Q-r^6Q)/R^6]/4πr^2dr

How does this look?
The last thing you want to do is recognize that
$$\frac{(r+dr)^6-r^6}{dr}$$ is a sloppy way of writing
$$\lim_{h \to 0} \frac{(r+h)^6-r^6}{h}$$ which you hopefully recognize from first-semester calculus.

Right, that's the way to get a derivative, so if I had a numerical value for "r" I could plug it in and then evaluate the limit as "h" approaches zero to get the slope of the tangent line.

vela
Staff Emeritus
Homework Helper
No need for a numerical value for ##r##. What function is that the derivative of?

ρ(r)

Wait...ρ(r) isn't right. I'm not sure.

It's the derivative of φ

vela
Staff Emeritus