# Potential of Sphere from Surface Integrals

Calculating the potential of a sphere can be very easily done in terms of "Physics" but I was asked to calculate the potential generated by the sphere $x^2 + y^2 + z^2 = a^2$ with the charge density $\mu = const.$ using surface integrals.

Is this question correct or am I missing out something.

Thanks.

The question sounds correct. One thing you may be missing out on, however, is that you (probably) are not required to use rectangular coordinates. We want to calculate the potential at some point $P$ due to something like charge or mass that is evenly distributed over a spherical surface.

First, a sketch of the surface showing relevant features, namely the surface, a differential element of area on the surface and the point $P$ at which the potential is to be calculated. Now here's a trick: put $P$ on the z-axis of the reference frame. We should be free to pick any frame we want, so we pick a frame whose origin is at the center of the sphere and whose z-axis goes through $P$.

Second, write an expression for contribution to the potential due to our element of area. That contribution is $\mu dA/R_{ps}$, where $R_{ps}$ is the distance from element of surface area to $P$. So, we are talking about evaluating the integral $$\int \frac{\mu}{R_{ps}}dA$$ Third, we need coordinates to identify the points on the surface that are included in the integral and we want to express $dA$ and $R_{ps}$ in those same coordinates. Since we have a spherical surface, let's use spherical coordinates.

The spherical coordinates I use are $(r,\theta,\phi)$ where $\theta$ is the polar angle that goes from 0 to $\pi$ and $\phi$ is the azimuthal angle that goes from 0 to $2\pi$. So, the area element is $a^2\sin{\theta}d\theta d\phi$.

The distance $R_{ps}$ can be obtained from the law of cosines. A separate sketch showing the distances involved may be helpful. We let the distance from the origin to point $P$ be $b$, and get $R_{ps}^2=a^2+b^2-2ab\cos\theta$.

Fourth, rewrite the integral in spherical coordinates to obtain $$\int \int \frac{a^2\mu\sin\theta}{\sqrt{a^2+b^2-2ab\cos\theta}}d\theta d\phi$$

Fifth, evaluate the integral over the proper limits and reduce the result to it simplest form. The integral itself is easy. There is one trick to keep in mind when we eliminate the square roots: we must consider separately what happens when $b<a$, when $b=a$ and when $b>a$. Really, all we are doing evaluating $R_{ps}$ at three positions, so our sketch and the law of cosines may be helpful.

Sixth, as a sanity check, is this the same solution as the physics approach? In physics we talk about attractive forces like gravity, which has negative potential for positive $\mu$, and about repulsive forces, like the Coulomb force, which has a positive potential for positive $\mu$.