# Find the electric field at an arbitrary point

## Homework Statement

A distribution of charge with spherical symmetry has volumetric density given by: $$\rho(r) = \rho_0 e^{ \frac {-r} {a} }, \left( 0 \leq r < \infty \right);$$
where ##\rho_0## and ##a## is constant.

a) Find the total charge
b) Find ##\vec E## in an arbitrary point

## Homework Equations

I've already found the answer of a): ## Q_t = 8\pi a^3 \rho_0##

## The Attempt at a Solution

To solve b), I've used the Gauss law (spherical symmetry) and that's what I've found $$\vec E = \frac {4\pi a^3 \rho_0} {r^2} \vec r .$$
This answer seems to me very acceptable, but I've looked at the solutionary and there's another result pretty much complicated. What do you think?

vela
Staff Emeritus
Homework Helper
That's wrong.

To find a total charge you need to integrate the density ##\rho## over whole space (spherical coordinates are best here). Luckily ##\rho## gets small pretty quickly so integration gives finite result. a) is exactly like finding a mass of an infinite object with density ##\rho##.

Mutatis
That's wrong.
Which one is wrong?

To find a total charge you need to integrate the density ##\rho## over whole space (spherical coordinates are best here). Luckily ##\rho## gets small pretty quickly so integration gives finite result. a) is exactly like finding a mass of an infinite object with density ##\rho##.
Yes, that's what I did at the answer of a)... Is that answer wrong? I'm not sure if b) answer is right.

Yes, that's what I did at the answer of a)... Is that answer wrong?
No, sorry I didn't see that in "The attempt at a solution". a) is correct.

Mutatis
That's wrong.

haruspex
Homework Helper
Gold Member
2020 Award
Please show your working for part b. Without that it is hard to say where you are going wrong.
It does seem clear to me that there should be an exponential in the answer.

Mutatis
Please show your working for part b. Without that it is hard to say where you are going wrong.
It does seem clear to me that there should be an exponential in the answer.
First I've used the Gauss law, with the information I got from a): $$E r^2 4 \pi = \frac {8 \pi a^3 \rho_0} {\varepsilon_0 r^2} \\ \vec E = \frac {4 \pi a^3 \rho_0} {\varepsilon_0 r^2} \vec r .$$
The integral of the left side I did under spherical cordinates and the right side I've used the answer of a).

haruspex
Homework Helper
Gold Member
2020 Award
First I've used the Gauss law, with the information I got from a): $$E r^2 4 \pi = \frac {8 \pi a^3 \rho_0} {\varepsilon_0 r^2}$$
The information you show from (a) was the total charge across an infinite region. r therefore does not appear in that expression. I do not see how you can get the above by applying Gauss' law to that.
What do you get for the charge inside radius r?

The information you show from (a) was the total charge across an infinite region. r therefore does not appear in that expression. I do not see how you can get the above by applying Gauss' law to that.
What do you get for the charge inside radius r?
Oh thank you, I was doing my calculation wrong. So I've tried to do the integrals over r and I got a different answer this time (it doesn't match with the solutionary): $$E \int_0^r \, da = \frac {4 \pi \rho_0} {\varepsilon_0} \int_0^r e^{\frac {-r} {a}} \, dr \\ 4 \pi r^2 E = \frac {4 \pi \rho_0} {\varepsilon_0}\left. \left(-a e^{\frac {-r} {a}} \right)\right|_0^r \\ \vec E = \frac { \rho_0} {\varepsilon_0 r^2} \left( a - e^{\frac {-r} {a}} \right) \vec r$$

Last edited:
haruspex
Homework Helper
Gold Member
2020 Award
Oh thank you, I was doing my calculation wrong. So I've tried to do the integrals over r and I got a different answer this time (it doesn't match with the solutionary): $$E \int_0^r \, da = \frac {4 \pi \rho_0} {\varepsilon_0} \int_0^r e^{\frac {-r} {a}} \, dx \\ 4 \pi r^2 E = \frac {4 \pi \rho_0} {\varepsilon_0}\left. \left(-a e^{\frac {-r} {a}} \right)\right|_0^r \\ \vec E = \frac { \rho_0} {\varepsilon_0 r^2} \left( a - e^{\frac {-r} {a}} \right) \vec r$$
You are still going wrong right at the start.
The charge density is ##\rho(r)=\rho_0e^{-\frac ra}##.
Consider a spherical shell, radius r, thickness dr. What is the charge on the shell?

I've took out ##\rho_0## of the integral because it's a constant...

haruspex