Lagrangian of a Relativistic Harmonic Oscillator My Text Book says the Lagrangian for a one-dimensional relativistic harmonic oscillator can be written as 
$$L = mc^2(1-\gamma) - \frac12kx^2$$
but I've learnt it as;
$$L = -mc^2/\gamma - \frac12kx^2$$
how is this possible?
 A: Special relativity has shortcomings once you leave pure kinematics of four vectors. Let $U$ be the potential of a gravitational or a harmonic oscillator field. 
The Lagrangian 
$$ L = -mc^2 \sqrt{1-\beta^2} - U $$
is not a Lorentz invariant expression. It is only relativistic in partial sense.
See, for example, Section 6-6 of Classical Mechanics (1950) by Herbert Goldstein.  
A: This is a problem that requires the extension to general relativity. It is not possible to solve this problem remaining in special relativity. 
Make the relativistic ansatz (in 2d spacetime)
$L = - m c \sqrt{-g_{\mu\nu}(x)\dot{x}^{\mu}\dot{x}^{\nu}}$
where the dot is with respect to the geodesic distance of the worldline. 
Then I take the nonrel limit (and put $x^0 = t$ associated with the dot, and $x^1 = x$ and expand the metric about flat space as $g_{\mu\nu} = \eta_{\mu\nu} + h_{\mu\nu}$) and get
$L = \frac{m\dot{x}^2}{2} - \frac{m h_{00}(x)}{2}$
from which I identify the metric component
$g_{00}(x) = \eta_{00} + kx^2/m$
Thus the line element is 
$ds^2 = (kx^2/m - c^2) dt^2 + dx^2$.
Since this metric is departing from Minkowski flat metric, we clearly see that we need general relativity to properly formulate the relativistic harmonic oscillator.  
A: If you consider both Lagrangians, and apply the Euler Lagrange equations, after taking derivatives with respect to the position and velocity, remembering that: $$\gamma=\gamma(\dot x) $$ Then, you will find that both Lagrangians will provide you with the same equations of motion.
Naively we can see that the equations of motion are invariant up to an additive constant in the Lagrangian, and $ m c^2 $ is such a constant (since the speed of light and the rest mass $m$ are Lorentz invariants).
If you look further at the literature, such as in Landau & Lifshitz volumes 1 & 2, you will see a more rigorous treatment of variations in the classical Action under transformations such as these.
A: Based on the statement of the problem you can verify the kinetic energy part has the right nonrelativistic limit.  This can be seen with
$$
\lim_{v~\rightarrow~0}mc^2(1~-~\gamma)~=~mc^2\left(1~-~1~+~\frac{1}{2}\frac{v^2}{c^2}\right)~=~\frac{1}{2}mv^2,
$$
here using binomial theorem. I am not sure why the potential energy term $-\frac{1}{2}kx^2$ does not have Lorentz contraction of the $x$ direction.
