Differential Equations for EngineersXYZ Homework Edition

⇩ Download ▾

4.8 D’Alembert Solution of The Wave Equation

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 equation.1 While this solution can be derived using Fourier series as well, it is really an awkward use of those concepts. It is easier and more instructive 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

y t t = a 2 y x x . \label{eq:1} y_{tt}=a^2 y_{xx}.

(4.8.1)

We wish to solve the equation (4.8.1) given the conditions

y ( 0 , t ) = y ( L , t ) = 0 for all  t , y ( x , 0 ) = f ( x ) 0 < x < L , y t ( x , 0 ) = g ( x ) 0 < x < L . \begin{align} y(0,t) &= y(L,t) = 0 & & \text{for all } t,\nonumber \\ y(x,0) &= f(x) & & 0 < x < L, \label{eq:2} \\ y_t(x,0) &= g(x) & & 0 < x < L. \end{align} \nonumber

(4.8.2)

Change of Variables

We will transform the equation into a simpler form where it can be solved by simple integration. We change variables to ξ=xat\xi =x-at, η=x+at\eta =x+at. The chain rule says:

x = ξ x ξ + η x η = ξ + η , t = ξ t ξ + η t η = a ξ + a η . \begin{align}\begin{aligned} \frac{\partial}{\partial x} &= \frac{\partial \xi}{\partial x} \frac{\partial}{\partial \xi}+\frac{\partial \eta}{\partial x}\frac{\partial}{\partial \eta}= \frac{\partial}{\partial \xi}+ \frac{\partial}{\partial \eta}, \\ \frac{\partial}{\partial t} &= \frac{\partial \xi}{\partial t}\frac{\partial}{\partial \xi}+\frac{\partial \eta}{\partial t}\frac{\partial}{\partial \eta}= -a \frac{\partial}{\partial \xi} + a\frac{\partial}{\partial \eta}.\end{aligned}\end{align} \nonumber

We compute

y x x = 2 y x 2 = ( ξ + η ) ( y ξ + y η ) = 2 y ξ 2 + 2 2 y ξ η + 2 y η 2 , y t t = 2 y 2 = ( a ξ + a η ) ( a y ξ + a y η ) = a 2 2 y ξ 2 2 a 2 2 y ξ η + a 2 2 y η 2 . \begin{align}\begin{aligned} y_{xx} &= \frac{\partial^2 y}{\partial x^2}= \left( \frac{\partial}{\partial \xi}+ \frac{\partial}{\partial \eta} \right) \left( \frac{\partial y}{\partial \xi}+ \frac{\partial y}{\partial \eta} \right)= \frac{\partial^2 y}{\partial \xi^2}+2 \frac{\partial^2 y}{\partial \xi \partial \eta}+ \frac{\partial^2 y}{\partial \eta^2}, \\ y_{tt} &= \frac{\partial^2 y}{\partial ^2}= \left( -a \frac{\partial}{\partial \xi}+a \frac{\partial}{\partial \eta} \right) \left( -a \frac{\partial y}{\partial \xi}+ a \frac{\partial y}{\partial \eta} \right)= a^2 \frac{\partial^2 y}{\partial \xi^2}-2a^2 \frac{\partial^2 y}{\partial \xi \partial \eta}+a^2 \frac{\partial^2 y}{\partial \eta^2}. \end{aligned}\end{align} \nonumber

In the above computations, we used the fact from calculus that 2yξη=2yηξ\frac{\partial^2 y}{\partial \xi \partial \eta}=\frac{\partial^2 y}{\partial \eta \partial \xi}. We plug what we got into the wave equation,

0 = a 2 y x x y t t = 4 a 2 2 y ξ η = 4 a 2 y ξ η . 0=a^2 y_{xx}-y_{tt}=4a^2 \frac{\partial^2 y}{\partial \xi \partial \eta}= 4a^2 y_{ \xi \eta}. \nonumber

Therefore, the wave equation (4.8.1) transforms into yξη=0y_{ \xi \eta} =0. It is easy to find the general solution to this equation by integrating twice. Keeping ξ\xi constant, we integrate with respect to η\eta first2 and notice that the constant of integration depends on ξ\xi; for each ξ\xi we might get a different constant of integration. We get yξ=C(ξ)y _{ \xi}=C( \xi). Next, we integrate with respect to ξ\xi and notice that the constant of integration must depend on η\eta. Thus, y=C(ξ)dξ+B(η)y= \int C( \xi)d \xi+B( \eta). The solution must, therefore, be of the following form for some functions A(ξ)A( \xi) and B(η)B( \eta ):

y = A ( ξ ) + B ( η ) = A ( x a t ) + B ( x + a t ) . y =A( \xi)+B( \eta)= A(x-at)+B(x+at). \nonumber

