# (Electrostatics) Energy of a configuration

## Homework Statement

For a given configuration i found the scalar potential $$\phi(r)$$-->(as you can see its a function only of r)
My question is about calculating the energy of the system.

## Homework Equations

$$W=-\dfrac{\varepsilon_0}{2}\int |\nabla \phi|^2 d^{3}x =\dfrac{1}{2}\int \phi \rho \,d^{3}x$$

## The Attempt at a Solution

I just dont know if i should integrate $$\phi (r)$$ like a triple integral with limits $$(0,\infty)x(0,2\pi)x(0,\pi)$$ or should i perform the inverse substitution (from sferical coordinates to cartesian ) and then integrate $$\phi (x,y,z)$$ like a triple integral with limits (-oo,oo)x(-oo,oo)x(-oo,oo)

Moreover, if i perform the change in the variables,what happen to the Jacobian of the substitution (|J|=$$r^2 sin(\vartheta)$$ )????

Last edited: