Knowing that a 1D wave with the physical form parametrized by x and t
$$u = \sin(x-t)$$
will yield us the first time derivative $$\frac{\partial u}{\partial t} =-\cos(x-t)$$
and the second time derivative $$\frac{\partial^2 u}{\partial t^2} = -\sin (x-t)$$
This implies that we can re-create the original wave shape u by producing (through any means) the acceleration in the exactly correct proportion over all x and for each moment t as prescribed by the second derivative, is it right?
I did a simple animation of this, but the result is puzzlingly not the u wave shape above. What am I doing wrong?
The resulting physical wave form is a standing wave that gets higher and higher (seemingly unbounded) amplitude. Why is this so?
The algorithm is:
- For every frame t, for every t on the graph, calculate the new acceleration a = -sin (x-t).
- Add this acceleration value (between -1 and 1) to the previous velocity v_new = v_old + a.
- Finally, add this new v value to the physical wave form u_new = u_old + v.
Thank you.
