# What's wrong with my electric potential ?

Ylle

## Homework Statement

I'm quite lost here.

The problem states:

A spherically symmetric electrostatic charge distribution produces an electric field that is directed radially out from the distribution center. At the distance r from this center the field has the strength:

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

and

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

The constant Q is a charge, the constant R is a length; both are positive.

Now, determine the electric potential V(r) anywhere in space, when the potential is set to 0 in the infinitely distant.

## Homework Equations

$$$V=\int_{a}^{b}{E}\,dr$$$

## The Attempt at a Solution

Ok...

I first do the integral with the first E-field (0 < r < R), with the limits 0 to r. This gives me:

$$V=\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\int_{0}^{r}{\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{2}}} \right)}\,dr=-\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$

But since Q and R were positive, I assume that this result is positive as well, so instead we have:

$$V=\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$

Then I take the integral of the other E-field, with the limits R to infinity and get:

$$V=\frac{Q}{4\pi {{\varepsilon }_{0}}}\int_{R}^{\infty }{\frac{1}{{{r}^{2}}}}\,dr=\frac{Q}{4\pi {{\varepsilon }_{0}}R}$$

Adding these two integrals together I get:

$$V=$\frac{Q\left( 2{{r}^{3}}-3R{{r}^{2}}+6{{R}^{3}} \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$$

BUT, according to my book it should be:

$$V=$\frac{Q\left( 2{{r}^{3}}-3R{{r}^{2}}+7{{R}^{3}} \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$$

So, the difference being the 7 instead of 6. And I have no idea what to do to make up for that tiny difference. It's so close to each other that I can't imagine me being WAY off. So am I doing something wrong, or is it a mistake in the book ?

Regards

willem2
$$V=\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\int_{0}^{r}{\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{2}}} \right)}\,dr=-\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$

But since Q and R were positive, I assume that this result is positive as well, so instead we have:

This didn't make the result positive, because 2r-3R is negative inside the sphere.

Ylle
So I need to say 2r+3R instead, or...?

Homework Helper
Gold Member

## Homework Equations

$$$V=\int_{a}^{b}{E}\,dr$$$

That doesn't look quite right. Don't you mean $$V(b)-V(a)=-\int_a^b\textbf{E}\cdot d \textbf{r}$$ ? $$V=\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\int_{0}^{r}{\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{2}}} \right)}\,dr=-\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$

Why are you integrating from $r=0$? Do you know what the potential is at $r=0$? If npt, then it isn't much use to you as a reference point.

$$V(r)-V(0)=-\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\int_{0}^{r}{\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{2}}} \right)}\,dr=\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$

Instead, try integrating from infinity since you are told that $V(r=\infty)=0$

willem2
So I need to say 2r+3R instead, or...?

The integral in the sphere should have been from r to R and not from 0 to R.

Ylle
That doesn't look quite right. Don't you mean $$V(b)-V(a)=-\int_a^b\textbf{E}\cdot d \textbf{r}$$ ? Why are you integrating from $r=0$? Do you know what the potential is at $r=0$? If npt, then it isn't much use to you as a reference point.

$$V(r)-V(0)=-\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\int_{0}^{r}{\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{2}}} \right)}\,dr=\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$

Instead, try integrating from infinity since you are told that $V(r=\infty)=0$
Well, the true form is:

$$${{V}_{a}}-{{V}_{b}}=\int_{a}^{b}{E}\cdot dl$$$

But I just thought that since:

$${{V}_{b}}=V\left( r=\infty \right)=0$$
I would just remove Vb.

But I'm still confused. For r >= R I get:

$$V\left( r\ge R \right)=\int_{r}^{\infty }{\frac{Q}{4\pi {{\varepsilon }_{0}}{{r}^{2}}}dr=}0-\left( \frac{-Q}{4\pi {{\varepsilon }_{0}}r} \right)=\frac{Q}{4\pi {{\varepsilon }_{0}}r}$$

So that should be okay.

But if I do the integral you say, which is for r < R, I get:

$$$V\left( r<R \right)=\int_{r}^{R}{\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{3}}} \right)dr=}-\frac{Q{{R}^{2}}\left( 2R-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}-\left( -\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}} \right)=\frac{Q\left( 2{{r}^{3}}-3{{r}^{2}}R+{{R}^{3}} \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$$

So now I don't even have 6 anymore - but still need 7 though.

Last edited:
Staff Emeritus
Homework Helper
When r<R, you still have to integrate from $r=\infty$.

Ylle
But wont infinity, in that particular integral, just give me the result: Infinity ?
Even though it's from or to infinity...

I mean, the indefinite integral is:

$$$V=\int{\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{3}}} \right)dr=}-\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$$

So putting infinity on r's place, in any case, would just result in infinity.

Last edited:
Homework Helper
Gold Member
But wont infinity, in that particular integral, just give me the result: Infinity ?
Even though it's from or to infinity...

I mean, the indefinite integral is:

$$$V=\int{\frac{Q}{4\pi {{\varepsilon }_{0}}{{R}^{2}}}\left( \frac{r}{R}-\frac{{{r}^{2}}}{{{R}^{3}}} \right)dr=}-\frac{Q{{r}^{2}}\left( 2r-3R \right)}{24\pi {{\varepsilon }_{0}}{{R}^{4}}}$$$

So putting infinity on r's place, in any case, would just result in infinity.

No, by definition,

$$V(r)-V(\infty)=-\int_{\infty}^r\textbf{E}\cdot d\textbf{r}$$

If $r<R$, you will want to break the integral into two segments

$$\int_{\infty}^r\textbf{E}\cdot d\textbf{r}=\int_{\infty}^R\textbf{E}\cdot d\textbf{r}+\int_{R}^r\textbf{E}\cdot d\textbf{r}$$

The first integral is entirely outside the sphere, so you would use $$E_{\text{outside}}$$

Ylle
Hmmm, I get the correct result now.
But I really don't understand why it is that way tbh.

According to my book, the potential is:

$$${{V}_{a}}-{{V}_{b}}=\int_{a}^{b}{E}\cdot dl$$$
where V(b) should be 0, since r=b=infinity.

But somehow, you rearrange it, so you get minus the integral, but the same on the left side, where I would think you would have to change V(a) to -V(a) and -V(b) to V(b).

And the integrals seems like you are going from outside the sphere to the inside of the sphere, instead of the other way around. I can't see why that is the case, besides that giving me the correct answer :)

Homework Helper
Gold Member
According to my book, the potential is:

$$${{V}_{a}}-{{V}_{b}}=\int_{a}^{b}{E}\cdot dl$$$

Are you sure about that? What textbook are you using and what page is this formula on?

Ylle
Young & Freedman - University Physics, page 789.

Homework Helper
Gold Member
Oh, there's nothing wrong with that equation (I misread it when I first looked at your post).

$$V_a-V_b=\int_a^b \textbf{E}\cdot d\textbf{l} \implies V_b-V_a=-\int_a^b \textbf{E}\cdot d\textbf{l}$$

You can either choose $b=\infty$ and $a=r$ or vice versa. Either way will lead you to the exact same thing since

$$\int_{r}^\infty \textbf{E}\cdot d\textbf{l}=-\int_{\infty}^r \textbf{E}\cdot d\textbf{l}$$

Ylle
Ok, now I'm with :)
Thank you.