# Flux of vector field across surface via divergence theorem and directly

There is vector field $$F = [x,y,-z]$$. We need to find the flux of the vector field outward across the given surface $$\sigma=x^2+y^2+z^2=1, x\ge0, y\ge0, z\ge0$$ directly and by using Gauss theorem (i.e. $$\iiint\limits_V\mathrm{div}\,\mathbf{F}\,dV=\iint\limits_{S}\!\!\!\!\!\!\!\!\!\!\!\;\!\!\;\subset\!\!\supset\mathbf F\cdot\mathbf{n}\,dS$$).

In this case the surface is just a sphere.

So, any explanation how to calculate the flux by two ways are highly welcomed. According to Andrei's answer below: $$\int_{0}^{\pi}sin\theta d\theta \int_{0}^{2\pi}d\phi=2*2\pi=4\pi$$, right?

• It's hard to know what you are asking. Do you know how to calculate divergence of $F$? There is a triple integral and a surface integral. Are you having trouble with one or both of these? In what way? – saulspatz May 20 '19 at 20:03
• @saulspatz Thank you, I know how to calculate the divergence of $F$. First of all I need to calculate the flux through all parts of the surface. – Mikhail Gaichenkov May 20 '19 at 20:19

The normal to the surface is $$\mathbf n=[x,y,z]$$, where $$x^2+y^2+z^2=1$$. Then $$\mathbf F\cdot\mathbf n=x^2+y^2-z^2=1-2z^2$$. Then I would use polar coordinates: $$\mathbf F\cdot\mathbf n = 1-2\cos^2\theta$$ and $$ds=\sin\theta d\theta d\phi$$. The integration over $$\phi$$ is from $$0$$ to $$2\pi$$, and the integration of $$\theta$$ is from $$0$$ to $$\pi$$. Can you finish this?
• Thanks, the integral is $4\pi$, right? What is the divergence part? And how did you get $1-2z^2$, could you explain please? – Mikhail Gaichenkov May 22 '19 at 21:04
• Volume of a sphere is $4\pi/3$. The divergence part is the other method to solve the problem (other than the surface integral). $\mathrm{div} \mathbf F=1$. The $1-2z^2$ comes from $x^2+y^2-z^2=x^2+y^2+z^2-2z^2$. And you have $x^2+y^2+z^2=1$ on the surface. – Andrei May 22 '19 at 21:23
• Well, so $1*4\pi/3=4\pi/3$ On the other hand the integration over $\phi$ and $\theta$ results in just $4\pi$. What to take into account else? – Mikhail Gaichenkov May 23 '19 at 19:52
• I've forgot to put a square symbol for $\cos\theta$ term. It's $z^2$, so the expression to integrate is $1-2\cos^2\theta$. Integral over $1$ will give $4\pi$, and you have the integral $\int_0^\pi \cos^2\theta\sin\theta d\theta=2/3$. Integral over $\phi$ is $2\pi$, so the answer is $4\pi-2\cdot2\pi\cdot\frac 23=\frac 43\pi$ – Andrei May 23 '19 at 20:55