The solution is a superposition of two functions (waves) traveling at speed aa in opposite directions. The coordinates ξ\xi and η\eta are called the characteristic coordinates, and a similar technique can be applied to more complicated hyperbolic PDE. And in fact, in Section 1.9 it is used to solve first order linear PDE. Basically, to solve the wave equation (or more general hyperbolic equations) we find certain characteristic curves along which the equation is really just an ODE, or a pair of ODEs. In this case these are the curves where ξ\xi and η\eta are constant.

D’Alembert’s 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)F(x) denote the odd extension of f(x)f(x), and let G(x)G(x) denote the odd extension of g(x)g(x). Define

A ( x ) = 1 2 F ( x ) 1 2 a 0 x G ( s ) d s , B ( x ) = 1 2 F ( x ) + 1 2 a 0 x G ( s ) d s . A(x)= \frac{1}{2} F(x)- \frac{1}{2a} \int^x_0 G(s) ds,\quad B(x)= \frac{1}{2} F(x)+ \frac{1}{2a} \int^x_0 G(s) ds. \nonumber

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

y ( x , t ) = 1 2 F ( x a t ) 1 2 a 0 x a t G ( s ) d s + 1 2 F ( x + a t ) + 1 2 a 0 x + a t G ( s ) d s = F ( x a t ) + F ( x + a t ) 2 + 1 2 a x a t x + a t G ( s ) d s . \begin{align} y(x,t) &= \frac{1}{2}F(x-at)- \frac{1}{2a} \int_0^{x-at} G(s)ds+ \frac{1}{2}F(x+at)+ \frac{1}{2a} \int_0^{x+at} G(s)ds \label{eq:8} \\ &= \frac{F(x-at)+F(x+at)}{2} + \frac{1}{2a} \int_{x-at}^{x+at} G(s)ds. \end{align} \nonumber

(4.8.3)

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

y ( x , 0 ) = 1 2 F ( x ) 1 2 a 0 x G ( s ) d s + 1 2 F ( x ) + 1 2 a 0 x G ( s ) d s = F ( x ) . y(x,0)= \frac{1}{2}F(x)- \frac{1}{2a} \int_0^{x} G(s)ds+ \frac{1}{2}F(x)+ \frac{1}{2a} \int_0^{x} G(s)ds =F(x). \nonumber

So far so good. Assume for simplicity FF is differentiable. And we use the first form of (4.8.3) as it is easier to differentiate. By the fundamental theorem of calculus we have

y t ( x , t ) = a 2 F ( x a t ) + 1 2 G ( x a t ) + a 2 F ( x + a t ) + 1 2 G ( x + a t ) . y_t(x,t)= \frac{-a}{2}F'(x-at)+ \frac{1}{2}G(x-at)+ \frac{a}{2} F'(x+at)+ \frac{1}{2}G(x+at). \nonumber

So

y t ( x , 0 ) = a 2 F ( x ) + 1 2 G ( x ) + a 2 F ( x ) + 1 2 G ( x ) = G ( x ) . y_t(x,0)= \frac{-a}{2}F'(x)+ \frac{1}{2}G(x)+ \frac{a}{2} F'(x)+ \frac{1}{2}G(x)=G(x). \nonumber

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

y ( 0 , t ) = 1 2 F ( a t ) 1 2 a 0 a t G ( s ) d s + 1 2 F ( a t ) + 1 2 a 0 a t G ( s ) d s = 1 2 F ( a t ) 1 2 a 0 a t G ( s ) d s + 1 2 F ( a t ) + 1 2 a 0 a t G ( s ) d s = 0 . \begin{align}\begin{aligned} y(0,t) &= \frac{1}{2}F(-at)- \frac{1}{2a} \int_0^{-at} G(s)ds+ \frac{1}{2}F(at)+ \frac{1}{2a} \int_0^{at} G(s)ds \\ &= \frac{-1}{2}F(at)- \frac{1}{2a} \int_0^{at} G(s)ds+ \frac{1}{2}F(at)+ \frac{1}{2a} \int_0^{at} G(s)ds=0.\end{aligned}\end{align} \nonumber

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

