# Question about Gauss's law, finding electric field and potential field

1. May 18, 2014

### applestrudle

I'm having trouble with the second part b) for this problem.

I used Gauss's Law and for a I got

r<R

$$E = \frac{{r}^{2}}{4\varepsilon}$$

and for r>R

$$E = \frac{{R}^{4}}{4\varepsilon{r}^{2}}$$

and then

$$V = \int{E.dr}$$

from r to infinity right? So

for r>R I got

$$V = \frac{{R}^{4}}{4\varepsilon r}$$

but for r<R

I get $$V = \left[ \frac{{r}^{3}}{12\varepsilon}\right]$$ from infinity to r so I would get infinity which doesn't make sense,

2. May 18, 2014

### BvU

Why from infinity ?

3. May 18, 2014

### applestrudle

because isn't the potential field always the integral of the electric field from r to infinity?

but is it different when you integrate inside the sphere?

4. May 18, 2014

### TSny

Yes, to get V at r inside you want the integral $V = \int{E.dr}$ from r to infinity. But you'll need to break this up into an integral from r to R and then from R to infinity. For R to infinity, you can just use your result for outside.

5. May 24, 2014

### unscientific

First find the potential at distance 0< r < R inside the sphere. (Hint: think of shells) Then we know for electrostatic case $E=-\nabla V$.

For outside the sphere, you were right in using gauss's law.

6. May 25, 2014

### vanhees71

Hint: It's much easier to use the local form of the electrostatic Maxwell equations (as is almost always the case). Here you just can make the ansatz
$$V(\vec{x})=V(r) \quad \text{with} \quad r=|\vec{x}|$$
and solve the (now ordinary) differential equation (written in Heaviside-Lorentz units)
$$\Delta V=-\rho \; \Rightarrow\; \frac{1}{r} \frac{\mathrm{d}}{\mathrm{d} r} \left [r V(r) \right ] = -\rho(r).$$
This reduces the problem to two simple integrations.