# example of integration with respect to surface area on a sphere viewed as a graph

In this example, we consider the sphere $S^{2}$ as the graph of $z=\sqrt{r^{2}-x^{2}-y^{2}}$ and use equation (1) of the http://planetmath.org/node/6660main entry to express integrals over the sphere with respect to surface area as double integrals with respect to $x$ and $y$.

Differentiating the function $g(x,y)=\sqrt{r^{2}-x^{2}-y^{2}}$ and simplifying, we obtain

 $\sqrt{1+\left(\frac{\partial g}{\partial x}\right)^{2}+\left(\frac{\partial g}% {\partial y}\right)^{2}}=$
 $\sqrt{1+\left(\frac{-x}{\sqrt{r^{2}-x^{2}-y^{2}}}\right)^{2}+\left(\frac{-y}{% \sqrt{r^{2}-x^{2}-y^{2}}}\right)^{2}}=$
 $\frac{r}{\sqrt{r^{2}-x^{2}-y^{2}}}.$

Hence, we have

 $\int_{S_{2}}f(x,y)\,d^{2}A=\int\frac{rf(x,y)}{\sqrt{r^{2}-x^{2}-y^{2}}}\,dx\,dy.$

This formula is sometimes written as

 $\int_{S}f(x,y)\,d^{2}A=\int\frac{rf(x,y)}{z}\,dx\,dy.$

In using this form, it is understood that $z$ is to be regarded as a function of $x$ and $y$ rather than as an independent variable.

## 1 Note on multi-valuedness

To use this formula correctly, one must pay attention to the fact that the square root is multiply valued – to every pair of values $(x,y)$ with $x^{2}+y^{2}, there correspond two values of $z=\sqrt{r^{2}-x^{2}-y^{2}}$. If one chooses only one branch of the square root (say the negative branch), one will only take into account half of the surface area of the sphere (in the case of the negative branch, this would be “southern hemisphere” which lies below the $xy$ plane). Therefore, unless one is only interested in carrying out an integral over a single hemisphere, one needs to account for both points on the sphere that correspond to a point in the $xy$ plane. A more careful way of rewriting this formula which takes this into account would be

 $\int\frac{r(f^{+}(x,y)+f^{-}(x,y))}{\sqrt{r^{2}-x^{2}-y^{2}}}\,dx\,dy.$

Here, $f^{+}(x,y)$ denotes the value of the function $f$ at the point $(x,y,+\sqrt{r^{2}-x^{2}-y^{2}}$ on the sphere and, likewise, $f^{-}(x,y)$ denotes the value of $f$ at the point $(x,y,-\sqrt{r^{2}-x^{2}-y^{2}}$. However, the formula is usually not written in this way, and it is left up to the reader to remember that both hemispheres must be accounted for.

## 2 Polar coordinates

At times, it is useful to describe the sphere as a graph and use polar coordinates in the plane. To adapt our formula to this situation, we need to make the change of variables

 $x=\rho\cos\theta$
 $y=\rho\sin\theta.$

The Jacobian for this transform is

 $\frac{\partial(x,y)}{\partial(\rho,\theta)}=\rho$

and hence we have

 $\int_{S_{2}}f(\rho,\theta)\,d^{2}A=\int\frac{r\rho f(\rho,\theta)}{\sqrt{r^{2}% -\rho^{2}}}\,d\rho\,d\theta.$