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

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

4.7 One dimensional wave equation

Note: 1 lecture, §9.6 in [EP], §10.7 in [BD]

Imagine we have a tensioned guitar string of length L . Suppose we only consider vibrations in one direction. That is, let x denote the position along the string, let t denote time, and let y denote the displacement of the string from the rest position. See Figure 4.18.


PIC

Figure 4.18: Vibrating string.


The equation that governs this setup is the so-called one-dimensional wave equation:

|------------| |ytt = a2yxx,| --------------

for some constant a > 0 . Assume that the ends of the string are fixed in place:

y(0,t) = 0 and y(L,t) = 0.

Note that we have two conditions along the x axis as there are two derivatives in the x direction.

There are also two derivatives along the t direction and hence we need two further conditions here. We need to know the initial position and the initial velocity of the string. That is,

y(x,0) = f(x) and yt(x,0) = g(x),

for some known functions f(x) and g(x) .

As the equation is again linear, superposition works just as it did for the heat equation. And again we will use separation of variables to find enough building-block solutions to get the overall solution. There is one change however. It will be easier to solve two separate problems and add their solutions.

The two problems we will solve are

wtt = a2wxx, w (0,t) = w(L, t) = 0, w (x,0) = 0 for 0 < x < L, wt(x,0) = g(x) for 0 < x < L.
(4.10)

and

z = a2z , tt xx z(0,t) = z(L,t) = 0, z(x,0) = f (x ) for 0 < x < L, zt(x,0) = 0 for 0 < x < L.
(4.11)

The principle of superposition implies that y = w + z solves the wave equation and furthermore y(x,0) = w(x,0) + z(x,0) = f(x) and yt(x,0) = wt (x,0 ) + zt(x,0) = g(x) . Hence, y is a solution to

 2 ytt = a yxx, y(0,t) = y(L,t) = 0, y(x,0) = f (x ) for 0 < x < L, yt(x,0) = g(x) for 0 < x < L.
(4.12)

The reason for all this complexity is that superposition only works for homogeneous conditions such as y(0,t) = y(L,t) = 0 , y(x,0) = 0 , or yt(x,0) = 0 . Therefore, we will be able to use the idea of separation of variables to find many building-block solutions solving all the homogeneous conditions. We can then use them to construct a solution solving the remaining nonhomogeneous condition.

Let us start with (4.10). We try a solution of the form w (x,t) = X (x)T (t) again. We plug into the wave equation to obtain

X(x)T ′′(t) = a2X′′(x)T (t).

Rewriting we get

 ′′ ′′ -T-(t) = X--(x). a2T (t) X(x)

Again, left hand side depends only on t and the right hand side depends only on x . Therefore, both equal a constant, which we will denote by - λ .

 ′′ ′′ -T--(t) = - λ = X-(x). a 2T (t) X (x)

We solve to get two ordinary differential equations

 X ′′(x) + λX (x) = 0, ′′ 2 T (t) + λa T(t) = 0.
The conditions 0 = w (0,t) = X(0)T (t) implies X(0) = 0 and w(L,t) = 0 implies that X (L) = 0 . Therefore, the only nontrivial solutions for the first equation are when λ = λn = n2π22 L and they are
 ( ) Xn(x) = sin nπx . L

The general solution for T for this particular λn is

 (n-πa ) (nπa-) Tn(t) = A cos L t + B sin L t .

We also have the condition that w (x,0) = 0 or X(x)T(0) = 0 . This implies that T (0 ) = 0 , which in turn forces A = 0 . It is convenient to pick  L-- B = nπa (you will see why in a moment) and hence

 -L-- (nπa- ) Tn(t) = nπa sin L t .

Our building-block solutions are

 --L- (nπ-) (nπa-) wn(x,t) = n πa sin L x sin L t .

We differentiate in t , that is

 ( ) ( ) ∂wn-(x,t) = sin nπ-x co s nπa-t . ∂t L L

Hence,

 ( ) ∂wn- nπ- ∂t (x,0) = sin L x .

We expand g(x) in terms of these sines as

 ∑∞ ( ) g(x ) = b sin nπ-x . n L n=1

Using superposition we can just write down the solution to (4.10) as a series

 ∞ ∞ ( ) ( ) ∑ ∑ -L-- nπ- nπa- w (x, t) = bnwn(x,t) = bnnπa sin L x sin L t . n=1 n=1

Exercise 4.7.1: Check that w(x,0) = 0 and wt(x, 0) = g(x) .

Similarly we proceed to solve (4.11). We again try z(x,y) = X (x)T(t) . The procedure works exactly the same at first. We obtain

 ′′ X (x) + λX (x) = 0, T ′′(t) + λa2T(t) = 0.
and the conditions X(0) = 0 , X (L ) = 0 . So again  n2π2 λ = λn = -L2 and
 ( ) Xn(x) = sin nπx . L

This time the condition on T is T ′(0) = 0 . Thus we get that B = 0 and we take

 ( ) T (t) = cos nπa-t . n L

Our building-block solution will be

 (nπ ) (nπa ) zn(x,t) = sin ---x cos ----t. L L

We expand f(x) in terms of these sines as

 ∑∞ (nπ ) f(x) = cnsin ---x . n=1 L

And we write down the solution to (4.11) as a series

 ∞∑ ∑∞ (n π ) (nπa ) z(x,t) = cnzn(x,t) = cnsin ---x cos ----t . n=1 n=1 L L

Exercise 4.7.2: Fill in the details in the derivation of the solution of (4.11). Check that the solution satisfies all the side conditions.

Putting these two solutions together, let us state the result as a theorem.

