# Why can we apply the divergence Theorem?

I'm currently stuck on a problem where I need to calculate the flux of a vector field through an upper hemisphere. It seems pretty straightforward, and I've seen similar problems on this forum being solved by integrating over the volume, using spherical coordinates, etc. My question is, why can we even apply the Divergence Theorem, which is as follows: $$\int_U\operatorname{div}Fdx=\int_{\partial U}FdS$$ Now if my $$U$$ is the upper half of a ball, shouldn't the boundary of $$U$$ be the hemisphere plus the area $$A={x^2+y^2?
How is that considered when applying the Theorem?

The question: Calculate the flux of the vector field $$F:\mathbb{R}^3\to \mathbb{R}^3, F(x,y,z)=(z^2x,\frac{1}{3}y^3+\tan{z},x^2z+y^2)$$ through the upper half of the sphere $$M=\{(x,y,z)\in \mathbb{R}^3|x^2+y^2+z^2=1, z>0\}$$

I've now made the following calculations:

$$\int\limits_MFdS=\int\limits_{B_1(0), z>0}\nabla Fdx-\int\limits_AFdS$$

For the first integral, spherical Coordinates give a parameterization, where $$r\in(0,1), \phi \in(0,2\pi), \theta \in (0,\frac{\pi}{2})$$. For the second integral, $$\nu=(0,0,-1)$$ and $$f(r,\psi)=(r\cos(\psi),r\sin(\psi),0)$$ is a parameterization for A. Therefore the above integral becomes

$$\int\limits_{0}^{1}\int\limits_{0}^{\frac{\pi}{2}}\int\limits_{0}^{2\pi}r^2\cdot r^2\cdot sin{(\theta)}d\phi d\theta dr-\int\limits_{0}^{1}\int\limits_{0}^{2\pi}-r^2\cdot sin^2{\psi}\cdot rd\psi dr$$, which evaluates to $$\frac{13}{20}\pi$$.

Where r is the determinant of $$(Df^TDf)$$

Is this correct?

• Could you state the problem exactly? There are several ambiguities here which make it hard to answer. Dec 4, 2022 at 14:01

In this case, the Divergence Theorem says that

$$\iiint_U \operatorname{div} F \, dV = \iint_M F \cdot dS + \iint_A F \cdot dS$$

where $$A$$ and $$M$$ are both oriented with outward-pointing normal vectors (i.e., $$M$$ is oriented with upward-pointing normal and $$A$$ with downward-pointing normal).

In other words,

$$\iint_M F \cdot dS = \iiint_U \operatorname{div} F \, dV - \iint_A F \cdot dS$$

and so you can compute the flux you want if you know both the integral of the divergence and the flux over the remainder of the boundary.

In the case of your specific problem, the $$\tan z$$ in the second component of $$F$$ is troublesome if you try to compute the left-hand integral directly, but magically vanishes from both right-hand integrals.

• thank you, this helped. Dec 4, 2022 at 14:18
• I've made an edit where I showed my calculations, it'd be great if you could check them for mistakes :) Dec 4, 2022 at 15:30