# Determine n when you know the charge density (Electromagnetism)

## Homework Statement

You are informed that the charge density is:

$$\rho \left( r \right)=k{{r}^{-n}},r<a$$,
where k is a constant and n is a whole number.

Determine n.

## Homework Equations

Besides that, I know that:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{r}^{2}}},r<a$$$

(E is spherically distributed btw)

## The Attempt at a Solution

When I have the charge density I know that:

$$dQ=4\pi {{r}^{2}}\rho \left( r \right)$$

So by integrating from 0 to a that I get that:

$$Q=\frac{4\pi {{r}^{3-n}}k}{3}$$

Gauss' Law states (For my case):

$$E\left( r \right)\left( 4\pi {{r}^{2}} \right)=\frac{Q}{{{\varepsilon }_{0}}}$$

So when I put this together I just get the one side equal the other side :S

And I know that n = 1.

What am I doing wrong ?

Related Advanced Physics Homework Help News on Phys.org
kuruman
Homework Helper
Gold Member
Besides that, I know that:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{r}^{2}}},r<a$$$

(E is spherically distributed btw)
How do you know that this is the case? Is that given by the problem? What happens at r = 0?

How do you know that this is the case? Is that given by the problem? What happens at r = 0?
Yes, it's given in the problem.

I also know that:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{r}^{2}}},r>a$$$

Oh, and of course, my mistake, for E when r < a (As I already said) is:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{a}^{2}}},r<a$$$,
not r2.

And Q > 0 always.

gabbagabbahey
Homework Helper
Gold Member
$$dQ=4\pi {{r}^{2}}\rho \left( r \right)$$

So by integrating from 0 to a that I get that:

$$Q=\frac{4\pi {{r}^{3-n}}k}{3}$$
Double check that integration

gabbagabbahey
Homework Helper
Gold Member
Yes, it's given in the problem.

I also know that:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{r}^{2}}},r>a$$$
That looks reasonable. Assuming, of course that $Q$ represents the total charge of the distribution.

Oh, and of course, my mistake, for E when r < a (As I already said) is:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{a}^{2}}},r<a$$$,
not r2.

And Q > 0 always.
What happens when you take the divergence of this field?

Double check that integration
Exhange r3 with a3 ?

Hmmm, after some checking I get:

$$Q=\frac{-4\pi {{a}^{3-n}}k}{n-3}$$

But does that change anything since Q is on both sides ?

Last edited:
That looks reasonable. Assuming, of course that $Q$ represents the total charge of the distribution.

What happens when you take the divergence of this field?
Well, for a -> 0 E becomes 0, if thats what you mean ?

Last edited:
gabbagabbahey
Homework Helper
Gold Member
Well, for a -> 0 E becomes 0, if thats what you mean ?
No, that's not what I mean. I meant exactly what I said: calculate the divergence of the electric field you are given...what do you get? Compare your result to Gauss' Law in differential form.

kuruman
Homework Helper
Gold Member
Denver Dang, I think the time has come for you to post the entire problem exactly as it is given to you. Then we will sort out what is given, what is known and what is assumed. If it is just what your first posting says, then you cannot say that you know that the field inside is either Q/4πεr2 or Q/4πεa2; you need to derive the field inside using Gauss's Law correctly.

Ok, sorry it's so confusing...

Here goes:

Consider a spherically charge distribution with radius a. The charge distribution gives an electric field that is directed radially from the distribution center. In the distance r from the center the electric field has the strength:

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{a}^{2}}},r<a$$$

and

$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{r}^{2}}},r>a$$$

where Q is the total charge: Q >0. The dielectricconstant K is 1 everywhere.

You are informed that the charge density is:

$$\rho \left( r \right)=k{{r}^{-n}},r<a$$,
where k is a constant and n is a whole number.

Now determine n.

