[Notes on Diffy Qs home] [PDF version] [Buy cheap paperback version]

[next] [prev] [prev-tail] [tail] [up]

4.8 D’Alembert solution of the wave equation

Note: 1 lecture, different from §9.6 in [EP], part of §10.7 in [BD]

We have solved the wave equation by using Fourier series. But it is often more convenient to use the so-called d’Alembert solution to the wave equation3. This solution can be derived using Fourier series as well, but it is really an awkward use of those concepts. It is much easier to derive this solution by making a correct change of variables to get an equation that can be solved by simple integration.

Suppose we have the wave equation

ytt = a2yxx.
(4.14)

And we wish to solve the equation (4.14) given the conditions

 y(0,t) = y(L,t) = 0 for all t, y(x,0) = f (x) 0 < x < L, yt(x,0) = g(x) 0 < x < L.
(4.15)

4.8.1 Change of variables

We will transform the equation into a simpler form where it can be solved by simple integration. We change variables to ξ = x - at , η = x + at and we use the chain rule:

 ∂ ∂ξ ∂ ∂η ∂ ∂ ∂ ---= -----+ -----= ---+ --, ∂x ∂x∂ ξ ∂x∂η ∂ξ ∂η ∂- ∂ξ-∂-- ∂η-∂-- ∂-- -∂- ∂t = ∂t ∂ξ + ∂t ∂η = -a ∂ξ + a∂η .
We compute
 ∂ 2y ( ∂ ∂ )( ∂y ∂y) ∂2y ∂2y ∂2y yxx = ---2 = --+ --- ---+ --- = --2-+ 2----- + --2, ∂x ( ∂ξ ∂η ∂)ξ( ∂η ∂ξ ) ∂ξ∂ η ∂η ∂2y- -∂- ∂-- ∂y- -∂y 2∂2y- 2-∂2y- 2-∂2y ytt = ∂t2 = -a∂ ξ + a ∂η - a∂ξ + a∂ η = a ∂ξ2 - 2a ∂ξ∂η + a ∂ η2.
In the above computations, we have used the fact from calculus that ∂2y-= -∂2y- ∂ξ∂η ∂η∂ξ . Then we plug into the wave equation,
 2 0 = a2yxx - ytt = 4a2-∂-y = 4a2yξη. ∂ξ∂ η

Therefore, the wave equation (4.14) transforms into yξη = 0 . It is easy to find the general solution to this equation by integrating twice. Let us integrate with respect to η first4 and notice that the constant of integration depends on ξ . We get yξ = C (ξ) . Next, we integrate with respect to ξ and notice that the constant of integration must depend on η . Thus,  ∫ y = C (ξ) dξ + B(η) . The solution must, therefore, be of the following form for some functions A(ξ) and B(η) :

y = A(ξ) + B (η) = A (x - at) + B (x + at).

4.8.2 The formula

We know what any solution must look like, but we need to solve for the given side conditions. We will just give the formula and see that it works. First let F (x) denote the odd extension of f(x) , and let G(x) denote the odd extension of g(x) . Define

 1 1 ∫ x 1 1 ∫ x A(x) = -F (x) - --- G(s) ds, B(x) = -F (x) +--- G (s) ds. 2 2a 0 2 2a 0

We claim this A (x ) and B(x) give the solution. Explicitly, the solution is y(x,t) = A (x - at) + B (x + at) or in other words:

|------------------------∫-------------------------------∫-------------| | 1 1 x-at 1 1 x+at | | y(x,t) = 2F (x - at) - 2a G (s) ds + 2F (x + at) + 2a G (s) ds | | 0 ∫ x+at 0 | | = F-(x---at) +-F-(x-+-at)+-1- G (s) ds. | | 2 2a x-at | ------------------------------------------------------------------------
(4.16)

Let us check that the d’Alembert formula really works.

 ∫ x ∫ x y(x,0) = 1F (x) --1- G(s) ds + 1-F(x) + 1- G (s) ds = F (x ). 2 2a 0 2 2a 0

