# Calculating the potential energy of a uniformly charged sphere

1. Feb 26, 2012

### black_hole

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

The sphere has a radius a and is filled with a charge of uniform. They way I am asked to do this is by building the sphere up layer by layer. And I know that the field outside the sphere is the same as if it were a point charge.

2. Relevant equations

U = ε/2∫E^2 dv

3. The attempt at a solution

I'm assuming I can find the field inside by building the sphere layer by layer and then add the field outside to that. The field outside is easy, it's the potential inside I'm having a hard time finding. I guess if I build up the sphere layer by layer they would be disks of radius a and charge dq right, with volume $\pi$a^2dx. That much I know but I'm sorta confused about how to set up my integral. Thanks in advance.