Prove the curvature of a level set equals divergence of the normalized gradient Suppose we have a function $\phi : \mathbb{R}^2 \to \mathbb{R}$, and a curve $\gamma:\mathbb{R}\to\mathbb{R}^2$ defined by a level set of $\phi$, ie. the codomain of $\gamma$ is $\{(x,y)\mid\phi(x,y)=C\}$ for a given constant $C$.
Edit: assume that $\gamma$ is parameterized by arc length, so $\left\|\gamma'(s)\right\|=1.$
The curvature of $\gamma$ is defined as
$$\kappa(s)\equiv\left\|T'(s)\right\|=\left\|\gamma''(s)\right\|\,\,.$$
Show that it can also be written as
$$\kappa(s) = \left|\nabla\cdot\left(\frac{\nabla \phi}{\left|\nabla\phi\right|}\right)\right|$$
where $\phi=\phi\left(\gamma(s)\right)$.
(Note: not a homework problem.  I came across this while watching a youtube video on Level Set Methods)
 A: From $\| \gamma'(s) \| = 1$, it follows that $$0 = \frac{d}{ds} \langle \gamma'(s),\gamma'(s) \rangle = 2\langle \gamma''(s),\gamma'(s)\rangle.$$
So $\gamma'$ and $\gamma''$ are perpendicular. Assume that $\gamma''(s) \neq 0$. Thus $N(s) := \gamma''(s)/\|\gamma''(s)\|$ locally defines a unit normal field to $\gamma$. Since $\gamma$ parametrizes a level set of $\phi$ and $\nabla \phi$ is orthogonal to its level sets it follows that $\nabla \phi / \|\nabla \phi\|(\gamma(s)) = \pm N(s)$. Consequently 
$$\kappa(s) = \|\gamma''(s)\| = |\langle \gamma''(s),N(s)\rangle| = |\frac{d}{ds} \langle \gamma'(s),N(s)\rangle - \langle \gamma'(s),\frac{d}{ds}N(s)\rangle| = |\langle \gamma'(s),\frac{d}{ds} N(s)\rangle|.$$
Since $\left\|N(s)\right\| = 1$ it follows as for $\gamma'$ that $\langle N,\frac{dN}{ds} \rangle = 0$, thus $\frac{dN}{ds}$ is a multiple of $\gamma'$ and $\left\|\frac{dN}{ds}\right\| = |\langle \gamma'(s),\frac{dN}{ds}\rangle|$. Thus 
$$\kappa(s) = \left\|\frac{dN}{ds}(s)\right\| = \left\|\frac{d}{ds} \frac{\nabla \phi}{\|\nabla \phi\|}\right\|.$$
Thus it remains to see that $|\nabla \cdot N| = \left\|\frac{dN}{ds}\right\|$: For this one needs the following fact: Let $\{b_i\}$ be an orthonormal basis of $\mathbb R^n$. Then $$\nabla \cdot X = \sum_{i = 1}^n \langle DX(b_i),b_i\rangle$$
for any vectorfield $X : \mathbb R^n \to \mathbb R^n$ with differential $DX$.
Unfortunately (via google) I did not find a reference for this Edit: Using Riemannian geometry this follows since divergence is defined as the trace of the Levi Civita connection  $\nabla$, which on $\mathbb R^n$ is given by $\nabla_XY = DY(X)$ for vector fields $X,Y$. From this we see
$$\left\|\frac{dN}{ds}(s)\right\| = \langle \gamma'(s),\frac{dN}{ds}(s)\rangle = \langle \gamma'(s),DN(\gamma'(s))\rangle + \langle N(s),DN(N(s))\rangle = \nabla \cdot N(s).$$
By $DN$ we mean the differential of $N$ (note that strictly speaking this does not exists, as $N$ is only defined along $\gamma$. But we can extend $N$ to a vectorfield defined on an open subset using $N = \pm \nabla \phi/||\nabla \phi||$ as above). The second equality holds since $\langle N,DN(X))\rangle = 1/2\partial_X\langle N,N \rangle = 0$ for any vector field $X$ ($\partial_X$ denotes the directional derivative in direction $X$).
Maybe these calculations are more complicated than they could be, but I don't see a simplification right away.
A: Here is another proof.
Let $\gamma$ be the arc-length parametrization of a level set of $\phi$. Since $\phi\circ \gamma$ is constant, we have
$$\nabla \phi \cdot \dot\gamma=0.$$
Taking a second derivative gives
$$\dot \gamma ^{T} \cdot \nabla^2\phi \cdot \dot\gamma+ \nabla \phi \cdot  \ddot\gamma=0,$$
where $$\nabla^2\phi =\begin{pmatrix} \phi_{xx} & \phi_{xy}\\ \phi_{xy} & \phi_{yy}\end{pmatrix}$$
is the Hessian of $\phi$. Since $\nabla \phi \perp \dot \gamma $, and $\ddot\gamma \perp\dot \gamma$, we have $\nabla \phi \cdot \ddot\gamma= \pm |\nabla \phi| |\ddot \gamma|$. Therefore,
$$\kappa =|\ddot \gamma|= \frac{|\dot \gamma ^{T} \cdot \nabla^2\phi \cdot \dot\gamma|}{|\nabla \phi|}.$$
Finally, note that $\dot \gamma = \pm \frac{(\phi_y,-\phi_x)}{|\nabla \phi|}$, since $\dot \gamma\perp\nabla \phi$. Altogether,
$$\kappa=\frac{|\phi_{xx}\phi_y^2-2\phi_x\phi_y\phi_{xy}+\phi_{yy}\phi_x^2|}{|\nabla \phi|^3}.$$
This expression is precisely $|\nabla \cdot \frac{\nabla \phi}{|\nabla \phi|}|$. See Divergence of Gradient of the Unit Normal, and Curvature Equation.