Theorem 4.7.1. Take the equation

 2 ytt = a yxx, y(0,t) = y(L,t) = 0, y(x,0) = f (x ) for 0 < x < L, y(x,0) = g(x) for 0 < x < L, t
(4.13)

where

 ∑∞ (nπ ) f(x) = cnsin ---x , n=1 L

and

 ∑∞ (nπ ) g(x ) = bnsin ---x . n=1 L

Then the solution y(x,t) can be written as a sum of the solutions of (4.10) and (4.11). In other words,

|--------------------------------------------------------------|- | ∑∞ L (nπ ) (nπa ) (nπ ) ( nπa ) | |y(x,t) = bn----sin ---x sin ---t + cn sin --x cos ---t | | n=1 nπa L L L L | | ∑∞ ( ) [ ( ) ( )] | | = sin nπx bn-L--sin n-πat + cnco s nπa-t . | | n=1 L nπa L L | -----------------------------------------------------------------

Example 4.7.1: Let us try a simple example of a plucked string. Suppose that a string of length 2 is plucked in the middle such that it has the initial shape given in Figure 4.19. That is

 (|| f(x) = {|0.1x if 0 ≤ x ≤ 1, |(0.1(2 - x) if 1 < x ≤ 2.

The string starts at rest (g (x) = 0 ). Suppose that a = 1 in the wave equation for simplicity.


PIC

Figure 4.19: Plucked string.


We leave it to the reader to compute the sine series of f(x) . The series will be

 ∑∞ 0.8 (nπ ) ( nπ ) f(x) = --2-2 sin--- sin --x . n=1n π 2 2

Note that  (nπ ) sin 2- is the sequence 1, 0,-1,0,1,0,- 1,... for n = 1,2, 3,4,... . Therefore,

 ( ) ( ) ( ) 0.8 π- 0.8- 3π- -0.8- 5π- f (x ) = π2 sin 2x - 9π2 sin 2 x + 25π 2 sin 2 x - ⋅⋅⋅

The solution y(x,t) is given by

 ∑∞ ( ) ( ) ( ) y(x,t) = 0.8-sin nπ- sin nπx cos nπt n=1 n2π2 2 2 2 ∞ m+1 ( ) ( ) ∑ 0.8(-1)---- (2m---1-)π- (2m---1)π- = (2m - 1)2π2 sin 2 x cos 2 t m=1 ( ) ( ) ( ) ( ) ( ) ( ) 0.8 π- π- 0.8- 3π- 3π- -0.8-- 5π- 5π- = π2 sin 2x cos 2t - 9π 2 sin 2 x cos 2 t + 25π2 sin 2 x co s 2 t - ⋅⋅⋅


PIC

Figure 4.20: Shape of the plucked string for 0 < t < 3 .


A plot for 0 < t < 3 is given in Figure 4.20. Notice that unlike the heat equation, the solution does not become “smoother,” the “sharp edges” remain. We will see the reason for this behavior in the next section where we derive the solution to the wave equation in a different way.

Make sure you understand what the plot, such as the one in the figure, is telling you. For each fixed t , you can think of the function y(x,t) as just a function of x . This function gives you the shape of the string at time t .

4.7.1 Exercises

Exercise 4.7.3: Solve

ytt = 9yxx, y(0,t) = y(1,t) = 0, y(x,0) = sin(3πx) + 1sin(6πx) for 0 < x < 1, 4 yt(x,0 ) = 0 for 0 < x < 1.

Exercise 4.7.4: Solve

ytt = 4yxx, y(0,t) = y(1,t) = 0, 1 y(x,0) = sin(3πx) + 4 sin(6πx) for 0 < x < 1, yt(x,0 ) = sin(9πx) for 0 < x < 1.

Exercise 4.7.5: Derive the solution for a general plucked string of length L , where we raise the string some distance b at the midpoint and let go, and for any constant a (in the equation ytt = a2yxx ).

Exercise 4.7.6: Imagine that a stringed musical instrument falls on the floor. Suppose that the length of the string is 1 and a = 1 . When the musical instrument hits the ground the string was in rest position and hence y(x,0) = 0 . However, the string was moving at some velocity at impact (t = 0 ), say yt(x,0) = - 1 . Find the solution y(x,t) for the shape of the string at time t .

Exercise 4.7.7 (challenging): Suppose that you have a vibrating string and that there is air resistance proportional to the velocity. That is, you have

ytt = a2yxx - kyt, y(0,t) = y(1,t) = 0, y(x,0) = f(x) for 0 < x < 1, yt(x, 0) = 0 for 0 < x < 1.

Suppose that 0 < k < 2πa . Derive a series solution to the problem. Any coefficients in the series should be expressed as integrals of f(x) .

Exercise 4.7.101: Solve

ytt = yxx, y(0,t) = y(π,t) = 0, y(x,0) = sin(x) for 0 < x < π, yt(x,0 ) = sin(x) for 0 < x < π.

Exercise 4.7.102: Solve

y = 25y , tt xx y(0,t) = y(2,t) = 0, y(x,0) = 0 for 0 < x < 2, yt(x,0 ) = sin(πt) + 0.1 sin(2πt) for 0 < x < 2.

Exercise 4.7.103: Solve

ytt = 2yxx, y(0,t) = y(π,t) = 0, y(x,0) = x for 0 < x < π, y (x,0 ) = 0 for 0 < x < π. t

Exercise 4.7.104: Let’s see what happens when a = 0 . Find a solution to ytt = 0 , y(0,t) = y(π,t) = 0 , y(x,0) = sin(2x) , y (x,0 ) = sin(x) t .