## Magic angles

The function ${u(x, y, z) = 2z^2 - x^2 - y^2}$ is notable for the following combination of properties:

1. It is a harmonic function: ${\Delta u = -2 - 2 + 4 = 0}$
2. It vanishes at the origin ${(0, 0, 0)}$ together with its gradient.
3. It is positive on the cone ${C=\{(x, y, z) : z > \sqrt{(x^2+y^2)/2}\}}$

The cone C has the opening angle ${\theta_3 = \cos^{-1}(1/\sqrt{3}) \approx 57.4^\circ}$ which is known as the magic angle in the context of NMR spectroscopy. Let us consider the mathematical side of its magic.

If C is replaced by any larger cone, the properties 1-2-3 cannot be satisfied by a harmonic function in a neighborhood of the origin. That is, C is the largest cone such that a harmonic function can have a critical point at its vertex which is also a point of its extremum on the cone. Why is that?

Let ${u}$ be a harmonic function in some neighborhood of ${(0,0,0)}$ and suppose ${u(0,0,0)=0}$, ${\nabla u(0,0,0) = 0}$, and ${u>0}$ on some cone ${C = \{(x, y, z) \colon z>c \sqrt{x^2+y^2+z^2} \}}$. Expand ${u}$ into a sum of polynomials ${p_2+p_3+\cdots }$ where each ${p_k}$ is a harmonic homogeneous polynomial of degree ${k}$. Let ${m}$ be the smallest integer such that ${p_m}$ is not identically zero. Then ${p_m}$ has the same properties as ${u}$ itself, since it dominates the other terms near the origin. We may as well replace ${u}$ by ${p_m}$: that is, ${u}$ is a spherical harmonic from now on.

Rotating ${u}$ around the ${z}$-axis preserves all the properties of interest: harmonic, positive on the cone, zero gradient at the origin. Averaging over all these rotations we get a rotationally symmetric function known as a zonal spherical harmonic. Up to a constant factor, such a function is given by ${P_m(\cos \phi)}$ where ${\phi}$ is a spherical coordinate (angle with the ${z}$-axis) and ${P_m}$ is the Legendre polynomial of degree ${m}$.

The positivity condition requires ${P_m(t) > 0}$ for ${t>c}$. In other words, the bound on ${\theta}$ comes from the greatest zero of the Legendre polynomial. As is true for orthogonal polynomials in general, the zeros are interlaced: that is, the zeros of ${P_m=0}$ appear strictly between any two consecutive zeros of ${P_{m+1}}$. It follows that the value of the greatest zero grows with ${m}$. Thus, it is smallest when ${m=2}$. Since ${P_2(t) = (3t^2-1)/2}$, the zero of interest is ${1/\sqrt{3}}$, and we conclude that ${c \ge 1/\sqrt{3}}$. Hence the magic angle.

The magic angle is easy to visualize: it is formed by an edge of a cube and its space diagonal. So, the magic cone with vertex at (0,0,0) is the one that passes through (1, 1, 1), as shown above.

In other dimensions the zonal harmonics are expressed in terms of Gegenbauer polynomials (which reduce to Chebyshev polynomials in dimensions 2 and 4). The above argument applies to them just as well. The relevant Gegenbauer polynomial of degree ${2}$ is ${nx^2-1}$ up to a constant. Thus, in ${\mathbb R^n}$ the magic angle is ${\cos^{-1}(1/\sqrt{n})}$, illustrated by the harmonic function ${u(x)=nx_n^2 - |x|^2}$.

This analysis is reminiscent of the Hopf Lemma which asserts that if a positive harmonic function in a smooth domain has boundary value 0 at some point, the normal derivative cannot vanish at that point. The smoothness requirement is typically expressed as the interior ball condition: one can touch every boundary point by a ball contained in the domain. The consideration of magic angles shows that if the function is also harmonic in a larger domain, the interior ball condition can be replaced by the interior cone condition, provided that the opening angle of the cone is greater than ${\cos^{-1}(1/\sqrt{n})}$.

## Interpolating between a cone and a cylinder

This post is inspired by James Tanton’s video which is summarized in bulleted items below. For convenience normalize all solids to height ${1}$.

• Parallel cross-sections of a cylinder have constant area. Therefore its volume is ${\int_0^1 A z^0\,dz =Ah}$, where ${A}$ is the area of the base.
• Parallel cross-sections of a cone are scaled in both directions by the ${z}$-coordinate. This multiplies the sectional area by ${z^2}$ and therefore the volume is ${\int_0^1 A z^2\,dz =\frac{1}{3}Ah}$.
• There is something in between: we can scale cross-sections in one direction only. Then the sectional area is multiplied by ${z}$ and the volume is ${\int_0^1 A z\,dz =\frac{1}{2}Ah}$.

Taking the base to be a circle, we get this shape:

It looks… odd. Not even convex:

But cones and cylinders are convex whenever the base is a convex region. Can we interpolate between them within the class of convex sets?

The answer is: yes, if we use the Minkowski sum. Given two convex bodies ${A_0}$ and ${A_1}$ in ${{\mathbb R}^3}$, for ${0< t<1}$ define

$\displaystyle A_t =(1-t)A_0+tA_1 = \{(1-t)a_0+ta_1 : a_0\in A_0, a_1\in A_1\}$

Each ${A_t}$ is convex. If the sets ${A_0}$ and ${A_1}$ are cone and cylinder of equal height and with the same convex base ${B}$, then all ${A_t}$ have the same base and the same height.

Finding the volume of a convex body in Calculus II/III can be a tiresome exercise with trigonometric substitutions and whatnot. It may come as a surprise that the volume of ${A_t}$ is always a cubic polynomial in ${t}$, even if the convex sets ${A_0, A_1}$ are defined by some transcendental functions. I still do not find this fact intuitive.

Let’s check it on the example of ${A_0}$ and ${A_1}$ being a cone and a cylinder of height ${1}$ and radius ${r}$. Obviously, every ${A_t}$ is a solid of revolution. Its profile is the Minkowski sum of appropriately scaled triangle and rectangle. This is how I imagine it:

• Mark a point on the rectangle, for example the midpoint of the bottom edge.
• Move the rectangle around so that the marked point stays within the triangle.
• The region swept is the Minkowski sum.

The volume can now be computed directly. I used the venerable method of cylindrical shells to find the volume of ${A_1\setminus A_t}$:

$\displaystyle 2\pi \int_{tr}^t x(x/r-t)\,dx = \frac{\pi r^2}{3}(2-3t+t^3)$

hence

$\displaystyle \mathrm{Vol}\, (A_t) = \frac{\pi r^2}{3}(1+3t-t^3)$

It so happens that ${\mathrm{Vol}\,(A_t)}$ is a concave function in this example, although in general only its cubic root is guaranteed to be concave, by the Brunn-Minkowski inequality.

When ${t\approx 0.168}$, the volume of ${A_t}$ is equal to ${\pi r^2/2}$, same as the volume of James Tanton’s solid. Since ${t}$ is pretty small, the shape looks much like a cone.

When ${t\approx 0.347}$, the volume of ${A_t}$ is equal to ${2\pi r^2/3}$, which is exactly halfway between the volumes of cone and cylinder. The solid exhibits harmonious balance of both shapes.