## Proof of Identity for div (f grad g - g grad f)

Theorem
If
$f(x,y,z), g(x,y,z)$
are differentiable functions then
$\mathbf{\nabla} \cdot (f \nabla g - g \nabla f )= f \nabla^2 g- g \nabla^2 f$

Proof
\begin{aligned} \mathbf{\nabla} \cdot (f \nabla g - g \nabla f ) &= \mathbf{\nabla} \cdot (f (\frac{\partial g}{\partial x} + \frac{\partial g}{\partial y} + \frac{\partial g}{\partial z} )) - g(\mathbf{\nabla} \cdot (\frac{\partial g}{\partial x} + \frac{\partial g}{\partial y} + \frac{\partial g}{\partial z} )) \\ &= \frac{\partial}{\partial x} (f \frac{\partial g}{\partial x} ) + \frac{\partial}{\partial y} (f \frac{\partial g}{\partial y} )+ \frac{\partial}{\partial z} (f \frac{\partial g}{\partial z} ) - \frac{\partial}{\partial x} (g \frac{\partial f}{\partial x} ) \\ &- \frac{\partial}{\partial y} (g \frac{\partial f}{\partial y} )+ \frac{\partial}{\partial z} (g \frac{\partial f}{\partial z} ) \\ &= \frac{\partial f}{\partial x}\frac{\partial g}{\partial x}+ f \frac{\partial^2 f}{\partial x^2} + \frac{\partial f}{\partial y}\frac{\partial g}{\partial y}+ f \frac{\partial^2 g}{\partial y^2} + \frac{\partial f}{\partial z}\frac{\partial g}{\partial z}+ f \frac{\partial^2 g}{\partial z^2} \\ &- \frac{\partial g}{\partial x}\frac{\partial f}{\partial x}- g \frac{\partial^2 f}{\partial x^2} - \frac{\partial g}{\partial y}\frac{\partial f}{\partial y} - g \frac{\partial^2 f}{\partial y^2} - \frac{\partial g}{\partial z}\frac{\partial f}{\partial z}- g \frac{\partial^2 f}{\partial z^2} \\ &= f( \frac{\partial ^2 g}{\partial x^2} + \frac{\partial ^2 g}{\partial y^2} + \frac{\partial ^2 g}{\partial z)^2})-g( \frac{\partial ^2 f}{\partial x^2} + \frac{\partial ^2 f}{\partial y^2} + \frac{\partial ^2 f}{\partial z)^2}) \\ &= f \nabla^2 g- g \nabla^2 f \end{aligned}