Exercise 1
The Lagrangian of the harmonic oscillator with spring constant \(k\) is as follows: \[L(x, \dot{x})=\frac{1}{2} m \dot{x}^2 - \frac{1}{2}kx^2\]
Transformation from cartesian coordinate \(x\) to a generalized coordinate \(q\): \[q=(km)^{\frac{1}{4}}x\] Please note: the unit of \(q\) is not of type length!
Calculation of \(L(q, \dot{q})\): \[x=\frac{q}{(km)^{\frac{1}{4}}}\] \[\dot{x}=\frac{\dot{q}}{(km)^{\frac{1}{4}}}\] \[x^2=\frac{q^2}{\sqrt{km}}\] \[\dot{x}^2=\frac{\dot{q}^2}{\sqrt{km}}\]
We plug this into the Lagrangian: \[L = \frac{1}{2}m \frac{\dot{q}^2}{\sqrt{km}} - \frac{1}{2} k \frac{q^2}{\sqrt{km}}\] \[= \frac{1}{2} \sqrt{\frac{m}{k}} \dot{q}^2 - \frac{1}{2} \sqrt{\frac{k}{m}} q^2\] \[=\frac{1}{2 \omega}\dot{q}^2 - \frac{\omega}{2}q^2\] where \[\omega = \sqrt{ \frac{k}{m}}\]