Solution (source code)

= Solution

Compute the <curl> component by component from the given <vector field>:
$$
\boxed{B=\nabla\times A=(2xz,\ 2yz,\ 2(1-z^2)).}
$$
For example, $B_x=\partial_y A_z-\partial_z A_y=0-(-2xz)$ and $B_z=\partial_x A_y-\partial_y A_x=(1-z^2)-(z^2-1)$. Its <divergence> is
$$
\boxed{\nabla\cdot B=2z+2z-4z=0,}
$$
as expected because the <divergence of a curl is zero>.

Take $C$ counterclockwise when viewed from positive $z$, the <disc> $D$ upward oriented, and the <hemisphere> $H$ outward oriented. These choices give both <surfaces> the same positive boundary orientation. Parametrize $C$ by $r(t)=(\cos t,\sin t,0)$, $0\leq t\leq2\pi$. On it, $A=(-\sin t,\cos t,0)$ and $dr=(-\sin t,\cos t,0)\,dt$, so the <line integral> is
$$
\boxed{\oint_C A\cdot dr=\int_0^{2\pi}1\,dt=2\pi.}
$$
On $D$, use <polar coordinates> $(x,y)=(r\cos\phi,r\sin\phi)$ and $d\mathbf S=(0,0,1)r\,dr\,d\phi$. Since $B_z=2$ there, the <surface flux> is
$$
\boxed{\int_D B\cdot d\mathbf S=\int_0^{2\pi}\int_0^1 2r\,dr\,d\phi=2\pi.}
$$
On the unit <hemisphere>, the outward <unit normal vector> is $n=(x,y,z)$. Since $x^2+y^2=1-z^2$, we have $B\cdot n=4z(1-z^2)$. In <spherical polar coordinates>, $z=\cos\theta$ and $dS=\sin\theta\,d\theta\,d\phi$, giving the explicit <surface integral>
$$
\boxed{\int_H B\cdot d\mathbf S=\int_0^{2\pi}\int_0^{\pi/2}4\cos\theta\sin^3\theta\,d\theta\,d\phi=2\pi.}
$$
Indeed the inner <integral> is $[\sin^4\theta]_0^{\pi/2}=1$.

These equalities illustrate <Stokes theorem> twice: $B=\nabla\times A$ and either upward $D$ or outward $H$ spans the oriented <circle> $C$, so each <surface flux> equals the same <line integral>. For the <divergence theorem>, close the upper half-ball by adjoining the downward oriented base, namely $-D$. Its outward <surface flux> is
$$
\int_{H\cup(-D)}B\cdot d\mathbf S=2\pi-2\pi=0=\int_V\nabla\cdot B\,dV.
$$
The minus sign on the base is required because its outward <normal vector> points down. Reversing a specified orientation reverses that integral's sign.