# integrating a vector over a sphere

I have the following triple integral in spherical coordinates $(r,\theta,\phi)$: $$\int_0^{2\pi}\int_0^\pi\int_0^RCr^3\hat\theta\cdot r^2dr\sin{\theta}d\theta d\phi$$

How do I handle the $\hat\theta$? If I ignore it, I get $\frac{2}{3}\pi CR^6$. So is my answer the vector $\frac{2}{3}\pi CR^6\hat\theta$? Do I need to integrate the unit vector $\hat\theta$? If so, how?

-

Yes, you need to integrate this, as $\hat \theta$ is a function of $\theta, \phi$. A straightforward way to attack the problem is to write $\hat \theta$ as a linear combination of $\hat x, \hat y, \hat z$, but with the components expressed in terms of $r, \theta, \phi$.
If I write $\hat\theta$ as $\cos{\phi}\cos{\theta}\hat x + \cos{\theta}\sin{\phi}\hat y - \sin{\theta}\hat z$ then do I have to change $r^3$ into $(x^2+y^2+z^2)^{3/2}$ and the integrate over $dx dy dz$? –  BBB May 26 '13 at 20:10
No, note that $\hat x$, etc., are fixed, so do your spherical coordinates integral component by component. –  Ted Shifrin May 26 '13 at 20:12
@TedShifrin So something like this? $$\left(\int_0^{2\pi}\int_0^\pi\int_0^RCr^5\cos{\phi}\cos{\theta}\sin{\theta}d \theta d\phi\right) \hat x + \left(\int_0^{2\pi}\int_0^\pi\int_0^RCr^5\cos{\theta}\sin{\phi}dr\sin{\theta}d \theta d\phi \right)\hat y -\left(\int_0^{2\pi}\int_0^\pi\int_0^RCr^5dr \sin^2{\theta}d\theta d\phi\right)\hat z$$ –  BBB May 26 '13 at 20:18
Looks good. By symmetry the answer will be in the $-\hat z$ direction, which is sensible. –  Ted Shifrin May 26 '13 at 20:23