<s>[INST] Proving these are equal We have the following equality (in physics) $$c^2t^2-x^2 = c^2t'^2-x'^2$$
where: 
$t' =  \gamma (t- \dfrac{vx}{c^2})$
$x' = \gamma(x-vt)$
$\gamma = \dfrac{1}{\sqrt{1-\dfrac{v^2}{c^2}}}$
My textbook gives no proof of this, and I thought it would be a nice algebraic exercise to perform, but I have failed to find it. I get stuck at the following expression:
$$c^2t'^2-x'^2 = \gamma ^2 (c^2t^2 + \dfrac{v^2x^2}{c^2} - x^2 - v^2t^2)$$
This very slightly resembles $c^2t^2-x^2$, but I still can't figure out how to get to that expression. Can anybody help?
 [/INST] \begin{align*}
  c^2t'^2 - x'^2
      &= c^2\gamma^2\left(t - \frac{v x}{c^2}\right)^2 - \gamma^2(x-vt)^2 \\
      &= \frac{1}{1-\frac{v^2}{c^2}}\left(c^2t^2 - 2tvx + \frac{v^2x^2}{c^2} - x^2 + 2xvt - v^2t^2\right) \\
      &= \frac{c^2}{c^2-v^2}\left(c^2t^2 + \frac{v^2x^2}{c^2} - x^2 - v^2t^2\right) \\
      &= \frac{c^2}{c^2-v^2}(c^2-v^2)t^2 + \frac{c^2}{c^2-v^2}\left(\frac{v^2x^2}{c^2} - x^2\right) \\
      &= c^2t^2 + \frac{c^2}{c^2-v^2}\cdot\frac{(v^2-c^2)x^2}{c^2} \\
      &= c^2t^2 - x^2.
\end{align*}
</s>