I have a wave equation:
$\frac{\partial^2u}{\partial t^2} = a^2 \frac{\partial^2u}{\partial x^2}.$
How would I verify that the function $u(x,t)=\sin(x-at)$ satisfies the aforementioned wave equation?
I have a wave equation:
$\frac{\partial^2u}{\partial t^2} = a^2 \frac{\partial^2u}{\partial x^2}.$
How would I verify that the function $u(x,t)=\sin(x-at)$ satisfies the aforementioned wave equation?
Just derive your $u(x,t)$ using the chain rule until you get the result:
$\frac{\partial u}{\partial t} = -a\cos(x-at)$
$\frac{\partial^2 u}{\partial t^2} = -a^2\sin(x-at)$
$\frac{\partial u}{\partial x} = \cos(x-at)$
$\frac{\partial^2 u}{\partial x^2} = -\sin(x-at)$
Therefore:
$\frac{\partial^2 u}{\partial t^2} = a^2\frac{\partial^2 u}{\partial x^2} $
$-a^2\sin(x-at) = a^2\left(-\sin(x-at)\right) $
$-a^2\sin(x-at) = -a^2\sin(x-at) $
As mentioned in the comments: Plug u into the wave equation, means calculate the second time and space derivatives and see that they are equal.
Left-hand-side: $\partial_{tt} u=-a^2\sin(x-at).$ (Here, we apply the chain-rule twice).
Right-hand-side: $\partial_{xx} u=-\sin(x-at).$ (Here, the "inner" derivative is 1, so we don't have the factor $a^2$).
This means, multiply the rhs by $a^2$ and you get the lhs, the equation is valid.
As Fabian mentioned in the comments, this works for arbitrary twice differentiable functions $f$.