So far so good. Assume for simplicity F is differentiable. By the fundamental theorem of calculus we have

yt(x,t) = --aF ′(x - at) + 1G (x - at) + aF ′(x + at) + 1G (x + at). 2 2 2 2

So

 -a- ′ 1- a- ′ 1- yt(x,0) = 2 F (x ) + 2G (x) + 2 F (x) + 2 G(x) = G(x).

Yay! We’re smoking now. OK, now the boundary conditions. Note that F (x) and G (x) are odd. Also ∫ x 0 G (s) ds is an even function of x because G(x) is odd (to see this fact, do the substitution s = -v ). So

 ∫ ∫ 1- 1-- -at 1- 1-- at y(0,t) = 2 F(- at) - 2a G (s) ds + 2F(at) + 2a G(s) ds ∫0at ∫ 0at = --1F (at) - 1-- G (s) ds + 1F (at) + 1-- G(s) ds = 0. 2 2a 0 2 2a 0

Note that F (x) and G (x) are 2L periodic. We compute

 ∫ L-at ∫ L+at y(L,t) = 1F (L - at) --1- G (s) ds + 1F (L + at) + 1- G(s) ds 2 2a 0 2 2a 0 ∫ L ∫ -at = 1F (- L - at) - 1-- G(s) ds --1- G (s) ds + 2 2a 0 2a 0 1 1 ∫ L 1 ∫ at + -F (L + at) + --- G(s) ds +--- G (s) ds 2 2∫a 0 2a 0 ∫ -1- 1-- at 1- -1- at = 2 F (L + at) - 2a G (s) ds + 2F (L + at) + 2a G(s) ds = 0. 0 0

And voilà, it works.

Example 4.8.1: D’Alembert says that the solution is a superposition of two functions (waves) moving in the opposite direction at “speed” a . To get an idea of how it works, let us work out an example. Consider the simpler setup

