Until now, we have been working only with the heat equation. Today, we are going to solve the one-dimensional wave equation with homogeneous boundary conditions and no sources, namely,
As before, we want to use the method of separation of variables by setting and substituting above:
We want to ignore trivial solutions. This implies our boundary conditions are , and .
Separating variables yields
Because functions of distinct independent variables can only be equal if they equate to the same constant, we have introduced the equality in blue (the negative sign is purely out of convenience later on).
We now have a system of two ordinary differential equations:
Equation has three cases:
- :
Applying the boundary conditions to this yields
This is the trivial solution, so we drop it.
- :
Applying the boundary conditions to this yields
This is the trivial solution, so we drop it.
- :
Applying the boundary conditions to this yields
Now that we know the value of , we can use it to solve equation :
Therefore, by the
principle of superposition, we find that the solution to this partial differential equation is
The coefficients and can be found by applying the initial conditions:
Finally, applying
orthogonality principles to the above equations to find and yields
Letting , , and gives us the following wave (the approximation is very low):