# Finding electrostatic potential

Tags:
1. Oct 8, 2014

### ghostfolk

1. The problem statement, all variables and given/known data

Find the energy stored in a solid sphere by integrating $\frac{\epsilon_0}{2} \int E^2d^3r$ given that $E=k\frac{r^2}{4 \epsilon_0}$ for $0<r\le R$ and $E=k\frac{R^4}{4r^2 \epsilon_0}$ for $r>R$
2. Relevant equations

$U=\frac{\epsilon_0}{2} \int E^2d^3r$

3. The attempt at a solution
I'm just looking for the correct set up
$U=\frac{\epsilon_0}{2} [\int_0^R (k\frac{r^2}{4 \epsilon_0})^2d^3r+\int_R^\infty (k\frac{R^4}{4r^2 \epsilon_0})d^3r]$.

2. Oct 8, 2014

### Orodruin

Staff Emeritus
With the given fields, your setup is fine apart from missing a square of the field for the second integral. Also, do not forget the integrals in the angles.