# 高斯公式（散度定理）

1，定理（高斯公式，散度公式）：设 $$S$$ 空间闭曲面， $$V$$ 为其围成的立体，$$P,Q,R$$ 且有一阶连续偏导数，则 $\oint_SP(x,y,z)dydz+Q(x,y,z)dzdx+R(x,y,z)dxdy=\iiint_V\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial Q}{\partial z}\right)dxdydz$

$\oint_S\vec{F}\cdot\vec{n}dS=\iiint_V\text{div}\vec{F}dv$

$\iint_SR(x,y,z)dxdy=\iint_SR(x,y,z)\vec{k}\cdot\vec{n}dS=\iint_SR(x,y.z)\cos\gamma dS$

\begin{align*}\oint_SR(x,y,z)dxdy&=\int_{S_1}R(x,y,z)dxdy+\int_{S_2}R(x,y,z)dxdy\\ &=\int_{S_1}R(x,y,z)\vec{k}\cdot\vec{n}dS+\int_{S_2}R(x,y,z)\vec{k}\cdot\vec{n}dS\\ &=-\iint_{D_{xy}}R(x,y,g_1(x,y))dxdy+\iint_{D_{x,y}}R(x,y,g_2(x,y))dxdy\end{align*}

\begin{align*}\oint_SR(x,y,z)dxdy&-\iint_{D_{xy}}R(x,y,g_1(x,y))dxdy+\iint_{D_{x,y}}R(x,y,g_2(x,y))dxdy\\ &=\iint_{D_{xy}}(R(x,y,g_2(x,y))-R(x,y,g_1(x,y)))dxdy\\ &=\iint_{D_{xy}}\frac{\partial R}{\partial z}\Big|_{g_1(x,y)}^{g_2(x,y)}dxdy=\iint_{D_{x,y}}\int_{g_1(x,y)}^{g_2(x,y)}\frac{\partial R}{\partial z}dzdxdy\\ &=\iiint_V\frac{\partial R}{\partial z}dV\end{align*}

\begin{align*}\oint_S(x-y)dxdy+(y-z)xdydz&=\iiint_V\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial R}{\partial z}\right)dV\\ &=\iiint_V\left(\frac{\partial }{\partial x}((y-z)x)+\frac{\partial }{\partial z}(x-y)\right)dV\\ &=\iiint_V(y-z)dV\end{align*}

\begin{align*}\iiint_V(y-z)dV&=\int_0^{2\pi}\int_0^1\int_0^3(r\sin \theta-z)rdzdrd\theta\\ &=\int_0^{2\pi}\int_0^1\left(r^2\sin\theta z-\frac{1}{2}rz^2\right)\Big|_0^3drd\theta\\ &=\int_0^{2\pi}\int_0^1\left(3r^2\sin\theta-\frac{9}{2}r\right)drd\theta\\ &=\int_0^{2\pi}\left(r^3\sin\theta-\frac{9}{4}r^2\right)\Big|_0^1d\theta\\ &=\int_0^{2\pi}\left(\sin\theta-\frac{9}{4}\right)d\theta=\left(-\cos\theta-\frac{9}{4}\theta\right)\Big|_0^{2\pi}\\ &=-\frac{9}{2}\pi\end{align*}

\begin{align*}\iint_S+\iint_{S_1}&=-\iiint_V\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial Q}{\partial z}\right)dxdydz\\ &=\iiint_V(-x^2-y^2+4)dV\end{align*}

\begin{align*}\iiint_V(-x^2-y^2+4)dV&=\int_0^{2\pi}\int_0^2\int_{r^2}^4(4-r^2)rdzdrd\theta\\ &=\int_0^{2\pi}\int_0^2\int_{r^2}^4r(4-r^2)z\Big|_{r^2}^4drd\theta\\ &=\int_0^{2\pi}\int_0^2\int_{r^2}^4r(16-8r^2+r^4)drd\theta\\ &=\int_0^{2\pi}\int_0^2(8r^2-2r^4+\frac{1}{6}r^6)\Big|_0^2d\theta=\frac{32}{5}\theta\Big|_0^{2\pi}\\ &=\frac{64}{5}\pi\end{align*}

$\iint_{S_1}\left(-\frac{1}{3}x^3+e^{z^2}dydz+\left(-\frac{1}{3}y^3+x\tan z\right)dzdx+4zdxdy\right)=-\iint_{x^2+y^2\le 4}16dxdy=-16\cdot 4\pi$

\begin{align*}\iint_S\left(-\frac{1}{3}x^3+e^{z^2}\right)dydz&+\left(-\frac{1}{3}y^3+x\tan z\right)dzdx+4zdxdy\\ &=-\iiint_V\left(\frac{\partial P}{\partial x}+\frac{\partial Q}{\partial y}+\frac{\partial Q}{\partial z}\right)dxdydz\\ &\quad-\iint_{S_1}Pdydz+Qdzdx+Rdxdy\\ &=-\frac{64}{5}\pi+64\pi=\frac{256}{5}\pi\end{align*}