# Integrate a vector field in spherical coordinates

1. Sep 5, 2015

### alpine_steer

I have the following integral:

$\oint_{S}^{ } f(\theta,\phi) \hat \phi \; ds$

Where s is a sphere of radius R.

so ds = $R^2 Sin(\theta) d\theta d\phi$

Where ds is a scalar surface element. If I was working in Cartesian Coordinates I know the unit vector can be pulled out of integral and I can be on my way. But as $\phi$ changes as I move around the surface I am not sure how to account for this. is it a simple as including an additional $R \; Sin(\theta)$ in the integral?

2. Sep 5, 2015

### blue_leaf77

Exactly as you said, that's the way to proceed.
When you express $\hat{\phi}$ in terms of Cartesian unit vectors, each component will be a function of $\theta$ and $\phi$, that is, the change in $\phi$ is automatically accounted for in the dependence of the components on this coordinate, as it should be.
What makes you think so?

3. Sep 5, 2015

### Geofleur

How about expressing the unit vector in terms of Cartesian basis vectors? Then you will get some extra stuff with angles inside the integral, but you won't have to worry about vectors changing direction inside the integral, because $\textbf{i}$, $\textbf{j}$, and $\textbf{k}$ can then be taken outside the integral.

I think I posted at near the same time as blue_leaf77, and it's the same idea.

4. Sep 5, 2015

### alpine_steer

This is what I thought.

Last edited: Sep 5, 2015