# Calculate $\int_S \vec{A} \cdot \hat{n} \ dS, S=\{x^2+y^2+z^2=R^2, z \ge 0\}$

Calculate $$\int_S \vec{A} \cdot \hat{n} \ dS$$

$$\vec{A}=4 \hat{i}$$

Using spherical coordinates:

\begin{cases} \hat{r}=\sin \theta \cos \phi \ \hat{i} + \sin \theta \sin \phi \ \hat{j}+ \cos \theta \ \hat{k} \\ \hat{\theta}=\cos \theta \cos \phi \ \hat{i} + \cos \theta \sin \phi \ \hat{j}- \sin \theta \ \hat{k} \\ \hat{\phi}=-\sin \phi \ \hat{i} + \cos \phi \ \hat{j} \end{cases}

Considering:

$$\hat{n}=\hat{r}$$

$$\hat{r} \cdot \hat{i}=\sin \theta\cos \phi$$

Jacobian determinant: $$r^2 \ \sin \theta$$

The surface integral:

$$\int_S \vec{A} \cdot \hat{n} dS=\int_0^{\frac{\pi}{2}} \left( \int_0^{2 \pi} R^2 \sin \theta (4 \sin \theta \cos \phi) \ d\phi \right) d\theta$$

$$\int_0^{2 \pi} \cos \phi=0$$

Then:

$$\int_S \vec{A} \cdot \hat{n} \ dS=0$$

Is it correct?

Can I apply the Divergence theorem in this case?

Thanks!

It is correct (at least from a quick glance), and yes, you could have applied the divergence theorem by noting that $$A = \nabla f$$ where $$f(x, y, z) = 4x$$ The integral of $f$ over the solid ball (which the div. theorem would have you compute) is evidently zero, because the half-ball ($z \ge 0$) has a reflection symmetry through the plane $x = 0$, while the integrand, $f$, changes sign under this symmetry. But you'd need to take into account the integral of $A$ over the other part of the boundary of the half-ball (the disk $x^2 + y^2 = R^2, z = 0$), and see that this, too, is zero, before the job would be complete. [It's easy, because $A$ and the surface normal are orthogonal on that disk, but still...you have to do it.]