# Work done in bringing a sphere to a charge

In page-87 of Purcell, David J. Morin Electricity and magnetism (3 ed) , the following theorem is discussed:

Theorem 2.1 If $$\phi(x, y, z)$$ satisfies Laplace’s equation, then the average value of $$\phi$$ over the surface of any sphere (not necessarily a small sphere) is equal to the value of $$\phi$$ at the centre of the sphere.

The proof starts with bringing charge ($$q'$$) from infinity to a sphere(of charge $$q$$) which was easy for me to understand, the second part involves bringing the sphere to the charge which I find difficult to understand. I quote the second part:

Now suppose, instead, that the point charge $$q$$ was there first and the charged sphere was later brought in from infinity. The work required for that is the product of $$q′$$ and the average over the surface $$S$$ of the potential due to the point charge $$q$$. Now the work is surely the same in the second case, namely $$\frac{qq′}{4π\epsilon_0R}$$, so the average over the sphere of the potential due to $$q$$ must be $$\frac{q}{4 \pi \epsilon_o r}$$. That is indeed the potential at the centre of the sphere due to the external point charge $$q$$.

I have two main questions on the above paragraph:

1. What exactly does it mean to average a function over a surface?
2. Why should the work be the product of the charge $$q'$$ with the average potential?

1. To average a function $$f(\mathbf r)$$ over a sphere means to integrate the value of the function over the sphere and divide by the area of the sphere. $$\frac{1}{4\pi R^2}\int_{\rm sphere}f(\mathbf r)\,dS.$$ This is the usual way to define averages.
2. If we bring a point charge $$q'$$ to a point in space where there is a potential $$V(\mathbf r)$$ created by other charges, then the work needed is $$q'V(\mathbf r)$$. If, as in your case, the charge that we bring is not a point charge, but is distributed over a sphere of radius $$R$$, we need to sum (integrate) the work done to bring each infinitesimal charge at each point in the sphere $$dq=\sigma dS$$ multiplied by the potential at that point in the sphere: $$W=\int_{\rm sphere} V(\mathbf r)dq=\int_{\rm sphere} \sigma V(\mathbf r) dS.$$ Since the total charge in the sphere is $$q'$$, then $$\sigma=q'/(4\pi R^2)$$, so that the work needed is $$\int_{\rm sphere} \sigma V(\mathbf r) dS=q'\underbrace{\left[\frac{1}{4\pi R^2}\int_{\rm sphere} V(\mathbf r) dS\right]}_{\text{average of V over the sphere}}.$$