y ( L , t ) = 1 2 F ( L a t ) 1 2 a 0 L a t G ( s ) d s + 1 2 F ( L + a t ) + 1 2 a 0 L + a t G ( s ) d s = 1 2 F ( L a t ) 1 2 a 0 L G ( s ) d s 1 2 a 0 a t G ( s ) d s + = 1 2 F ( L + a t ) + 1 2 a 0 L G ( s ) d s + 1 2 a 0 a t G ( s ) d s = 1 2 F ( L + a t ) 1 2 a 0 a t G ( s ) d s + 1 2 F ( L + a t ) + 1 2 a 0 a t G ( s ) d s = 0 . \begin{align}\begin{aligned} y(L,t) &= \frac{1}{2}F(L-at)- \frac{1}{2a} \int_0^{L-at} G(s)ds+ \frac{1}{2}F(L+at)+ \frac{1}{2a} \int_0^{L+at} G(s)ds \\ &= \frac{1}{2}F(-L-at)- \frac{1}{2a} \int_0^{L} G(s)ds- \frac{1}{2a} \int_0^{-at} G(s)ds +\\ &= \frac{1}{2}F(L+at)+ \frac{1}{2a} \int_0^{L} G(s)ds+ \frac{1}{2a} \int_0^{at} G(s)ds \\ &= \frac{-1}{2}F(L+at)- \frac{1}{2a} \int_0^{at} G(s)ds+ \frac{1}{2}F(L+at)+ \frac{1}{2a} \int_0^{at} G(s)ds=0.\end{aligned}\end{align} \nonumber

And voilà, it works.

Another Way to Solve for the Side Conditions

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 a t ) + B ( x + a t ) . y(x,t)=A(x-at)+B(x+at). \nonumber

If you think about it, the exact formulas for AA and BB are not hard to guess once you realize what kind of side conditions y(x,t)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)=0g(x)=0 (and hence G(x)=0G(x)=0) we have the solution

F ( x a t ) + F ( x + a t ) 2 . \frac{F(x-at)+F(x+at)}{2}. \nonumber

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

H ( x ) = 0 x G ( s ) d s . H(x)=\int_0^x G(s)ds. \nonumber

The solution in this case is

1 2 a x a t x + a t G ( s ) d s = H ( x a t ) + H ( x + a t ) 2 a . \frac{1}{2a} \int_{x-at}^{x+at} G(s)ds = \frac{-H(x-at)+H(x+at)}{2a}. \nonumber

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

y ( x , t ) = F ( x a t ) + F ( x + a t ) 2 + H ( x a t ) + H ( x + a t ) 2 a . \label{eq:21} y(x,t)= \frac{F(x-at)+F(x+at)}{2} + \frac{-H(x-at)+H(x+at)}{2a}.

(4.8.4)

Do note the minus sign before the HH, and the aa in the second denominator.

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

Remarks

Let us remark that the formula y(x,t)=A(xat)+B(x+at)y(x,t) = A(x-at) + B(x+at) is the reason why the solution of the wave equation doesn’t get as time goes on, that is, why in the examples where the initial conditions had corners, the solution also has corners at every time tt.

The corners bring us to another interesting remark. Nobody ever notices at first that our example solutions are not even differentiable (they have corners): In Example 1\PageIndex{1} above, the solution is not differentiable whenever x=t+0.5x=t+0.5 or x=t+0.5x=-t+0.5 for example. Really to be able to compute uxxu_{xx} or uttu_{tt}, you need not one, but two derivatives. Fear not, we could think of a shape that is very nearly F(x)F(x) but does have two derivatives by rounding the corners a little bit, and then the solution would be very nearly F(xt)+F(x+t)2\frac{F(x-t)+F(x+t)}{2} and nobody would notice the switch.

One final remark is what the d’Alembert solution tells us about what part of the initial conditions influence the solution at a certain point. We can figure this out by Let us suppose that the string is very long (perhaps infinite) for simplicity. Since the solution at time tt is

y(x,t)=F(xat)+F(x+at)2+12axatx+atG(s)ds,y(x,t) = \frac{F(x-at) + F(x+at)}{2} + \frac{1}{2a} \int_{x-at}^{x+at} G(s) \,ds, \nonumber

we notice that we have only used the initial conditions in the interval [xat,x+at][x-at,x+at]. These two endpoints are called the wavefronts, as that is where the wave front is given an initial (t=0t=0) disturbance at xx. So if a=1a=1, an observer sitting at x=0x=0 at time t=1t=1 has only seen the initial conditions for xx in the range [1,1][-1,1] and is blissfully unaware of anything else. This is why for example we do not know that a supernova has occurred in the universe until we see its light, millions of years from the time when it did in fact happen.

Footnotes

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

[2] There is nothing special about η\eta, you can integrate with ξ\xi first, if you wish.

Adapted from Differential Equations for Engineers by Jiří Lebl (https://www.jirka.org/diffyqs/), © Jiří Lebl, licensed under CC BY-SA 4.0. Changes were made. License: CC-BY-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or ADA Title II. Every page is built against an automated accessibility gate, and the published editions will meet ADA Title II requirements when they release in late September 2026. If something is unusable, please tell us.