# Vector analysis: Calculate the flux of the vector field S

$\mathbf{A}(x,y,z)= (\frac{-6x}{x^2+y^2},{-6y}{x^2+y^2},z+1)$

$S: x^2+4y^2=4, 0 \leq z \leq 1$

The task is to calculate the flux away from the z-axis.

Solution: The divergence theorem obviously doesn't apply in this case so we are left with using the formula:

$I= \iint_S \mathbf{A}(x,y,z) \cdot \hat{n} dS$

but we can also write it as:

$I= \int_z \int_{\theta} \mathbf{A}(\theta , z) \cdot \mathbf{r}_{\theta} \times \mathbf{r}_z d \theta dz$

If we let

$\mathbf{r}(\theta, z)= (2cos(\theta),sin(\theta),z)$

we get

$\mathbf{r}_\theta \times \mathbf{r}_z = (cos(\theta),2sin(\theta),0)$

We rewrite $\mathbf{A}$ in terms of $\theta$ and $z$:

$\mathbf{A}(\theta,z)= (\frac{-12cos(\theta)}{1+3cos^2(\theta)},\frac{-6sin(\theta)}{1+3cos^2(\theta)},z+1)$

We can now begin calculating the integral $I$. I simplify the integrand and finally get:

$I= -12 \cdot \int_0^1 \int_0^{2\pi} \frac{1}{1+3cos^2(\theta)} d\theta dz$

How do I solve this integral? I have done Calculus 1-3 but I don't remember doing this integral. Keep in mind Wolfram Alpha says the integral is $-12\pi$ which is the correct solution to this problem.

Is their an easier way of solving this flux problem?

• See math.stackexchange.com/questions/2470822/… for an alternative method to @froggie's clever observation (his posted solution). BTW, my original (unposted) approach would have been to use en.wikipedia.org/wiki/Tangent_half-angle_substitution (e.g., second example) to transform the trigonometric integral into an integral of a rational function, but that was less neat than either approach (I would have residue theorem at that point), – peter a g Oct 13 '17 at 20:56
• ... look at the comments in the posted solutions to the above post for missing details. – peter a g Oct 13 '17 at 21:02

I think there are probably lots of ways to see that $$\int_0^{2\pi}\frac{1}{1 + 3\cos^2\theta}\,d\theta = \pi.$$ Below I'm going to compute it using a double integral, but if you know some complex analysis you could also use the residue theorem to compute the integral. And while I don't see one off the top of my head, I wouldn't be surprised if there's some useful substitution you could make to evaluate it.
Let $R$ be the ellipse $4x^2 + y^2\leq 4$ in the $xy$-plane. The area of this ellipse is $2\pi$, so $$2\pi = \iint_R 1\,dA.$$ Let's see what happens when we write this double integral out in polar coordinates. The equation describing the boundary of the ellipse in polar coordinates is $$4 = 4x^2 + y^2 = 4r^2\cos^2\theta + r^2\sin^2\theta.$$ Solving for $r$ in this equation gives $$r = \frac{2}{\sqrt{4\cos^2\theta + \sin^2\theta}} = \frac{2}{\sqrt{1+3\cos^2\theta}}.$$ Therefore, in polar coordinates our integral becomes $$2\pi = \iint_R 1\,dA = \int_0^{2\pi}\int_0^{2/\sqrt{1+3\cos^2\theta}}r\,dr\,d\theta = \int_0^{2\pi}\frac{2}{1+3\cos^2\theta}\,d\theta.$$ Dividing both sides by 2 gives the desired identity $$\pi =\int_0^{2\pi}\frac{1}{1 + 3\cos^2\theta}\,d\theta.$$
Finally, I should say that you could use the divergence theorem if you like (though I'm not sure it would necessarily make the integrals easier). For instance, you might use the divergence theorem on the region of space defined by the inequalities $$x^2 + y^2\geq 1,\,\, x^2+4y^2\leq 4,\,\, 0\leq z\leq 1.$$ Might be worth trying.