### 10.4 Simulation of the Wave Equation for a Vibrating String

At the end of this chapter we consider in Fig.10.5 the simulation of a vibrating string
as solution of the wave equation. Fig.10.4 shows three snapshots as examples from
the simulation in Fig.10.5. The left part of the picture shows the “start impulse”, a
Gaussian concentrated in the middle of the string with maximum 1. In the middle of the
picture follows the situation shortly after the start: two Gaussian impulses of height
$1\u22152$ run
into opposite directions. They are finally reflected at the ends of the string and
interfere with each other in the picture on the right, which results in the
reconstruction of the original form and amplitude, but with a negative sign after the
first reflection

Gaussian impulses and symmetric wave functions propagate on the string
unchanged for a long time, as long as no damping is taken into account in the wave
equation.

The interactive figure 10.5 show the situation a short time after the start on
triangular impulse, that was originally concentrated at the end of the string. After
some time one observes deviations, that are due to the discontinuity of the first
derivative at the beginning and end of the impulse. This example also demonstrates
the limits of the numerical computation.

A selection menu contains the following start functions for the initial deflection of
the string:

- Gaussian impulse of adjustable width in the middle of the string,
- Gaussian impulse not in the middle of the string
- symmetric triangle in the middle of the string
- triangle at the end of the string
- sawtooth
- sawtooth of adjustable width
- sine wave

There is a parameter $a$
in most of the functions, that can be changed. The formulas for the initial
deflections themselves are editable, such that many more start situations can be
simulated.

The description pages contain further details and suggestions for experiments.
This animation is aesthetically quite pleasing, because it gives the music lover hints
about the tone qualities, that are possible due to very different over tone mixtures.
More details about this is discussed in the manuals.

This simulation was originally developed by Francisco Esquembre, the pioneer of
the EJS program and extended by us.