# Divergence of Gradient of the Unit Normal, and Curvature Equation

The curvature equation for implicit functions, level sets is usually given in two forms: one is the divergence of the gradient of the unit normal:

$\kappa = \bigtriangledown \cdot \frac{\bigtriangledown \phi}{|\bigtriangledown \phi|}$

and the other is

$\kappa = \frac{\phi_{xx}\phi_y^2 - 2\phi_x\phi_y\phi_{xy} + \phi_{yy}\phi_x^2}{(\phi_x^2+\phi_y^2)^{3/2}}$

How do we derive the second equation from the first?

-
Related: the first equation is discussed here. – Garrett Mar 11 '14 at 6:54

Just expand in coordinates: \begin{align}\kappa &= \nabla \cdot \frac{\nabla \phi}{|\nabla \phi|} = \nabla \cdot \frac{(\phi_x,\phi_y)}{\sqrt{\phi_x^2+\phi_y^2}}\\ &=\left(\partial_x \frac{\phi_x}{\sqrt{\phi_x^2+\phi_y^2}}\right)+ \left(\partial_y \frac{\phi_y}{\sqrt{\phi_x^2+\phi_y^2}}\right) \\ &= \frac{\phi_{xx}}{\sqrt{\phi_x^2+\phi_y^2}} - \frac{\phi_x (\phi_x\phi_{xx}+\phi_y\phi_{xy})} {(\phi_x^2+\phi_y^2)^{3/2}} + \frac{\phi_{yy}}{\sqrt{\phi_x^2+\phi_y^2}} - \frac{\phi_y(\phi_x\phi_{xy}+\phi_y\phi_{yy})} {(\phi_x^2+\phi_y^2)^{3/2}} \\ &= \frac{\phi_{xx}(\phi_x^2+\phi_y^2) - \phi_x (\phi_x\phi_{xx}+\phi_y\phi_{xy}) +\phi_{yy}(\phi_x^2+\phi_y^2) - \phi_y(\phi_x\phi_{xy}+\phi_y\phi_{yy})}{(\phi_x^2+\phi_y^2)^{3/2}}\\ &= \frac{\phi_{xx}\phi_y^2 - 2\phi_x\phi_y\phi_{xy} + \phi_{yy}\phi_x^2}{(\phi_x^2+\phi_y^2)^{3/2}} \end{align}
$\triangledown \cdot$ is divergence operator I assume, is that why the result of $\partial_x(..)$ and $\partial_y(..)$ are added to eachother? – BB_ML Mar 24 '11 at 15:34
@user6786: yes $\nabla \cdot (f_1(x,y), f_2(x,y))$ is a common notation for the divergence $\partial_x f_1(x,y) + \partial_y f_2(x,y)$. One thinks about $\nabla$ as denoting the "vector" $(\partial_x , \partial_y)$ and then taking the inner product. – Fabian Mar 24 '11 at 15:36