# Integrate outward unit vector over the surface of a sphere

I'm trying to understand an integration over the surface of a sphere that is used in one of the articles I'm reading. I don't know why I can't understand it as it seems to be a pretty straightforward integration and I have been used to more complex math but anyway.

Let $\textbf{r} = \textbf{x - x'}$, $r = |\textbf{r}|$ and $\textbf{n} = \frac{\textbf{r}}{r}$ where $|.|$ is the euclidian norm. The goal is to calculate the following integral for $i, j \in \{1,2,3\}$ :

$$I = \int_{A(r)} n_{i}n_{j}\text{d}A$$

Where $A(r)$ denotes a spherical surface of radius $r$.

The way I've gone about it is to say that for a spherical surface of radius $r$ we have

$$\text{d}A = r\sin(\phi)\text{d}\phi\text{d}\theta$$

with $(\phi, \theta) \in [0,\pi]\times[0,2\pi]$ and since $r_{i}$ or $r_{j}$ are not dependent of the angles we should have

$$I = 4\pi r_{i}r_{j}$$

However the article I'm reading has the result

$$I = \frac{4\pi r^{2}}{3} \delta_{ij}$$

I've been thinking about it but can't seem to find my mistake.

Thanks for your help kind stranger :)

Given your choice of parameters, you seem to be parametrizing $A(r)$ via \begin{equation} (\phi,\theta) \mapsto (r\cos\theta\sin\phi, r\sin\theta\sin\phi, r\cos\phi). \end{equation} This allows us to parametrize the unit normal vector $\mathbf{n}$: \begin{equation} \mathbf{n}(\phi,\theta) = (\cos\theta\sin\phi,\sin\theta\sin\phi,\cos\phi). \end{equation} From this we have \begin{align*} n_1n_{1} &= \cos^2\theta\sin^2\phi\\ n_1n_2 &= \sin\theta\cos\theta\sin^2\phi\\ n_1n_3 &= \cos\theta\sin\phi\cos\phi\\ n_2n_2 &= \sin^2\theta\sin^2\phi\\ n_2n_3 &= \sin\theta\sin\phi\cos\phi\\ n_3n_3 &= \cos^2\phi. \end{align*} We then have \begin{equation} I_{ij} = \int_0^{2\pi}\int_0^\pi n_in_j r^2\sin\phi d\phi d\theta. \end{equation} (Notice that the integrating factor should be $dA=r^2\sin\phi d\phi d\theta$. You can get this by computing the relevant Jacobian determinant for your parametrization.) We can then directly compute the six integrals. For instance, \begin{align*} I_{11} &= \int_0^{2\pi}\int_0^\pi r^2\cos^2\theta\sin^3\phi d\phi d\theta = r^2\left(\int_0^{2\pi}\cos^2\theta d\theta\right)\left(\int_0^\pi \sin^3\phi d\phi\right)\\ &= r^2\cdot \pi\cdot \frac{4}{3} = \frac{4\pi r^2}{3}\delta_{11}. \end{align*} The other integrals will work out similarly. The real problem seems to have been the integrating factor. Notice that if $i\neq j$, then $n_in_j$ has an odd-power $\theta$ term, and this will kill the integral.