Divergence theorem is not working for this example

divergence-theoremmultivariable-calculusparametrizationsurface-integrals

I'm trying to compute the flux of $F=(x+y,y,z^2)$ across the surface $S$ of equation $z=x^2+y^2$ between the two planes $z=1$ and $z=2$ with the plain definition $\int \int_{S} F \cdot n dS$ and with the divergence theorem


  • With the definition of surface integral

I write the parametrization of the lateral surface $S_1$ with $\sigma(z,\theta)=(z \cos(\theta), z \sin(\theta),z)$, where $(z,\theta) \in [1,2] \times [0,2 \pi)$.

$\int_{S_1}F \cdot n dS = \int_{0}^{2 \pi} \int_{1}^2 (z(\cos(\theta) + \sin(\theta)),z \sin(\theta),z^2) \cdot (z \cos(\theta), z \sin(\theta),-z) dzd \theta = \frac{14}{3} \pi – \frac{15}{2} \pi$

$\sigma$ is only a parametrization for the lateral surface of $S$: I need to fill also the two cuts on the upper part $S_2$ and lower part $S_3$.

$S_1$ it's parametrized by $(\rho,\theta)$ polar coordinates with $\rho \in(0,2)$ and $\theta \in [0,2 \pi)$.

By integration, I obtain that $$\int \int_{S_2}F \cdot n dS = 16\pi$$ while $$\int \int_{S_3}F \cdot n dS = \pi$$

So the net flux is $$\frac{14}{3} \pi – \frac{15}{2} \pi + 16 \pi + \pi$$

  • Using the divergence theorem

Here the volume $V$ is described by $V=\{x^2+y^2 \leq z^2, z \in [1,2] \}$. By divergence thm, we know that $$\int_{S} F \cdot n dS = \int \int \int_{V} \text{div}(F) dxdydz = \int \int \int_V 2+2z = 2 \text{Vol(V)}- 2 \int \int \int_V z dxdydz$$.

The volume is $\text{Vol(V)}= \int_1^2 \int_{B_{\sqrt{z}}(0,0)}dxdy dz = \frac{7}{3} \pi$

The other term is $2 \int \int \int_V z dxdydz = 15 \pi $ so the net flux is $$\frac{14}{3} \pi -15 \pi$$

which is different from the previous one (and also negative). I can't spot any error in my computations/reasoning: where am I wrong?

Best Answer

The theorem works: as @Ian wrote in his comment, the flux across the lower surface must be negative. The right computation is $$\int \int_{S_3}(x+y,y,z^2) \cdot n dS = \int_0^{2 \pi} \int_0^1(*,*,1) \cdot(0,0,-\rho)d\rho d\theta = - \pi$$ since $S_3$ has radius $1$. Notice that the outward normal is pointing out, while yours is probably pointing inside the volume $V$ defined by your surface. The other flux across $S_1$ is $16 \pi$, which can be done as the one above. That said, your net flux using the definition is $\frac{14}{3} \pi - \frac{15}{2} \pi + 16 \pi - \pi = \frac{14}{3} \pi + \frac{15}{2}\pi$

There's another problem in your divergence: that integral is $$\int \int \int_V 2 + 2z dxdydz = \int_1^2 \int_{B_z(0,0)}2+2z dxdydz =[\ldots ] = \frac{14}{3} \pi +\frac{15}{2} \pi$$ which confirms the previous result.