ytt = yxx, y(0, t) = y(1, t) = 0, y(x, 0) = f(x), yt(x,0) = 0.
Here f (x) is an impulse of height 1 centered at x = 0.5 :
 ( ||| 0 if 0 ≤ x < 0.45, ||||| f(x) = {| 20(x - 0.45) if 0 ≤ x < 0.45, ||||| 20(0.5 5 - x) if 0.45 ≤ x < 0.55, ||( 0 if 0.55 ≤ x ≤ 1.

The graph of this impulse is the top left plot in Figure 4.21.

Let F (x) be the odd periodic extension of f(x) . Then from (4.16) we know that the solution is given as

y(x,t) = F(x---t)-+-F(x-+ t). 2

It is not hard to compute specific values of y(x,t) . For example, to compute y(0.1,0.6 ) we notice x - t = - 0.5 and x + t = 0.7 . Now F(-0.5) = -f(0.5) = -20(0.55 - 0.5) = -1 and F (0.7) = f(0.7) = 0 . Hence y(0.1,0.6 ) = -1+0 = -0.5 2 . As you can see the d’Alembert solution is much easier to actually compute and to plot than the Fourier series solution. See Figure 4.21 for plots of the solution y for several different t .


PIC PIC

PIC PIC

Figure 4.21: Plot of the d’Alembert solution for t = 0 , t = 0.2 , t = 0.4 , and t = 0.6 .


4.8.3 Notes

It is perhaps easier and more useful to memorize the procedure rather than the formula itself. The important thing to remember is that a solution to the wave equation is a superposition of two waves traveling in opposite directions. That is,

y(x,t) = A(x - at) + B(x + at).

If you think about it, the exact formulas for A and B are not hard to guess once you realize what kind of side conditions y(x,t) is supposed to satisfy. Let us give the formula again, but slightly differently. Best approach is to do this in stages. When g(x) = 0 (and hence G(x) = 0 ) we have the solution

F(x --at)-+-F(x-+ at). 2

On the other hand, when f (x ) = 0 (and hence F (x) = 0 ), we let

 ∫ x H (x) = G (s) ds. 0

The solution in this case is

 ∫ x+at -1- G (s) ds = -H-(x---at)-+-H(x-+-at). 2a x-at 2a

By superposition we get a solution for the general side conditions (4.15) (when neither f(x) nor g(x) are identically zero).

 F-(x --at) +-F-(x +-at) -H-(x --at)-+ H-(x-+-at) y(x,t) = 2 + 2a .
(4.17)

Do note the minus sign before the H , and the a in the second denominator.

Exercise 4.8.1: Check that the new formula (4.17) satisfies the side conditions (4.15).

Warning: Make sure you use the odd extensions F(x) and G (x) , when you have formulas for f (x) and g(x) . The thing is, those formulas in general hold only for 0 < x < L , and are not usually equal to F (x) and G (x ) for other x .

4.8.4 Exercises

Exercise 4.8.2: Using the d’Alembert solution solve ytt = 4yxx , 0 < x < π , t > 0 , y(0,t) = y(π,t) = 0 , y(x,0) = sin x , and yt(x,0) = sinx . Hint: Note that sinx is the odd extension of y(x,0) and yt(x,0) .

Exercise 4.8.3: Using the d’Alembert solution solve ytt = 2yxx , 0 < x < 1 , t > 0 , y(0,t) = y(1,t) = 0 ,  5 y(x,0) = sin (πx) , and  3 yt(x,0) = sin (πx ) .

Exercise 4.8.4: Take ytt = 4yxx , 0 < x < π , t > 0 , y(0, t) = y(π, t) = 0 , y(x,0) = x(π - x) , and yt(x,0) = 0 . a) Solve using the d’Alembert formula. Hint: You can use the sine series for y(x,0) . b) Find the solution as a function of x for a fixed t = 0.5 , t = 1 , and t = 2 . Do not use the sine series here.

Exercise 4.8.5: Derive the d’Alembert solution for ytt = a2yxx , 0 < x < π , t > 0 , y(0,t) = y(π,t) = 0 , y(x,0 ) = f(x) , and y (x,0) = 0 t , using the Fourier series solution of the wave equation, by applying an appropriate trigonometric identity.

Exercise 4.8.6: The d’Alembert solution still works if there are no boundary conditions and the initial condition is defined on the whole real line. Suppose that ytt = yxx (for all x on the real line and t ≥ 0 ), y(x,0) = f(x) , and yt(x,0 ) = 0 , where

 ( ||||| 0 if x < -1, |||{ x + 1 if - 1 ≤ x < 0, f(x) = || ||||| -x + 1 if 0 ≤ x < 1, |( 0 if x > 1.

Solve using the d’Alembert solution. That is, write down a piecewise definition for the solution. Then sketch the solution for t = 0 , t = 1∕2 , t = 1 , and t = 2 .

Exercise 4.8.101: Using the d’Alembert solution solve y = 9y tt xx , 0 < x < 1 , t > 0 , y(0,t) = y(1,t) = 0 , y(x,0) = sin(2πx) , and yt(x,0) = sin(3πx) .

Exercise 4.8.102: Take ytt = 4yxx , 0 < x < 1 , t > 0 , y(0, t) = y(1,t) = 0 , y(x,0) = x - x2 , and y (x,0) = 0 t . Using the D’Alembert solution find the solution at a) t = 0.1 , b) t = 1∕2 , c) t = 1 . You may have to split your answer up by cases.

Exercise 4.8.103: Take ytt = 100yxx , 0 < x < 4 , t > 0 , y(0,t) = y(4,t) = 0 , y(x,0) = F(x) , and yt(x, 0) = 0 . Suppose that F(0) = 0 , F(1) = 2 , F (2) = 3 , F (3) = 1 . Using the D’Alembert solution find a) y(1, 1) , b) y(4,3) , c) y(3,9 ) .

3Named after the French mathematician Jean le Rond d’Alembert (1717 – 1783).

4We can just as well integrate with ξ first, if we wish.