Spherical pendulum

In physics, a spherical pendulum is a higher dimensional analogue of the pendulum. It consists of a mass "m" moving without friction on the surface of a sphere. The only forces acting on the mass are the reaction from the sphere and gravity.
Owing to the spherical geometry of the problem, spherical coordinates are used to describe the position of the mass in terms of ("r", "θ", "φ"), where "r" is fixed, "r"="l". 
Lagrangian mechanics.
Routinely, in order to write down the kinetic formula_1 and potential formula_2 parts of the Lagrangian formula_3 in arbitrary generalized coordinates the position of the mass is expressed along Cartesian axes. Here, following the conventions shown in the diagram,
Next, time derivatives of these coordinates are taken, to obtain velocities along the axes
Thus,
and
The Lagrangian, with constant parts removed, is 
The Euler–Lagrange equation involving the polar angle formula_14
gives
and
When formula_18 the equation reduces to the differential equation for the motion of a simple gravity pendulum.
Similarly, the Euler–Lagrange equation involving the azimuth formula_19,
gives
The last equation shows that angular momentum around the vertical axis, formula_22 is conserved. The factor formula_23 will play a role in the Hamiltonian formulation below.
The second order differential equation determining the evolution of formula_19 is thus
The azimuth formula_19, being absent from the Lagrangian, is a cyclic coordinate, which implies that its conjugate momentum is a constant of motion.
The conical pendulum refers to the special solutions where formula_27 and formula_28 is a constant not depending on time.
Hamiltonian mechanics.
The Hamiltonian is
where conjugate momenta are
and
In terms of coordinates and momenta it reads
formula_32
Hamilton's equations will give time evolution of coordinates and momenta in four first-order differential equations
Momentum formula_37 is a constant of motion. That is a consequence of the rotational symmetry of the system around the vertical axis.
Trajectory.
Trajectory of the mass on the sphere can be obtained from the expression for the total energy
by noting that the vertical component of angular momentum formula_39 is a constant of motion, independent of time.
Hence
which leads to an elliptic integral of the first kind for formula_14
and an elliptic integral of the third kind for formula_19
The angle formula_14 lies between two circles of latitude, where