page_title: Wave equation
section_title: Investigation by numerical methods
hierarchical_section_title: Wave equation / Problems with boundaries / One space dimension / Investigation by numerical methods
context_page_description: The wave equation is an important second-order linear partial differential equation for the description of waves—as they occur in classical physics—such as mechanical waves or light waves. It arises in fields like acoustics, electromagnetics, and fluid dynamics.
  Historically, the problem of a vibrating string such as that of a musical instrument was studied by Jean le Rond d'Alembert, Leonhard Euler, Daniel Bernoulli, and Joseph-Louis Lagrange. In 1746, d’Alembert discovered the one-dimensional wave equation, and within ten years Euler discovered the three-dimensional wave equation.
context_section_description: Approximating the continuous string with a finite number of equidistant mass points one gets the following physical model:
  If each mass point has the mass m, the tension of the string is f, the separation between the mass points is Δx and uᵢ, i = 1, …, n are the offset of these n points from their equilibrium points (i.e. their position on a straight line between the two attachment points of the string) the vertical component of the force towards point i + 1 is
  and the vertical component of the force towards point i − 1 is
  Taking the sum of these two forces and dividing with the mass m one gets for the vertical motion:
  As the mass density is 
  this can be written
  The wave equation is obtained by letting Δx → 0 in which case uᵢ(t) takes the form u(x, t) where u(x, t) is continuous function of two variables,  takes the form ∂²u/∂t² and
  But the discrete formulation (3) of the equation of state with a finite number of mass point is just the suitable one for a numerical propagation of the string motion. The boundary condition
  where L is the length of the string takes in the discrete formulation the form that for the outermost points u₁ and uₙ the equations of motion are
  and
  while for 1 < i < n
  where c = √f/ρ.
  If the string is approximated with 100 discrete mass points one gets the 100 coupled second order differential equations (5), (6) and (7) or equivalently 200 coupled first order differential equations.
  Propagating these up to the times
  using an 8th order multistep method the 6 states displayed in figure 2 are found:
  The red curve is the initial state at time zero at which the string is "let free" in a predefined shape with all . The blue curve is the state at time  i.e. after a time that corresponds to the time a wave that is moving with the nominal wave velocity c=√ f/ρ would need for one fourth of the length of the string.
  Figure 3 displays the shape of the string at the times . The wave travels in direction right with the speed c=√ f/ρ without being actively constraint by the boundary conditions at the two extremes of the string. The shape of the wave is constant, i.e. the curve is indeed of the form f(x − ct).
  Figure 4 displays the shape of the string at the times . The constraint on the right extreme starts to interfere with the motion preventing the wave to raise the end of the string.
  Figure 5 displays the shape of the string at the times  when the direction of motion is reversed. The red, green and blue curves are the states at the times  while the 3 black curves correspond to the states at times  with the wave starting to move back towards left.
  Figure 6 and figure 7 finally display the shape of the string at the times  and . The wave now travels towards left and the constraints at the end points are not active any more. When finally the other extreme of the string the direction will again be reversed in a way similar to what is displayed in figure 6.
caption: Figure 7: The string at 6 consecutive epochs