I'm trying to understand the way my teacher found the lagrangianLagrangian of an elastic pendulum.
Given a spring pendulum connected to the origin, the equalibriumequilibrium point is $(0,0,\frac{-mg}{k})$.
The length of the relaxed spring is $0$.
The lagrangianLagrangian with respect to the equilibrium point is
$$ L = \frac{1}{2}m \dot r^2 - \frac{k}{2} r^2. $$
I don't understand why the gravitational potential energy wasn't taken into account.
Can it be related to the given initial conditions? theThe mass starts at the equilibrium point with velocity $v$ to the right ($x$ direction).