# Divergence theorem on a part of a paraboloid bounded by an ellipse

Let $$S=\{(x,y,z)\in\Bbb R^2\mid x^2+y^2=2z,x^2+y^2\le 2x\}$$. Using the divergence theorem (Gauss) compute the integral of the vector field $$F(x,y,z)=(x,y,z)$$ across the surface $$S$$ given the orientation at the point $$\left(1,0,\frac12\right)$$ with the normal $$(2,0,-2).$$

My thoughts: First, I found the boundary of the surface $$S$$: $$\begin{cases}z&=\frac{x^2+y^2}2\\x&=\frac{x^2+y^2}2 \end{cases}\implies \partial S\subset\{(x,y,z)\mid x=z\}.$$ In order to apply the divergence theorem, I considered the compact solid $$V$$ bounded by the surface $$S$$ and the ellipse in the plane $$x=z.$$ Next, $$\operatorname{div}F=2+x.$$ We can parametrize $$V$$ as \begin{aligned}V&=\left\{(x,y,z)\in\Bbb R^3\mid 0\le x\le 2,1-\sqrt{2x-x^2}\le y\le 1+\sqrt{2x-x^2}, \frac{x^2+y^2}2\le z\le x\right\}\\&=\left\{(r,\varphi,z)\mid -\frac\pi2\le\varphi\le\frac\pi2, 0\le r\le 2\cos\varphi,\frac{r^2}2\le z\le r\cos\varphi\right\}.\end{aligned} So, $$I_1=\int_0^2\int_{1-\sqrt{2x-x^2}}^{1+\sqrt{2x-x^2}}\int_{\frac{x^2+y^2}2}^x(2+x)dzdydx=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_{r^2/2}^r(2+r\cos\varphi)rdzdrd\varphi.$$ I thought the computation of the integral $$I_2$$ might simplify if we wrote it as $$I_1=I_2-I_3-I_4,$$ where $$I_2=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_0^2(2+r\cos\varphi)rdzdrd\varphi,\\ I_3=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_0^{r^2/2}(2+r\cos\varphi)rdzdrd\varphi\\ I_4=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_{r\cos\varphi}^2(2+r\cos\varphi)rdzdrd\varphi.$$ So, first, \begin{aligned}I_2&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_0^2(2+r\cos\varphi)rdzdrd\varphi\\&= 2\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}(2r+r^2\cos\varphi)drd\varphi\\&=2\int_{-\pi/2}^{\pi/2}\left(r^2+\frac{r^3}3\cos\varphi\right)\Big|_0^{2\cos\varphi}d\varphi\\&=2\int_{-\pi/2}^{\pi/2}\left(4\cos^2\varphi+\frac83\cos^4\varphi\right)d\varphi\\&=\int_0^{\pi/2}\left(16\cos^2\varphi+\frac{32}3\cos^4\varphi\right).\end{aligned} Next, \begin{aligned}I_3&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_0^{r^2/2}(2+r\cos\varphi)rdzdrd\varphi\\&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}(2+r\cos\varphi)\frac{r^3}3drd\varphi\\&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\left(r^3+\frac{r^4}2\cos\varphi\right)drd\varphi\\&=\int_{-\pi/2}^{\pi/2}\left(\frac{r^4}4+\frac{r^5}{10}\cos\varphi\right)\Big|_0^{2\cos\varphi}d\varphi\\&=\int_{-\pi/2}^{\pi/2}\left(4\cos^4\varphi+\frac{32}{10}\cos^6\varphi\right)d\varphi\\&=\int_0^{\pi/2}\left(8\cos^4\varphi+\frac{32}5\cos^6\varphi\right)\end{aligned} and \begin{aligned}I_4&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}\int_{r\cos\varphi}^2(2+r\cos\varphi)drdzdrd\varphi\\&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}(2+r\cos\varphi)r(2-r\cos\varphi)drd\varphi\\&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}(4-r^2\cos^2\varphi)rdrd\varphi\\&=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}(4r-r^3\cos^2\varphi)drd\varphi\\&=\int_{-\pi/2}^{\pi/2}\left(2r^2-\frac{r^4}4\cos^2\varphi)\right)\Big|_0^{2\cos\varphi}(8\cos^2\varphi-4\cos^6\varphi)d\varphi\\&=\int_0^{\pi/2}(16\cos^2\varphi-8\cos^6\varphi)d\varphi.\end{aligned} Unfortunately, I don't see how these integrals are more simple as I would either need to use a reduction formula/integrate by parts or expand everything. On the other hand, if we parametrize the ellipse as follows: $$\Phi(r,\varphi)=(r\cos\varphi,r\sin\varphi,r\cos\varphi),-\frac\pi2\le\varphi\le\frac\pi2,0\le r\le 2\cos\varphi,\\\partial_r\Phi\times\partial_\varphi\Phi=\begin{vmatrix}\vec i&\vec j&\vec k\\\cos\varphi&\sin\varphi&\cos\varphi\\-r\sin\varphi&r\cos\varphi&-r\sin\varphi\end{vmatrix}=r(-1,0,1),$$ so $$\int_E F\cdot dE=\int_{-\pi/2}^{\pi/2}\int_0^{2\cos\varphi}F\circ\Phi\cdot\vec N(r,\varphi)drd\varphi\ldots$$ and I encounter a similar problem again.

$$\underline{\boldsymbol{\text{Question }:}}$$ Would another solid $$V$$ or another parametrization be more convenient on an exam with a time limit?

Here is the picture in Geogebra:

I computed the surface integral of the vector field across the cylinder as well. Let \begin{aligned}C&=\left\{(x,y,z)\in\Bbb R^3\mid (x-1)^2+y^2=1,0\le z\le\frac{x^2+y^2}2\right\}\\&=\Phi(X),\end{aligned} where $$X=\left\{(\varphi,z)\mid 0\le\varphi\le 2\pi,0\le z\le 1+2\cos\varphi\right\}$$ and $$\Phi(\varphi,z)=(1+\cos\varphi,\sin\varphi,z),\\\partial_\varphi\times\partial_z=\begin{vmatrix}\vec i&\vec j&\vec k\\ -\sin\varphi&\cos\varphi&0\\0&0&1\end{vmatrix}=(\cos\varphi,\sin\varphi,0)$$ so \begin{aligned}I_5&=\int_CF\cdot dC\\&=\int_0^{2\pi}\int_0^{1+\cos\varphi}(1+\cos\varphi,\sin\varphi,(1+\cos\varphi)z)\cdot(\cos\varphi,\sin\varphi,0)dzd\varphi\\&=\int_0^{2\pi}\int_0^{1+\cos\varphi}(1+\cos\varphi)dzd\varphi\\&=\int_0^{2\pi}\left(1+2\cos\varphi+\frac{1+\cos(2\varphi)}2\right)d\varphi\\&=\frac{3\pi}2.\end{aligned} For the disc in the $$xy$$ plane \begin{aligned}D&=\left\{(x,y,0)\in\Bbb R^2\mid x=1+\cos\varphi,y=\sin\varphi,0\le\varphi\le 2\pi,0\le r\le 1\right\},\end{aligned} I got \begin{aligned}I_6&=\int_0^{2\pi}\int_0^1(1+r\cos\varphi,r\sin\varphi,0)\cdot(0,0,r)=0.\end{aligned} If I were working with the compact solid below the paraboloid, I would have to take into account the "wrong" orientation of the surface $$S.$$ And now the final integral equals $$I=-(I_2-I_5-I_6)$$ and out of all integrals I wrote in the post, $$I_2$$ is fairly easy to compute.