2 Numerical solutions
The approach we will adopt is similar to that seen in Section 32.4 where we looked at parabolic equations. We use the notation
to denote an approximation to evaluated at , . Approximating the derivatives in the PDE
by central differences we obtain the numerical difference equation
Multiplying through by this can be rearranged to give
in which is called the Courant number.
The equation above gives in terms of -approximations at earlier time-steps (that is, all the appearances of on the right-hand side have a superscript smaller than ).
Figure 9
Thinking of the numerical stencil graphically we have the situation shown above. We may think of the values on the right-hand side of the equation “pointing to" a new value on the left-hand side.
(We will deal with how to carry out the first time-step shortly.)
The time-stepping process has much in common with the corresponding procedure for parabolic problems. The following Example will help establish the general idea.
Example 18
Given that
satisfies the wave equation
in
and
with boundary conditions
with wave speed
.
The numerical method
where
, is implemented using
and
.
Suppose that, after 5 time-steps, the following data forms part of the numerical solution:
Carry out the next time-step so as to find an approximation to at .
Solution
In this case and the required time-step is carried out as follows:
to 4 decimal places and these are the approximations to , , , and , respectively.
The diagram below shows the numerical results that appeared in the example above. It can be seen that the example was a (rather coarse) model of a standing wave with two antinodes.
Figure 10
Task!
Suppose that
satisfies the wave equation
in
and
. It is given that
satisfies boundary conditions
and initial conditions that need not be stated for the purposes of this question. The application is such that the wave speed
.
The numerical method
where
, is implemented using
and
.
Suppose that, after 8 time-steps, the following data forms part of the numerical solution:
Carry out the next time-step so as to find an approximation to at .
In this case and the required time-step is carried out as follows:
to 4 decimal places and these are the approximations to , , , and , respectively.
The above Task concerns a stretched string oscillating in such a way that at the time-step the string is approximately flat. The motion continues with taking negative values. Figure 11 below uses data calculated above, and also data for the next two time-steps so as to show subsequent progress of the solution.
Figure 11