kuruman
Homework Helper
Gold Member
Suppose you constructed a spherical Gaussian surface of radius r < a. Can you use Gauss's Law to find the electric field? It must have a dependence on n. Then, since the electric field inside is ostensibly
$$$E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{a}^{2}}}$$ you can set it equal to the expression that you found from Gauss's Law and solve for n. That is probably what the author of this problem intended you to do. Warning: Making sense of the answer is another issue because this does not appear to be a well-posed problem. As gabbagabbahey indicated, what is the divergence of E inside the spherical distribution and how does it relate to the charge density? Suppose you constructed a spherical Gaussian surface of radius r < a. Can you use Gauss's Law to find the electric field? It must have a dependence on n. Then, since the electric field inside is ostensibly $$\[E=\frac{Q}{4\pi {{\varepsilon }_{0}}}\frac{1}{{{a}^{2}}}$$ you can set it equal to the expression that you found from Gauss's Law and solve for n. That is probably what the author of this problem intended you to do. Warning: Making sense of the answer is another issue because this does not appear to be a well-posed problem. As gabbagabbahey indicated, what is the divergence of E inside the spherical distribution and how does it relate to the charge density? If I do what you say, won't I just end up with what I usually posted ? I mean, by Gauss Law I have: $$E\cdot A=\frac{{{Q}_{encl}}}{{{\varepsilon }_{0}}}$$ Qencl I can find by saying: $${{Q}_{encl}}=\rho \left( r \right)V=\left( k{{r}^{-n}} \right)\left( \frac{4}{3}\pi {{r}^{3}} \right)=\frac{4\pi {{r}^{3-n}}k}{3}$$ And when I put that into Gauss Law, I can an electric field of: $$\[E=\frac{{{r}^{1-n}}k}{3{{\varepsilon }_{0}}}$$$

Setting that equal to the expression I know, I get, well nothing I can get even close to 1 :S

And I haven't had Vectoranalysis yet, so I'm not quite sure what you mean about the divergence tbh...

kuruman
Homework Helper
Gold Member
If I do what you say, won't I just end up with what I usually posted ?

$$$E=\frac{{{r}^{1-n}}k}{3{{\varepsilon }_{0}}}$$$
That's almost what you should get given what the problem says. If you are looking for the E field inside, you need to find the charge enclosed by the Gaussian surface, not the total charge in the distribution. What is the charge enclosed by a shell of radius r < a?
Setting that equal to the expression I know, I get, well nothing I can get even close to 1 :S
Note that the electric field that the problem claims to be the correct expression inside is a constant and does not depend on r. Assuming that you get the correct expression for the field inside, what must n be to get a constant field inside?
And I haven't had Vectoranalysis yet, so I'm not quite sure what you mean about the divergence tbh...
OK, forget the divergence if you haven't had that yet. Answer my question above and see what form the electric field inside takes for the value of n that makes it a constant. You will see that it is not what the problem claims it to be. In other words, the field inside cannot be what the problem claims. That's what I meant earlier when I said it is an ill-posed problem.

Isn't the charge enclosed by the Gaussian surface the Qencl I found ?

kuruman
Homework Helper
Gold Member
No it is not. You need to redo the integral
$$\int_0^r \rho (r) 4 \pi r^2 dr$$
correctly. Neither of the two expressions you have shown above is correct.

No it is not. You need to redo the integral
$$\int_0^r \rho (r) 4 \pi r^2 dr$$
correctly. Neither of the two expressions you have shown above is correct.
Oh, my mistake...

I get:

$$${{Q}_{encl}}=-\frac{4\pi {{r}^{3-n}}k}{n-3}$$$

So now what ? Inserting it into:

$$EA=\frac{{{Q}_{encl}}}{{{\varepsilon }_{0}}}$$ ?

And then setting it equal the other E I have ? Won't that just give me the one side equals the other again ?

Last edited:
kuruman
Homework Helper
Gold Member
First use

$$EA=\frac{{{Q}_{encl}}}{{{\varepsilon }_{0}}}$$

to find E as a function of r inside the distribution. What do you get?

I get:

$$$E=-\frac{k{{r}^{1-n}}}{\left( n-3 \right){{\varepsilon }_{0}}}$$$

gabbagabbahey
Homework Helper
Gold Member
I get:

$$$E=-\frac{k{{r}^{1-n}}}{\left( n-3 \right){{\varepsilon }_{0}}}$$$
Right, so comparing that to the field inside the distribution that you you are given in the problem statement, you get

$$-\frac{kr^{1-n}}{\left( n-3 \right)\varepsilon_0}=\frac{Q}{4\pi\epsilon_0}\frac{1}{a^2}$$

You can solve this both for $n$ and for $Q$

Right, so comparing that to the field inside the distribution that you you are given in the problem statement, you get

$$-\frac{kr^{1-n}}{\left( n-3 \right)\varepsilon_0}=\frac{Q}{4\pi\epsilon_0}\frac{1}{a^2}$$

You can solve this both for $n$ and for $Q$
But how will I end up with n = 1 in that case ?
I have 4 unknowns: k, r, Q and a. So I will not be able to remove them from the equation no matter what I do. I just end up with an expression that involves those 4 unknowns. Or am I missing something :S

gabbagabbahey
Homework Helper
Gold Member
But how will I end up with n = 1 in that case ?
If $n\neq 1$, then the LHS of the equation will depend on $r$. But the RHS doesn't depend on $r$. The only way that the equation can possibly be satisfied for all values or $r$ is if $n=1$ because $r^{1-1}=r^0=1$ which is a constant and has no $r$ dependence.

I have 4 unknowns: k, r, Q and a. So I will not be able to remove them from the equation no matter what I do. I just end up with an expression that involves those 4 unknowns. Or am I missing something :S
$Q$, $k$ and $a$ are all constants. $a$ is the radius of the charge distribution, and $k$ is the proportionality constant for $\rho$ that you are given in your problem statement. You can, if you like, express $Q$ in terms of those other two constants.

The only quantity that isn't a constant, is the distance of the field point from the center of the charge distribution, $r$. Its value depends on where you want to measure the field at. The above equation must be true at all points inside the charge distribution, and hence at all values of $r<a$.

Ahhhh, ofc :)
Did not see it that way. Thank you very much - and you too kuruman :)