What is the expression of mean curvature on a torus?

Let $(x,y,z)$ be the standard Cartesian coordinates of $\mathbb{R}^3$.

For a ball of radius $R$ we know its sphere can be represented by the level set $$ x^2 + y^2 + z^2 - R^2 = 0 $$ and the mean curvature vector on the sphere is $$ \frac{1}{R^2} (x,y,z) $$ The mean curvature vector is defined as the mean curvature $1/R$ times the outer unit normal $(x,y,z)/R$ on the surface.

Let us consider a torus surface represented by the level set $$ \left( \sqrt{x^2 + y^2} - R \right)^2 + z^2 - r^2 = 0 $$ where $R$ is the distance from the center of the tube to the center of the torus, and $r$ is the radius of the tube.

Analogously, what is the explicit expression (as a function of $x,y,z,R,r$) of the mean curvature vector on the torus surface?


The unit normal to a level set $f(x,y,z)=0$ will always be

$$\hat{n} = \frac{\nabla f}{|\nabla f|}$$

And the mean curvature will always be

$$H = -\frac{1}{2}\nabla\cdot \hat{n} = \frac{\nabla f \cdot (\nabla f \cdot \nabla)\nabla f}{2|\nabla f|^3} - \frac{\Delta f}{2|\nabla f|}$$

As a start the normal vector to your chosen embedding of the torus would be

$$\nabla f = 2(x,y,z) - \frac{2R}{\sqrt{x^2+y^2}}(x,y,0)$$

$$\frac{|\nabla f|^2}{4} = x^2+y^2+z^2 - 2R \sqrt{x^2+y^2} + R^2 = r^2$$

$$\implies \hat{n} = \frac{(x,y,z)}{r} - \frac{R(x,y,0)}{r\sqrt{x^2+y^2}}$$

and since $|\nabla f|$ is constant, we can use the simplified formula $H = -\frac{\Delta f}{2 |\nabla f|}$

$$H = -\frac{1}{2}\nabla\cdot\hat{n} = -\frac{1}{2}\left(\frac{3}{r} -\frac{2R}{r\sqrt{x^2+y^2}} + \frac{R}{r\sqrt{x^2+y^2}}\right) = \frac{R-3\sqrt{x^2+y^2}}{2r\sqrt{x^2+y^2}}$$