Euler–Lagrange equation
and then the Euler–Lagrange equation for the angle φ becomes