# Is it possible to calculate a surface integral of a vector field when the vector field is described in non-cartesian coordinates?

Every note and book I read about surface integrals of vector fields only show how to solve these integrals when the vector field is in Cartesian coordinates. I'm curious about what would be the right procedure to solve these integrals when talking about a vector field that is described in another coordinate system.

For example, if I describe the following vector field:

$$\newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}} \vec{F} = x\uvec{j}$$

Using spherical coordinates, I'd get:

$$\vec{F} = r\sin(\theta)\cos(\theta)\sin^2(\phi)\uvec{r} + r\cos(\theta)\cos(\phi)\sin(\phi)\sin(\theta)\uvec{φ} + r\cos^2(\theta)\sin(\phi)\uvec{θ}$$

Now if I want to find the flux of this vector field passing through the part of the sphere with radius 1 in the first octant, I would use

$$\iint_S \vec{F} \cdot d\vec{S} = \iint_S \vec{F} \cdot \vec{n} dS$$

In spherical coordinates, the normal vector of that sphere is:

$$\vec{n} = \uvec{r}$$

Both the vector field and the normal vector are expressed in spherical coordinates, the dot product results:

$$\vec{F} \cdot \vec{n} = \vec{F} \cdot \uvec{r} = r\sin(\theta)\cos(\theta)\sin^2(\phi)$$

So:

$$\iint_S \vec{F} \cdot \vec{n} dS = \iint_S r\sin(\theta)\cos(\theta)\sin^2(\phi) dS$$

The surface equation is:

$$r=1$$

Then:

$$\int_{0}^{\pi/2}\int_{0}^{\pi/2} 1\sin(\theta)\cos(\theta)\sin^2(\phi)\cdot (1^2\sin(\phi)) d\theta d\phi$$

and

$$\int_{0}^{\pi/2}\int_{0}^{\pi/2} \sin(\theta)\cos(\theta)\sin^3(\phi) d\theta d\phi = \frac 1{3}$$

However, this is not the correct result.

When the field and the surface are both in Cartesian coordinates, the procedure I used above to evaluate the integral would usually work. Could someone explain me why this not work and how would be the correct procedure to evaluate this kind of integral?

• Which convention are you using for spherical coordinates? In the first part it looks like $\phi$ is the polar angle, but then you integrate as if $\theta$ were the polar angle. – joriki Apr 8 '16 at 21:24
• $\newcommand{\uvec}[1]{\boldsymbol{\hat{\textbf{#1}}}}$ @joriki $\theta$ is the polar angle. The $\uvec{θ}$ and $\uvec{φ}$ components of the vector field were wrong. However, that didn't change the final result – felipeek Apr 8 '16 at 22:28
• I'm assuming that $\hat{\mathbf j}$ is a unit vector in the positive $y$ direction and that the polar angle is measured with respect to the positive $z$ direction. If so, the $\hat{\mathbf r}$ component should have $\sin^2\theta$, one factor of $\sin\theta$ from $x$ and one from $\hat{\mathbf j}$, no? – joriki Apr 9 '16 at 10:19
• First $\vec{n}$ needs to be a unit vector the way you described it. True , $r$ is a normal vector but not necessarily unit vector. Also could you recheck your vector field. If all written is correct i will dive in more and try to help :) – daniels_pa Apr 10 '16 at 22:07
• There is some confusion here. If $\theta$ is the polar angle, then $$\boldsymbol F = x \boldsymbol j = \frac {r \sin^2 \theta \sin 2 \phi} 2 \boldsymbol r + \frac {r \sin 2 \theta \sin 2 \phi} 4 \boldsymbol \theta + r \sin \theta \cos^2 \phi \,\boldsymbol \phi,$$ but $$\int_0^{\pi/2} \int_0^{\pi/2} F_r \sin \theta \,d\theta d\phi \bigg\rvert_{r = 1} = \frac 1 3$$ is the correct value of the surface integral. – Maxim Oct 26 '18 at 16:13