Alice in Wonderland and Systems with a Quadratic Potential

My son's teacher asked me to tell the kids something about the pendulum and its relation to falling through the earth and oscillating (they have been reading Alice in Wonderland).

Since both can be approximated by a harmonic oscillator, I thought I'd present them some more equivalent systems, in particular that of a point mass moving in a parabolic valley, the most straightforward quadratic potential. I quickly realized that this is not actually a harmonic oscillator: let $x$ be the horizontal position of a point particle of mass $m$ in a uniform downward pointing gravitational field with constant of gravity $g$, and consider a valley centered at the origin with height profile $h(x)$.

If I didn't make any mistakes, the Lagrangian of this system is

$$L(x,\dot x) = \frac12 m\dot x^2\left(1 + h'(x)^2\right) - mgh(x).$$

The Euler-Lagrange equation is (factoring out $m$)

$$\ddot x\left(1 + h'(x)^2\right) - \dot x^2h'(x)h''(x) + gh'(x) = 0.$$

For a quadratic height function, like $h(x) = \frac12x^2$, this becomes

$$\ddot x\left(1 + x^2\right) - \dot x^2x + gx = 0.$$

I don't really know how to solve this, but the solution, while obviously (from the physical problem) oscillatory, is not harmonic.

On the other hand, there must be a solution for $h(x)$ for which we do get a harmonic solution.

My questions (assuming the preceding is correct):

• Could it have been clear from the outset that this is not a harmonic oscillator? Obviously we have a potential that is quadratic in the configuration space coordinate, but it seems that the dependence of the kinetic term on $x,\dot x$ is not the correct one.
• For which $h(x)$ would we get a harmonic oscillator?
• Very cool! Another unexpected harmonic oscillator is a train running through a mineshaft drilled at an angle through the earth (missing the center - think Paris -> London instead of London -> Sydney). The period of oscillation is independent of the end points! – Floris May 31 '17 at 0:14
• See also this earlier answer which addresses exactly that scenario. – Floris May 31 '17 at 17:47