Wave equation from harmonic oscillator and Lorentz transformation I was looking at this animation by 3Blue1Brown:

and asked myself if the wave equation could be found using the regular harmonic oscillator equation:
$$m\gamma\ddot{x}=-kx$$
and the Lorentz transformation only:
$${\displaystyle \left\{{\begin{aligned}t'&=\gamma \left(t-{\frac {vx}{c^{2}}}\right)\\x'&=\gamma \left(x-vt\right)\end{aligned}}\right.}$$

source: https://twitter.com/i/status/967852080319909897
 A: Ooh, this is a fantastic question, and it's given me a great idea for an exercise in Special Relativity. Yes you can, and here's how I solved it: let's start off by setting up the system. Consider two frames, $S$ and $S'$. There are a bunch of masses attached to some supports using springs. Let $S'$ be the rest frame of these supports (think of it as being a spaceship to which these supports are attached, for example). Now, you are standing in the laboratory frame $S$, watching all this spaceship moving rightwards with a constant velocity $v$.
In the frame $S'$, somebody extends all the springs by the same amount and releases them simultaneously at some time $t'=t'_0$. (Note that I've used the primed coordinates, since this is the time measured by someone sitting in $S'$. I will use this convention throughout.) As a result, each individual mass moves as $$y'_n(t) = A' \cos{\omega'(t'-t'_0)}.$$ Here's a simple visualisation I made of this situation using Visual Python:

Let's choose one of the masses to be at $x=0=x'$, and for simplicity let's also say that the masses are released when the frames cross each other (i.e., when $t=0=t'$). Let's just look at the mass at $x=0$. According to the person in $S'$, this mass (like all the others) moves as: $$y'_0(t') = A' \cos \omega' t'.$$
Now how does this particular mass look like in $S$? It should be easy enough to see that the solution must look like: $$y_0(t) = A\cos(\omega t).$$ You could get the different parameters by solving the differential equation in the question, but we could just use physics to do this too: We must have that $A=A'$, since that's the initial amplitude, and it's in the $y$ direction which is untouched by a boost along $x$. Furthermore, you could imagine this spring mass system to be a little "clock", with a time period $T=2\pi/\omega$. The time periods in $S$ and $S'$ must then be related by the formula for time dilation, and so we must have that $T=\gamma\,\ T',$ i.e. that $\omega' = \gamma\,\, \omega$. And just like that, you can see that $$y_0(t) = A \cos\left(\frac{\omega' t}{\gamma}\right).$$
So the mass would oscillate "slower" in $S$ than in would in $S'$. So far, this should all be intuitive, which is why I've rushed through it a little. Now let's move on to the more interesting question: how do the masses look relative to each other, in the frame $S$?
The basic idea I want to use is the following: the masses were released simultaneously in $S'$, however these events will not be simultaneous in $S$. So while each of the masses oscillates with the same frequency $\omega$, they will no longer be in phase, which will lead to their trajectories being a little different. In order to compute this difference, I consider the masses to be separated by some distance $a$ in $S$, and I take an arbitrary mass, say the $n$-th one, that is a distance $l=na$ away from the one at the centre. I now consider two events:
\begin{array} {|c|c|}\hline \textbf{Event} & \text{In $S'$} & \text{In $S$} \\ \hline \text{Mass $0$ is released} & t'=0,\quad x'=0 & t=0, \quad x=0 \\ 
\hline \text{Mass $n$ is released} & t'=0,\quad x'= \gamma l & t = {\color{red}?}, \quad x = l \\ \hline  \end{array}
Clearly, between these two events, in the frame $S'$, $$\Delta x' = \gamma l \quad \quad \Delta t' = 0,$$
and in the frame $S$: $$\Delta x=l \quad \quad \Delta t={\color{red}?}.$$ We can now use the Lorentz Transformations to find $\Delta t$, $$\Delta t = \gamma\left(\Delta t' + \frac{v}{c^2}\Delta x'\right) = \gamma^2 \frac{l v}{c^2}.$$
So here's something interesting: in $S$, an observer would see the first mass released at $t=0$, but they would see the $n$th mass released at a later time $$t = 0 + \Delta t= n\gamma^2 \frac{va}{c^2}!$$
As a result, the equation of motion of the $n$th mass will not just be $y_n(t) = A \cos(\omega t)$, but would rather be $$y_n(t) = A \cos\Bigg[ \omega \left(t - n\gamma^2 \frac{va}{c^2}\right)\Bigg].$$
As a result, all the masses appear to be out of phase when observed from $S$, which leads to the pretty pattern you see in the animation in your post. I used Visual Python to plot the motion of these masses as observed by someone in $S$, and it matches:


In case anyone's interested, here's the code for the above animations:
from vpython import *
import numpy as np

scene = canvas(center=vector(0,0,0),range=10)

def S(v):
     masses = []
     springs = []

     A  = 5
     wp = 1
     g  = 1/np.sqrt(1-v**2)
     ap = 1


     for i in range(-60,20):

         s = sphere(pos=vector(i*ap/g,-A,0),color=color.cyan,radius=0.3)
         masses.append(s)
         spring=helix(pos=vector(i*ap/g,0,0), axis=vector(0,-A,0), radius=0.25, 
                      constant=1, thickness=0.05, coils=15, color=color.white)

         springs.append(spring)

     t  =0
     dt=0.1

    while(t<10):
        rate(15)
        for i in range(len(masses)):
            masses[i].pos.y = A*np.cos( (wp/g)*(t - (g*v*ap)*i)   )
            masses[i].pos.x = masses[i].pos.x + v*dt
            springs[i].pos.x = springs[i].pos.x + v*dt
            springs[i].axis = masses[i].pos - springs[i].pos

        t+=dt

 S(0.50)

A: In fact yes, sort of, though the Lorentz transform isn't needed. For example, see here for what looks like a very nice discussion of this derivation, though I'll mention briefly how it goes.
The idea is to consider a system of masses in a line (you could do arbitrary dimension, but things become more complicated), each mass attached to an adjacent mass by a spring all with the same spring constant.
If you take the limit in which the spacings between the masses go to zero and the number of masses goes to infinity (you have to be a little careful about how to do this limit), the function which tells you the displacement of each mass from equilibrium becomes continuous as well, and furthermore must obey the wave equation.
