[Go to the Notes on Diffy Qs home page] [PDF version]

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

Chapter 4
Fourier series and PDEs

4.1 Boundary value problems

Note: 2 lectures, similar to §3.8 in EP

4.1.1 Boundary value problems

Before we tackle the Fourier series, we need to study the so-called boundary value problems (or endpoint problems). For example, suppose we have

 ′′
x + λx =  0,  x(a) = 0,  x(b) = 0,

for some constant λ , where x(t)  is defined for t in the interval [a, b]  . Unlike before, when we specified the value of the solution and its derivative at a single point, we now specify the value of the solution at two different points. Note that x = 0  is a solution to this equation, so existence of solutions is not an issue here. Uniqueness of solutions is another issue. The general solution to  ′′
x  + λx = 0  will have two arbitrary constants present. It is, therefore, natural (but wrong) to believe that requiring two conditions will guarantee a unique solution.

Example 4.1.1: Take λ = 1  , a = 0  , b = π . That is,

x ′′ + x = 0, x (0 ) = 0, x (π) = 0.

Then x = sint is another solution (besides x = 0  ) satisfying both boundary conditions. There are more. Write down the general solution of the differential equation, which is x = Aco st + B sin t . The condition x(0) = 0  forces A = 0  . Letting x (π ) = 0  does not give us any more information as x = B sin t already satisfies both boundary conditions. Hence, there are infinitely many solutions of the form x = B sin t , where B is an arbitrary constant.

Example 4.1.2: On the other hand, change to λ = 2  .

 ′′
x  + 2x = 0,  x(0) = 0,  x(π) = 0.

Then the general solution is           √--        √--
x = A cos  2t + Bsin  2t . Letting x(0) = 0  still forces A = 0  . We apply the second condition to find                 √--
0 = x(π) = Bsin  2 π . As     √ --
sin   2π ⇔ 0  we obtain B = 0  . Therefore x = 0  is the unique solution to this problem.

What is going on? We will be interested in finding which constants λ allow a nonzero solution, and we will be interested in finding those solutions. This problem is an analogue of finding eigenvalues and eigenvectors of matrices.

4.1.2 Eigenvalue problems

For basic Fourier series theory we will need the following three eigenvalue problems. We will consider more general equations, but we will postpone this until chapter 5.

x′′ + λx = 0,  x(a) = 0,  x(b) = 0,
(4.1)

x′′ + λx = 0, x′(a) = 0,  x′(b) = 0,
(4.2)

and

  ′′                          ′      ′
x  + λx = 0,   x(a) = x(b), x (a) = x (b),
(4.3)

A number λ is called an eigenvalue of (4.1) (resp. (4.2) or (4.3)) if and only if there exists a nonzero (not identically zero) solution to (4.1) (resp. (4.2) or (4.3)) given that specific λ . The nonzero solution we found is called the corresponding eigenfunction.

Note the similarity to eigenvalues and eigenvectors of matrices. The similarity is not just coincidental. If we think of the equations as differential operators, then we are doing the same exact thing. For example, let       d2
L = - dt2    . We are looking for nonzero functions f satisfying certain endpoint conditions that solve (L - λ)f = 0  . A lot of the formalism from linear algebra can still apply here, though we will not pursue this line of reasoning too far.

Example 4.1.3: Let us find the eigenvalues and eigenfunctions of

x′′ + λx = 0, x(0) = 0,  x(π) = 0.

For reasons that will be clear from the computations, we will have to handle the cases λ > 0  , λ = 0  , λ < 0  separately. First suppose that λ > 0  , then the general solution to x ′′ + λx = 0  is

          √--        √--
x = A cos  λt + Bsin  λt.

The condition x(0 ) = 0  implies immediately A = 0  . Next

                  --
0 = x(π) = B sin √ λπ.

If B is zero then x is not a nonzero solution. So to get a nonzero solution we must have that    √ --
sin   λπ = 0  . Hence, √--
 λπ must be an integer multiple of π . In other words, √--
 λ = k for a positive integer k . Hence the positive eigenvalues are k2   for all integers k ≥ 1  . The corresponding eigenfunctions can be taken as x = sin kt . Just like for eigenvectors, we get all the multiples of an eigenfunction, so we only need to pick one.

Now suppose that λ = 0  . In this case the equation is   ′′
x  = 0  and the general solution is x = At + B . The condition x(0 ) = 0  implies that B = 0  , and x(π ) = 0  implies that A = 0  . This means that λ = 0  is not an eigenvalue.

Finally, suppose that λ < 0  . In this case we have the general solution

          √ ---         √ ---
x = A cosh  -λt + Bsinh   -λt.

Letting x (0) = 0  implies that A = 0  (recall cosh0 = 1  and sinh 0 = 0  ). So our solution must be            √---
x = B sin h  - λt and satisfy x(π ) = 0  . This is only possible if B is zero. Why? Because sinh ξ is only zero for ξ = 0  , you should plot sinh to see this. We can also see this from the definition of sinh. We get             et-e-t
0 = sinht =   2   . Hence  t   -t
e = e  , which implies t = -t and that is only true if t = 0  . So there are no negative eigenvalues.

In summary, the eigenvalues and corresponding eigenfunctions are

λk = k2    with an eigenfunction     xk = sinkt    for all integers k ≥ 1.

Example 4.1.4: Let us compute the eigenvalues and eigenfunctions of

 ′′             ′          ′
x  + λx = 0,  x (0) = 0,  x (π ) = 0.

Again we will have to handle the cases λ > 0  , λ = 0  , λ < 0  separately. First suppose that λ > 0  . The general solution to x′′ + λx = 0  is            --         --
x = Aco s √ λt + B sin √ λt . So

 ′         √ --        √ --
x  = -A sin   λt + B cos  λt.

The condition x′(0) = 0  implies immediately B = 0  . Next

                    --
0 = x′(π) = - A sin √ λπ.

Again A cannot be zero if λ is to be an eigenvalue, and     √--
sin  λπ is only zero if √--
 λ = k for a positive integer k . Hence the positive eigenvalues are again k2   for all integers k ≥ 1  . And the corresponding eigenfunctions can be taken as x = coskt .

Now suppose that λ = 0  . In this case the equation is x ′′ = 0  and the general solution is x = At + B so  ′
x = A .  ′
x (0) = 0  implies that A =  0  . Obviously setting  ′
x(π) = 0  does not get us anything new. This means that B could be anything (let us take it to be 1). So λ = 0  is an eigenvalue and x = 1  is a corresponding eigenfunction.

Finally, let λ < 0  . In this case we have the general solution           √ ---         √ ---
x = Aco sh   -λt + B sinh   -λt and hence

           √ ---         √ ---
x′ = A sinh   -λt + Bco sh   -λt.

We have already seen (with roles of A and B switched) that for this to be zero at t = 0  and t = π it implies that A = B = 0  . Hence there are no negative eigenvalues.

In summary, the eigenvalues and corresponding eigenfunctions are

λk = k2    with an eigenfunction    xk = sinkt    for all integers k ≥ 1,

and there is another eigenvalue

λ0 = 0    with an eigenfunction     x0 = 1.

The following problem is the one that leads to the general Fourier series.

Example 4.1.5: Let us compute the eigenvalues and eigenfunctions of

 ′′                            ′       ′
x  + λx = 0,  x(- π) = x(π), x (-π ) = x (π).

You should notice that we have not specified the values or the derivatives at the endpoints, but rather that they are the same at the beginning and at the end of the interval.

Let us skip λ < 0  . The computations are the same and again we find that there are no negative eigenvalues.

For λ = 0  , the general solution is x = At + B . The condition x(-π) = x(π)  implies that A = 0  (Aπ + B = - Aπ + B implies A =  0  ). The second condition x′(- π) = x′(π)  says nothing about B and hence λ = 0  is an eigenvalue with a corresponding eigenfunction x = 1  .

For λ > 0  we get that x = Aco s √ λt + B sin √ λt . Now

       √ --           √--          √--         √--
A cos(-  λπ) + Bsin(-  λ π) = A cos λ π + B sin λπ.

We remember that cos(-θ) = cosθ and sin(-θ) = - sin θ . Therefore,

     √ --        √ --        √ --        √ --
Acos   λπ - Bsin   λπ = Aco s  λπ + B sin   λπ.

and hence either B = 0  or    √ --
sin   λπ = 0  . Similarly (exercise) if we differentiate x and plug in the second condition we find that A = 0  or      --
sin √ λπ = 0  . Therefore, unless we want A and B to both be zero (which we do not) we must have    √ --
sin   λπ = 0  . Therefore, √--
 λ is an integer and hence the eigenvalues are yet again      2
λ = k   for an integer k ≥ 1  . In this case however, x = Aco skt + B sin kt is an eigenfunction for any A and any B . So we have two linearly independent eigenfunctions sin kt and coskt . Remember that for a matrix we could also have had two eigenvectors corresponding to an eigenvalue if the eigenvalue was repeated.

In summary, the eigenvalues and corresponding eigenfunctions are

λ = k2     with the eigenfunctions    co skt  and   sin kt    for all integers k ≥ 1,
 k
λ0 = 0     with an eigenfunction      x0 = 1.

4.1.3 Orthogonality of eigenfunctions

Something that will be very useful in the next section is the orthogonality property of the eigenfunctions. This is an analogue of the following fact about eigenvectors of a matrix. A matrix is called symmetric if A = AT  . Eigenvectors for two distinct eigenvalues of a symmetric matrix are orthogonal. That symmetry is required. We will not prove this fact here. The differential operators we are dealing with act much like a symmetric matrix. We, therefore, get the following theorem.

Theorem 4.1.1. Suppose that x1(t)  and x2(t)  are two eigenfunctions of the problem (4.1), (4.2) or (4.3) for two different eigenvalues λ1   and λ 2   . Then they are orthogonal in the sense that

∫  b
    x1(t)x2(t) dt = 0.
  a

Note that the terminology comes from the fact that the integral is a type of inner product. We will expand on this in the next section. The theorem has a very short, elegant, and illuminating proof so let us give it here. First note that we have the following two equations.

x ′′1 + λ1x1 = 0    and    x ′′2 + λ2x2 = 0.

Multiply the first by x
 2   and the second by x
 1   and subtract to get

(λ1 - λ2)x 1x 2 = x′′x 1 - x2x′′.
                2        1

Now integrate both sides of the equation.

         ∫ b          ∫ b
(λ1 - λ2)   x 1x 2 dt =   x′2′x1 - x2x′1′dt
          a           ∫a
                        b d-( ′       ′)
                    =     dt x2x1 - x2x1 dt
                      [a         ]b
                    = x ′2x 1 - x2x′1   = 0.
                                  t=a

The last equality holds because of the boundary conditions. For example, if we consider (4.1) we have x (a) = x (b ) = x (a) = x (b) = 0
 1       1      2       2  and so x′x  - x x′
 2 1    2 1   is zero at both a and b . As λ  ⇔ λ
 1    2   , the theorem follows.

Exercise 4.1.1 (easy): Finish the theorem (check the last equality in the proof) for the cases (4.2) and (4.3).

We have seen previously that sinnt was an eigenfunction for the problem  ′′
x  + λx = 0  , x(0 ) = 0  , x(π) = 0  . Hence we have the integral

∫ π

 0 (sin mt)(sin nt) dt = 0,    when  m ⇔ n.

Similarly

∫  π
   (cos mt)(cosnt) dt = 0,   when  m ⇔ n.
  0

And finally we also get

∫
   π
    (sinmt )(sinnt) dt = 0,    when m  ⇔ n,
  -π

∫
  π
   (cosmt )(co snt) dt = 0,   when  m ⇔ n,
 -π

and

∫ π
   (cosmt)(sinnt) dt = 0.
 -π

4.1.4 Fredholm alternative

We now touch on a very useful theorem in the theory of differential equations. The theorem holds in a more general setting than we are going to state it, but for our purposes the following statement is sufficient. We will give a slightly more general version in chapter 5.

Theorem 4.1.2 (Fredholm alternative* ). Exactly one of the following statements holds. Either

 ′′
x  + λx = 0,  x (a) = 0,  x(b) = 0
(4.4)

has a nonzero solution, or

 ′′
x  + λx = f(t),   x(a ) = 0, x (b ) = 0
(4.5)

has a unique solution for every function f continuous on [a, b]  .

The theorem is also true for the other types of boundary conditions we considered. The theorem means that if λ is not an eigenvalue, the nonhomogeneous equation (4.5) has a unique solution for every right hand side. On the other hand if λ is an eigenvalue, then (4.5) need not have a solution for every f , and furthermore, even if it happens to have a solution, the solution is not unique.

We also want to reinforce the idea here that linear differential operators have much in common with matrices. So it is no surprise that there is a finite dimensional version of Fredholm alternative for matrices as well. Let A be an n × n matrix. The Fredholm alternative then states that either (A - λI)⃗x = ⃗0  has a nontrivial solution, or (A - λI)⃗x = ⃗b has a solution for every ⃗b .

A lot of intuition from linear algebra can be applied for linear differential operators, but one must be careful of course. For example, one obvious difference we have already seen is that in general a differential operator will have infinitely many eigenvalues, while a matrix has only finitely many.

4.1.5 Application

Let us consider a physical application of an endpoint problem. Suppose we have a tightly stretched quickly spinning elastic string or rope of uniform linear density ρ . Let us put this problem into the xy -plane. The x axis represents the position on the string. The string rotates at angular velocity ω , so we will assume that the whole xy -plane rotates at angular velocity ω along. We will assume that the string stays in this xy -plane and y will measure its deflection from the equilibrium position, y = 0  , on the x axis. Hence, we will find a graph which gives the shape of the string. We will idealize the string to have no volume to just be a mathematical curve. If we take a small segment and we look at the tension at the endpoints, we see that this force is tangential and we will assume that the magnitude is the same at both end points. Hence the magnitude is constant everywhere and we will call its magnitude T . If we assume that the deflection is small then we can use Newton’s second law to get an equation

Ty ′′ + ρω 2y = 0.

Let L be the length of the string and the string is fixed at the beginning and end points. Hence, y(0) = 0  and y(L) = 0  . See Figure 4.1.


PIC

Figure 4.1: Whirling string.


We rewrite the equation as      ρω2
y′′ +-T-y = 0  . The setup is similar to Example 4.1.3, except for the interval length being L instead of π . We are looking for eigenvalues of y′′ + λy = 0, y(0) = 0,y(L) = 0  where λ =  ρω2-
     T  . As before there are no nonpositive eigenvalues. With λ > 0  , the general solution to the equation is          √ --        √--
y = Aco s  λx + Bsin  λx . The condition y(0) = 0  implies that A = 0  as before. The condition y(L ) = 0  implies that    √ --
sin   λL = 0  and hence √ --
  λL = kπ for some integer k > 0  , so

ρω 2       k2π2
----= λ =  --2-.
 T          L

What does this say about the shape of the string? It says that for all parameters ρ , ω , T not satisfying the above equation, the string is in the equilibrium position, y = 0  . When ρω2=  k2π22
 T    L    , then the string will “pop out” some distance B at the midpoint. We cannot compute B with the information we have.

Let us assume that ρ and T are fixed and we are changing ω . For most values of ω the string is in the equilibrium state. When the angular velocity ω hits a value       √--
ω = kπ√T
     L ρ  , then the string will pop out and will have the shape of a sin wave crossing the x axis k times. When ω changes again, the string returns to the equilibrium position. You can see that the higher the angular velocity the more times it crosses the x axis when it is popped out.

4.1.6 Exercises

Hint for the following exercises: Note that     √--
cos  λ(t - a)  and     √--
sin  λ(t - a)  are also solutions of the homogeneous equation.

Exercise 4.1.2: Compute all eigenvalues and eigenfunctions of x′′ + λx = 0, x(a) = 0, x(b) = 0  .

Exercise 4.1.3: Compute all eigenvalues and eigenfunctions of x′′ + λx = 0, x′(a) = 0, x′(b) = 0  .

Exercise 4.1.4: Compute all eigenvalues and eigenfunctions of  ′′           ′
x  + λx = 0, x(a) = 0, x(b) = 0  .

Exercise 4.1.5: Compute all eigenvalues and eigenfunctions of x′′ + λx = 0, x(a) = x(b), x′(a) = x′(b)  .

Exercise 4.1.6: We have skipped the case of λ < 0  for the boundary value problem  ′′                        ′        ′
x  + λx = 0, x(-π) = x(π), x (-π) = x (π )  . Finish the calculation and show that there are no negative eigenvalues.

4.2 The trigonometric series

Note: 2 lectures, §9.1 in EP

4.2.1 Periodic functions and motivation

As motivation for studying Fourier series, suppose we have the problem

x′′ + ω20x = f(t),
(4.6)

for some periodic function f(t)  . We have already solved

 ′′    2
x + ω 0x = F0cos ωt.
(4.7)

One way to solve (4.6) is to decompose f(t)  as a sum of cosines (and sines) and then solve many problems of the form (4.7). We then use the principle of superposition, to sum up all the solutions we got to get a solution to (4.6).

Before we proceed, let us talk a little bit more in detail about periodic functions. A function is said to be periodic with period P if f (t) = f (t + P)  for all t . For brevity we will say f(t)  is P -periodic. Note that a P -periodic function is also 2P -periodic, 3P -periodic and so on. For example, cos t and sint are 2π -periodic. So are cos kt and sinkt for all integers k . The constant functions are an extreme example. They are periodic for any period (exercise).

Normally we will start with a function f(t)  defined on some interval [- L,L]  and we will want to extend periodically to make it a 2L -periodic function. We do this extension by defining a new function F (t)  such that for t in [- L,L]  , F (t) = f(t)  . For t in [L,3L]  , we define F(t) = f (t - 2L)  , for t in [-3L, -L ]  , F(t) = f (t + 2L )  , and so on.

Example 4.2.1: Defined f(t) = 1 - t2   on [- 1,1]  . Now extend periodically to a 2-periodic function. See Figure 4.2.


PIC

Figure 4.2: Periodic extension of the function 1 - t2   .


You should be careful to distinguish between f(t)  and its extension. A common mistake is to assume that a formula for f(t)  holds for its extension. It can be confusing when the formula for f(t)  is periodic, but with perhaps a different period.

Exercise 4.2.1: Define f(t) = cos t on [-π∕2,π∕2]  . Now take the π -periodic extension and sketch its graph. How does it compare to the graph of cost .

4.2.2 Inner product and eigenvector decomposition

Suppose we have a symmetric matrix, that is AT = A . We have said before that the eigenvectors of A are then orthogonal. Here the word orthogonal means that if ⃗v and ⃗w are two distinct eigenvectors of A , then ⟨⃗v,⃗w⟩ = 0  . In this case the inner product ⟨⃗v,⃗w⟩ is the dot product, which can be computed as ⃗vTw⃗ .

To decompose a vector ⃗v in terms of mutually orthogonal vectors ⃗w1   and ⃗w2   we write

⃗v = a1⃗w1 + a 2w⃗2.

Let us find the formula for a
 1   and a
 2   . First let us compute

⟨⃗v, ⃗w1⟩ = ⟨a1⃗w 1 + a2⃗w 2, ⃗w1⟩ = a 1⟨⃗w 1, ⃗w1⟩ + a2⟨⃗w 2,w ⃗1⟩ = a 1⟨⃗w 1, ⃗w1⟩.

Therefore,

      ⟨⃗v,w⃗1⟩
a1 = --------.
     ⟨⃗w1,w⃗1⟩

Similarly

a2 = -⟨⃗v,w⃗2⟩-.
     ⟨⃗w2,w⃗2⟩

You probably remember this formula from vector calculus.

Example 4.2.2: Write    [ ]
⃗v = 23 as a linear combination of      [ ]
⃗w1 =  1-1 and      []
⃗w2 =  11 .

First note that ⃗w1   and ⃗w2   are orthogonal as ⟨⃗w 1,w⃗2⟩ = 1(1) + (- 1)1 = 0  . Then

     -⟨⃗v, ⃗w1⟩   -2(1)-+-3(--1)--  --1
a1 = ⟨⃗w 1,w⃗1⟩ = 1(1) + (-1)(-1 ) = 2 .

      ⟨⃗v,w⃗2⟩   2 + 3   5
a2 = --------= ----- = --.
     ⟨⃗w2, ⃗w 2⟩  1 + 1   2

Hence

[ ]      [  ]     [ ]
 2 =  -1-  1  + 5- 1 .
 3     2  -1    2  1

4.2.3 The trigonometric series

Now instead of decomposing a vector in terms of the eigenvectors of a matrix, we will decompose a function in terms of eigenfunctions of a certain eigenvalue problem. In particular, the eigenvalue problem we will use for the Fourier series is

x′′ + λx = 0, x(- π) = x(π), x ′(-π ) = x′(π).

We have previously computed that the eigenfunctions are 1, coskt , sinkt . That is, we will want to find a representation of a 2 π -periodic function f(t)  as

|------------∞----------------------|
|       a0- ∑                       |
|f (t) = 2  +    ancos nt + bnsinnt. |
-------------n=1----------------------

This series is called the Fourier series† or trigonometric series for f(t)  . Note that here we have used the eigenfunction 12   instead of 1. This is for convenience. We could also think of 1 = cos0t , so that we only need to look at coskt and sin kt .

Just like for matrices we will want to find a projection of f(t)  onto the subspace generated by the eigenfunctions. So we will want to define an inner product of functions. For example, to find an  we want to compute ⟨f(t), cosnt⟩ . We define the inner product as

               ∫
          def1    π
⟨f (t),g(t)⟩ = --    f(t)g (t) dt.
             π   -π

With this definition of the inner product, we have seen in the previous section that the eigenfunctions coskt (this includes the constant eigenfunction), and sinkt are orthogonal in the sense that

⟨co smt, cosnt⟩ = 0    for m ⇔ n,

 ⟨sinmt, sin nt⟩ = 0    for m ⇔ n,
 ⟨sin mt, cosnt⟩ = 0    for all m and n.
By elementary calculus we have that ⟨cos nt, cosnt⟩ = 1  (except for n = 0  ) and ⟨sinnt, sin nt⟩ = 1  . For the constant we get that ⟨1,1⟩ = 2  . The coefficients are given by
|-------------------------∫----------------|
|      -⟨f(t), co-snt⟩   1-  π              |
| an = ⟨cosnt, co snt⟩ = π   f (t)cos nt dt,|
|                        ∫ -ππ              |
| bn = -⟨f-(t), sinnt⟩-= 1-    f(t)sinnt dt.  |
-------⟨sin-nt, sinnt⟩--π---π----------------

Compare these expressions with the finite dimensional example. The formula above also works for n = 0  , or more simply

       ∫ π
a  = 1-    f(t) dt.
 0   π  -π

Let us check the formulas using the orthogonality properties. Suppose for a moment that

           ∑∞
f (t) = a0-+    a cos nt + b sinnt.
       2        n         n
            n=1

Then for m ≥ 1  we have

               ⟨a0  ∑∞                          ⟩
⟨f (t), cos mt⟩ = --+     ancos nt + bnsinnt, c osmt
                2    n=1
               a             ∑∞
            =  -0⟨1, cos mt⟩ +   an⟨cosnt, cosmt⟩ + bn⟨sin nt, cosmt ⟩
               2              n=1
            =  a ⟨cosmt, cos mt⟩.
                m

And hence a  = -⟨f(t),cosmt⟩-
 m   ⟨cosmt,cosmt⟩ .

Exercise 4.2.2: Carry out the calculation for a 0   and bm  .

Example 4.2.3: Take the function

f(t) = t

for t in (-π, π]  . Extend f(t)  periodically and write it as a Fourier series. This function is called the sawtooth.


PIC

Figure 4.3: The graph of the sawtooth function.


The plot of the extended periodic function is given in Figure 4.3. Now we compute the coefficients. Let us start with a
 0

      ∫
    1    π
a0 =--    t dt = 0.
    π   -π

We will often use the result from calculus that the integral of an odd function over a symmetric interval is zero. Recall that an odd function is a function φ(t)  such that φ(-t) = - φ(t)  . For example the function t , the function sint , or more to the point the function tcosmt are all odd.

      1∫  π
am =  --   tcos mt dt = 0.
      π  -π

Let us move to bm  . Another useful fact from calculus is that the integral of an even function over a symmetric interval is twice the integral of the same function over half the interval. Recall an even function is a function φ(t)  such that φ(-t) = φ (t)  . For example tsinmt is even.

     1 ∫  π
bm = --    tsinmt dt
     π ∫ -π
     2-   π
   = π     tsinmt dt
       ( 0[        ]π      ∫  π        )
   = 2-   -tcos-mt-   + 1-    cosmt dt
     π       m     t=0   m   0
     2 (- πco smπ    )
   = -- ----------+ 0
     π      m
     --2co-sm-π   2(-1)m+1-
   =     m      =    m    .

We have used the fact that

                 (
             m   ||{ 1    if m even,
cosm π = (-1)  = ||( -1   if m odd.

The series, therefore, is

      ∑∞       n+1
f(t) =     2(--1)---sinnt.
      n=1    n

Let us write out the first 3 harmonics of the series for f(t)  .

                     2-
f(t) = 2 sin t - sin 2t + 3 sin3t + ⋅⋅⋅

The plot of these first three terms of the series, along with a plot of the first 20 terms is given in Figure 4.4.


PIC PIC

Figure 4.4: First 3 (left graph) and 20 (right graph) harmonics of the sawtooth function.


Example 4.2.4: Take the function

       (
       ||{0   if -π < t ≤ 0,
f (t) = ||
       (π   if 0 < t ≤ π.

Extend f (t)  periodically and write it as a Fourier series. This function or its variants appear often in applications and the function is called the square wave.


PIC

Figure 4.5: The graph of the square wave function.


The plot of the extended periodic function is given in Figure 4.5. Now we compute the coefficients. Let us start with a
 0

     1 ∫ π         1 ∫  π
a0 = --    f(t) dt =--    π dt = π.
     π  -π         π   0

Next,

     1 ∫ π                1∫  π
am = --    f(t)co smt dt = --   π cosmt dt = 0.
     π  -π                π  0

And finally

       ∫ π
bm = 1-    f(t) sin mt dt
     π  -π
     1 ∫ π
   = --    πsinmt dt
     π[  0     ]π
   =  --cosmt-
         m     t=0
                          m   (|| 2-
   = 1---cosπm- = 1---(-1)- = {| m   if m is odd,
         m            m       |( 0   if m is even.

The series, therefore, is

          ∑∞                ∑∞
f(t) = π-+    2-sin nt = π-+    ---2-- sin (2k - 1)t.
      2    n=1 n         2   k=12k - 1
          nodd

Let us write out the first 3 harmonics of the series for f(t)  .

       π           2
f (t) = --+ 2sint + -sin 3t + ⋅⋅⋅
       2           3

The plot of these first three terms of the series, along with a plot of the first 20 harmonics is given in Figure 4.6.


PIC PIC

Figure 4.6: First 3 (left graph) and 20 (right graph) harmonics of the square wave function.


We have so far skirted the issue of convergence. It turns out that for example for the sawtooth function f (t)  , the equation

      ∑∞  2(- 1)n+1
f(t) =     --------sinnt.
      n=1    n

is only an equality for t where the sawtooth is continuous. That is, we do not get an equality for t = -π,π and all the other discontinuities of f(t)  . It is not hard to see that when t is an integer multiple of π (which includes all the discontinuities), then

∑∞       n+1
   2-(--1)-- sin nt = 0.
n=1    n

We redefine f(t)  on [-π,π]  as

       (||
f (t) = {|0   if t = - π or t = π,
       |(t   otherwise,

and extend periodically. The series equals this extended f(t)  everywhere, including the discontinuities. We will generally not worry about changing the function values at several (finitely many) points.

We will say more about convergence in the next section. Let us however mention briefly an effect of the discontinuity. Let us zoom in near the discontinuity in the square wave. Further, let us plot the first 100 harmonics, see Figure 4.7. You will notice that while the series is a very good approximation away from the discontinuities, the error (the overshoot) near the discontinuity at t = π does not seem to be getting any smaller. This behavior is known as the Gibbs phenomenon. The region where the error is large gets smaller and smaller, however, the more terms in the series you take.


PIC

Figure 4.7: Gibbs phenomenon in action.


We can think of a periodic function as a “signal” being a superposition of many signals of pure frequency. That is, we could think of say the square wave as a tone of certain frequency. It will be in fact a superposition of many different pure tones of frequency which are multiples of the base frequency. On the other hand a simple sine wave is only the pure tone. The simplest way to make sound using a computer is the square wave, and the sound will be a very different from nice pure tones. If you have played video games from the 1980s or so you have heard what square waves sound like.

4.2.4 Exercises

Exercise 4.2.3: Suppose f(t)  is defined on [- π,π]  as sin 5t + cos3t . Extend periodically and compute the Fourier series of f(t)  .

Exercise 4.2.4: Suppose f(t)  is defined on [-π, π]  as |t| . Extend periodically and compute the Fourier series of f(t)  .

Exercise 4.2.5: Suppose f(t)  is defined on [-π,π]  as   3
|t|   . Extend periodically and compute the Fourier series of f(t)  .

Exercise 4.2.6: Suppose f(t)  is defined on [-π,π ]  as

      (
      ||{ -1  if - π < t ≤ 0,
f(t) = ||( 1   if 0 < t ≤ π.

Extend periodically and compute the Fourier series of f(t)  .

Exercise 4.2.7: Suppose f(t)  is defined on [-π, π]  as t3   . Extend periodically and compute the Fourier series of f(t)  .

Exercise 4.2.8: Suppose f(t)  is defined on [-π, π]  as  2
t   . Extend periodically and compute the Fourier series of f(t)  .

There is another form of the Fourier series using complex exponentials that is sometimes easier to work with.

Exercise 4.2.9: Let

       a0  ∑∞
f (t) = 2--+    ancos nt + bnsinnt.
            n=1

Use Euler’s formula eiθ = c osθ + isinθ , show that there exist complex numbers cm  such that

       ∑∞
f(t) =     cmeimt.
      m=-∞

Note that the sum now ranges over all the integers including negative ones. Do not worry about convergence in this calculation. Hint: It may be better to start from the complex exponential form and write the series as

     ∞
    ∑      imt       -imt
c0 +    cme  + c-me    .
    m=1

4.3 More on the Fourier series

Note: 2 lectures, §9.2 – §9.3 in EP

Before reading the lecture, it may be good to first try Project IV (Fourier series) from the IODE website: http://www.math.uiuc.edu/iode/. After reading the lecture it may be good to continue with Project V (Fourier series again).

4.3.1 2L -periodic functions

We have computed the Fourier series for a 2π -periodic function, but what about functions of different periods. Well, fear not, the computation is a simple case of change of variables. We can just rescale the independent axis. Suppose that you have the 2L -periodic function f(t)  (L is called the half period). Let s = πt
    L , then the function

        (L- )
g(s) = f π s

is 2π -periodic. We want to also rescale all our sines and cosines. We will want to write

|-------------∞------------------------|
|       a0-  ∑        nπ-         nπ-  |
| f(t) =  2 +    an cos L t + bnsin L t.|
-------------n=1------------------------

If we change variables to s we see that

       a   ∑∞
g(s) = -0+     ancosns + bnsinns.
       2   n=1

So we can compute a
 n  and b
 n  as before. After we write down the integrals we change variables back to t .

|------------------------------------------------|
|      1 ∫ π          1 ∫ L                      |
| a0 = --   g(s) ds = --    f(t) dt,               |
|      π ∫-π          L  -L   ∫                  |
|      1   π                1   L        nπ      |
| an = --   g(s)co sns ds = --   f (t)co s---t dt,|
|      π ∫-π                L∫ -L         L      |
|      1-  π               1-   L       nπ-      |
| bn = π  -π g(s)sinns ds = L  -L f(t)sin L t dt.|
--------------------------------------------------

The two most common half periods that show up in examples are π and 1 because of the simplicity. We should stress that we have done no new mathematics, we have only changed variables. If you understand the Fourier series for 2π -periodic functions, you understand it for 2L -periodic functions. All that we are doing is moving some constants around, but all the mathematics is the same.

Example 4.3.1: Let

f(t) = |t|    for - 1 < t < 1,

extended periodically. The plot of the periodic extension is given in Figure 4.8. Compute the Fourier series of f(t)  .


PIC

Figure 4.8: Periodic extension of the function f(t)  .


We will write       a0  ∑ ∞
f(t) = 2 +   n=1ancos nπt + bn sin nπt . For n ≥ 1  we note that |t|cosn πt is even and hence

     ∫ 1
an =     f(t)c osnπt dt
      -1
      ∫  1
   = 2    tcos nπt dt
        0               ∫
      [ t       ]1        1 1
   = 2 ---sinn πt   - 2    ---sinn πt dt
       n π       t=0     0 n( π       )   (
         -1--[      ]1    2-(-1-)n---1-   ||{0     if n is even,
   = 0 + n2π2 cosnπt t=0 =     n2π2    =  ||(--4
                                          n2π2  if n is odd.

Next we find a0

     ∫
       1
a0 =    |t| dt = 1.
      -1

You should be able to find this integral by thinking about the integral as the area under the graph without doing any computation at all. Finally we can find bn  . Here, we notice that |t|sinnπt is odd and, therefore,

     ∫ 1
bn =    f (t)sinnπt dt = 0.
      -1

Hence, the series is

      1-  ∑   --4--
f(t) = 2 +     n2π2 cosnπt.
          nn=o1dd

Let us explicitly write down the first few terms of the series up to the  rd
3   harmonic.

       1   4          4
f(t) ≈ --- -2 co sπt ---2 cos 3πt - ⋅⋅⋅
       2   π         9 π

The plot of these few terms and also a plot up to the   th
20   harmonic is given in Figure 4.9. You should notice how close the graph is to the real function. You should also notice that there is no “Gibbs phenomenon” present as there are no discontinuities.


PIC PIC

Figure 4.9: Fourier series of f(t)  up to the 3rd   harmonic (left graph) and up to the 20th   harmonic (right graph).


4.3.2 Convergence

We will need the one sided limits of functions. We will use the following notation

f(c-) = lim f(t),    and     f(c+ ) = lim f (t).
        t↑c                           t↓c

If you are unfamiliar with this notation, limt ↑c f(t)  means we are taking a limit of as t approaches c from below (i.e. t < c ) and limt ↓c f(t)  means we are taking a limit of as t approaches c from above (i.e. t > c ). For example, for the square wave function

       (|
f (t) = |{0   if -π < t ≤ 0,
       ||(π   if 0 < t ≤ π,
(4.8)

we have f (0 -) = 0  and f(0+ ) = π .

Let f (t)  be a function defined on an interval [a,b]  . Suppose that we find finitely many points a = t0   , t1   , t2   , …, tk = b in the interval, such that f(t)  is continuous on the intervals (t0,t1)  , (t1,t2)  , …, (t  ,t )
  k-1  k  . Also suppose that f (t -)
   k  and f(t+ )
  k  exists for each of these points. Then we say f (t)  is piecewise continuous.

If moreover, f (t)  is differentiable at all but finitely many points, and  ′
f (t)  is piecewise continuous, then f(t)  is said to be piecewise smooth.

Example 4.3.2: The square wave function (4.8) is piecewise smooth on [- π,π]  or any other interval. In such a case we just say that the function is just piecewise smooth.

Example 4.3.3: The function f (t) = |t| is piecewise smooth.

Example 4.3.4: The function f (t) = 1t  is not piecewise smooth on [- 1,1]  (or any other interval containing zero). In fact, it is not even piecewise continuous.

Example 4.3.5: The function f(t) = √3t is not piecewise smooth on [-1,1]  (or any other interval containing zero). f (t)  is continuous, but the derivative of f(t)  is unbounded near zero and hence not piecewise continuous.

Piecewise smooth functions have an easy answer on the convergence of the Fourier series.

Theorem 4.3.1. Suppose f(t)  is a 2L -periodic piecewise smooth function. Let

     ∑∞
a0-+    an cos n-πt + bn sin nπt
 2   n=1       L          L

be the Fourier series for f(t)  . Then the series converges for all t . If f(t)  is continuous near t , then

      a0   ∑∞       nπ          nπ
f(t) = ---+    an cos---t + bnsin--t.
       2   n=1       L          L

Otherwise

                    ∑∞
f-(t-)-+-f(t+-)=  a0-+    a cos nπ-t + b sin nπ-t.
      2         2    n=1  n    L      n    L

If we happen to have that f (t) = f(t-)+2f(t+)   at all the discontinuities, the Fourier series converges to f (t)  everywhere. We can always just redefine f (t)  by changing the value at each discontinuity appropriately. Then we can write an equals sign between f(t)  and the series without any worry. We mentioned this fact briefly at the end last section.

Note that the theorem does not say how fast the series converges. Think back the discussion of the Gibbs phenomenon in last section. The closer you get to the discontinuity, the more terms you need to take to get an accurate approximation to the function.

4.3.3 Differentiation and integration of Fourier series

Not only does Fourier series converge nicely, but it is easy to differentiate and integrate the series. We can do this just by differentiating or integrating term by term.

Theorem 4.3.2. Suppose

       a0   ∞∑        nπ         n π
f (t) = ---+    anco s---t + bnsin--t,
       2    n=1       L          L

is a piecewise smooth continuous function and the derivative f ′(t)  is piecewise smooth. Then the derivative can be obtained by differentiating term by term.

       ∑∞
f ′(t) =    -annπ-sin n-πt + bnn-πco s nπ-t.
       n=1   L       L      L       L

It is important that the function is continuous. It can have corners, but no jumps. Otherwise the differentiated series will fail to converge. For an exercise, take the series obtained for the square wave and try to differentiate the series. Similarly, we can also integrate a Fourier series.

Theorem 4.3.3. Suppose

       a0   ∞∑        nπ         n π
f (t) = ---+    anco s---t + bnsin--t,
       2    n=1       L          L

is a piecewise smooth function. Then the antiderivative is obtained by antidifferentiating term by term and so

      a 0t       ∑∞ anL     nπ    -bnL     nπ
F(t) =--- + C +    ----sin --t + -----cos --t.
       2        n=1 nπ     L      nπ      L

where F ′(t) = f (t)  and C is an arbitrary constant.

Note that the series for F (t)  is no longer a Fourier series as it contains the a0t
 2   term. The antiderivative of a periodic function need no longer be periodic and so we should not expect a Fourier series.

4.3.4 Rates of convergence and smoothness

Let us do an example of a periodic function with one derivative everywhere.

Example 4.3.6: Take the function

       (
       ||{(1 - t)t  if 0 < t < 1,
f (t) = ||((t + 1)t if - 1 < t < 0,

and extend to a 2-periodic function. The plot is given in Figure 4.10.


PIC

Figure 4.10: Smooth 2-periodic function.


Note that this function has a derivative everywhere, but it does not have two derivatives at all the integers.

Exercise 4.3.1: Compute   ′′
f  (0 +)  and  ′′
f (0-)  .

Let us compute the Fourier series coefficients. The actual computation involves several integration by parts and is left to student.

     ∫ 1         ∫  0          ∫  1
a0 =     f(t) dt =    (t + 1)tdt +    (1 - t)tdt = 0,
      -1           -1            0
     ∫ 1                ∫ 0                  ∫ 1
an =     f(t)c osnπtdt =    (t + 1)tcosnπtdt +   (1 - t)tcosnπtdt = 0
     ∫-1               ∫ -1                 ∫ 0
       1                  0                   1
bn =     f(t)sin nπtdt =    (t + 1 )tsinn πtdt +   (1 - t)tsinnπtdt
      -1            (    -1                  0
     4(1---(--1)n)   ||{π83n3   if n is odd,
   =     π3n3    =  ||(0     if n is even.

This series converges very fast. If you plot up to the third harmonic, that is the function

8-sinπt + -8---sin 3πt,
π3        27π3

it is almost indistinguishable from the plot of f(t)  in Figure 4.10. In fact, the coefficient 287π3    is already just 0.0096 (approximately). The reason for this behavior is the n3   term in the denominator. The coefficients b
 n  in this case go to zero as fast as -1
n3    goes to zero.

It is a general fact that if you have one derivative, the Fourier coefficients will go to zero approximately like n13    . If you have only a continuous function, then the Fourier coefficients will go to zero as -12
n    , and if you have discontinuities then the Fourier coefficients will go to zero approximately as 1
n . Therefore, we can tell a lot about the smoothness of a function by looking at its Fourier coefficients.

To justify this behavior take for example the function defined by the Fourier series

       ∞
      ∑  -1-
f(t) =    n 3 sinnt.
      n=1

When we differentiate term by term we notice

 ′     ∑∞  1
f (t) =     n2 cos nt.
       n=1

Therefore, the coefficients now go down like 1n2    , which we said means that we have a continuous function. That is, the derivative of f′(t)  may be defined at most points, but at least at some points it is not defined. If we differentiate again we find that f′′(t)  really is not defined at some points as we get a piecewise differentiable function

       ∑∞
f′′(t) =    -1-sin nt.
       n=1 n

This function is similar to the sawtooth. If we tried to differentiate again we would obtain

 ∞
∑
   - cos nt,
n=1

which does not converge!

Exercise 4.3.2: Use a computer to plot f(t)  , f ′(t)  and f′′(t)  . That is, plot say the first 5 harmonics of the functions. At what points does   ′′
f  (t)  have the discontinuities.

4.3.5 Exercises

Exercise 4.3.3: Let

       (
       ||{0  if -1 < t < 0,
f(t) = ||(t  if 0 ≤ t < 1,

extended periodically. a) Compute the Fourier series for f(t)  . b) Write out the series explicitly up to the 3rd   harmonic.

Exercise 4.3.4: Let

      (
      ||{ -t  if - 1 < t < 0,
f(t) = ||( t2   if 0 ≤ t < 1,

extended periodically. a) Compute the Fourier series for f(t)  . b) Write out the series explicitly up to the 3rd   harmonic.

Exercise 4.3.5: Let

       (
       ||{-1t0  if -10 < t < 0,
f (t) = ||(-t  if 0 ≤ t < 10,
        10

extended periodically (period is 20). a) Compute the Fourier series for f (t)  . b) Write out the series explicitly up to the 3rd   harmonic.

Exercise 4.3.6: Let f (t) = ∑∞   1-cosnt
        n=1 n3 . Is f(t)  continuous and differentiable everywhere? Find the derivative (if it exists) or justify if it does not exist.

Exercise 4.3.7: Let       ∑       n
f(t) =  ∞n=1 (-1n)sinnt . Is f (t)  differentiable everywhere? Find the derivative (if it exists) or justify if it does not exist.

4.4 Sine and cosine series

Note: 2 lectures, §9.3 in EP

4.4.1 Odd and even periodic functions

You may have noticed by now that an odd function has no cosine terms in the Fourier series and an even function has no sine terms in the Fourier series. This observation is not a coincidence. Let us look at even and odd periodic function in more detail.

Recall a function f(t)  is odd if f(- t) = -f (t)  . A function f(t)  is even if f(-t) = f (t)  . For example, co snt is even and sin nt is odd. Similarly the function  k
t  is even if k is even and odd when k is odd.

Exercise 4.4.1: Take two functions f(t)  and g(t)  and define their product h (t) = f (t)g(t)  . a) Suppose both are odd, is h(t)  odd or even? b) Suppose one is even and one is odd, is h(t)  odd or even? c) Suppose both are even, is h(t)  odd or even?

If f(t)  is odd and g(t)  we cannot in general say anything about the sum f(t) + g(t)  . In fact, the Fourier series of any function is really a sum of an odd (the sine terms) and an even (the cosine terms) function.

In this section we are interested in odd and even periodic functions. We have previously defined the 2L -periodic extension of a function defined on the interval [-L, L]  . Sometimes we are only interested in the function in the range [0,L]  and it would be convenient to have an odd (resp. even) function. If the function is odd, all the sine (resp. cosine) terms will disappear. What we can do is take the odd (resp. even) extension of the function to [- L,L]  and then we can extend periodically to a 2L -periodic function.

Take a function f (t)  defined on [0, L]  . On (- L,L]  define the functions

          (|
F   (t) d=ef|{f (t)    if 0 ≤ t ≤ L,
  odd      ||(- f(-t)  if -L < t < 0,
          (
       def||{f (t)    if 0 ≤ t ≤ L,
Feven(t)=  ||(f (- t)  if -L < t < 0.
And extend Fodd(t)  and Feven(t)  to be 2L -periodic. Then Fodd(t)  is called the odd periodic extension of f (t)  , and Feven(t)  is called the even periodic extension of f .

Exercise 4.4.2: Check that Fodd(t)  is odd and that Feven(t)  is even.

Example 4.4.1: Take the function f (t) = t(1 - t)  defined on [0,1]  . Figure 4.11 shows the plots of the odd and even extensions of f (t)  .


PIC PIC

Figure 4.11: Odd and even 2-periodic extension of f(t) = t(1 - t)  , 0 ≤ t ≤ 1  .


4.4.2 Sine and cosine series

Let f(t)  be an odd 2L -periodic function. We write the Fourier series for f (t)  , we compute the coefficients an  (including n = 0  ) and get

       ∫  L
an = 1-    f(t)cos nπt dt = 0.
     L   -L        L

That is, there are no cosine terms in a Fourier series of an odd function. The integral is zero because f (t)cos nπLt is an odd function (product of an odd and an even function is odd) and the integral of an odd function over a symmetric interval is always zero. Furthermore, the integral of an even function over a symmetric interval [- L,L]  is twice the integral of the function over the interval [0,L]  . The function f(t)sin nLπt is the product of two odd functions and hence even.

       ∫ L                  ∫  L
bn = 1-   f (t)sin nπt dt = 2    f(t)sin nπ-t dt.
     L  -L        L       L   0         L

We can now write the Fourier series of f(t)  as

 ∞
∑        nπ-
    bnsin  L t.
n=1

Similarly, if f(t)  is an even 2L -periodic function. For the same exact reasons as above, we find that bn = 0  and

     2 ∫  L        nπ
an = --    f(t)cos --t dt.
     L   0         L

The formula still works for n = 0  in which case it becomes

       ∫
     2-  L
a0 = L     f(t) dt.
        0

The Fourier series is then

  ∑∞
a0-   ancos nπt.
2  n=1       L

An interesting consequence is that the coefficients of the Fourier series of an odd (or even) function can be computed by just integrating over the half interval. Therefore, we can compute the odd (or even) extension of a function as a Fourier series by computing certain integrals over the interval where the original function is defined.

Theorem 4.4.1. Let f (t)  be a piecewise smooth function defined on [0,L ]  . Then the odd extension of f (t)  has the Fourier series

|------------------------|
|         ∑∞       n π   |
| Fodd(t) =    bnsin---t, |
-----------n=1-------L-----

where

|--------------------------|
|      2∫  L       n π     |
|bn = --    f (t)sin---t dt.|
------L---0---------L-------

The even extension of f (t)  has the Fourier series

|----------------∞-------------|
|          a0-  ∑        nπ-   |
| Feven(t) =  2 +    an cos L t, |
----------------n=1-------------

where

|--------∫--L----------------|
| a  = 2-    f(t)cos nπt dt. |
|  n   L   0         L       |
-----------------------------

The series ∑
  ∞n=1 bnsin nπL t is called the sine series of f(t)  and the series     ∑
a20+   ∞n=1anco s nLπt is called the cosine series of f (t)  . It is often the case that we do not actually care what happens outside of [0,L]  . In this case, we can pick whichever series fits our problem better.

It is not necessary to start with the full Fourier series to obtain the sine and cosine series. The sine series is really the eigenfunction expansion of f (t)  using the eigenfunctions of the eigenvalue problem x′′ + λx = 0  , x(0) = 0  , x(L) = L . The cosine series is the eigenfunction expansion of f(t)  using the eigenfunctions of the eigenvalue problem x′′ + λx = 0  , x ′(0) = 0  ,  ′
x (L) = L . We could have, therefore, have gotten the same formulas by defining the inner product

             ∫ L
⟨f (t),g(t)⟩ =    f (t)g(t) dt,
              0

and following the procedure of § 4.2. This point of view is useful because many times we use a specific series because our underlying question will lead to a certain eigenvalue problem. In fact, if the eigenvalue value problem is not one of the three we covered so far, you can still do an eigenfunction expansion, generalizing the results of this chapter. We will deal with such a generalization in chapter 5.

Example 4.4.2: Find the Fourier series of the even periodic extension of the function        2
f(t) = t   for 0 ≤ t ≤ π .

We will write

            ∞
      a-0  ∑
f(t) = 2 +     ancosnt,
           n=1

where

     2∫  π       2π2
a0 = --   t2 dt =----,
     π  0         3

and

     2 ∫ π             2 [ 1      ]π   4 ∫  π
an = --   t2cos nt dt =--t2--sinnt  - ---    tsinnt dt
     π  0              π∫   n       0  nπ   0
     -4-[      ]π   -4--  π           4(-1)n-
  =  n2π tcosnt 0 + n2π    cos nt dt =  n2  .
                         0

Note that we have detected the “continuity” of the extension since the coefficients decay as 1
n2    . That is, the even extension of t2   has no jump discontinuities. Although it will have corners, since the derivative (which will be on odd function and a sine series) will have a series whose coefficients decay only as 1
n  so it will have jumps.

Explicitly, the first few terms of the series are

π2                   4
---- 4co st + cos2t ---cos3t + ⋅⋅⋅
 3                   9

Exercise 4.4.3: a) Compute the derivative of the even extension of f(t)  above and verify it has jump discontinuities. Use the actual definition of f(t)  , not its cosine series! b) Why is it that the derivative of the even extension of f(t)  is the odd extension of f′(t)  .

4.4.3 Application

We have said that Fourier series ties in to the boundary value problems we studied earlier. Let us see this connection in more detail.

Suppose we have the boundary value problem for 0 < t < L ,

 ′′
x  (t) + λx (t) = f (t),

for the Dirichlet boundary conditions x(0) = 0  , x(L) = 0  . By using the Fredholm alternative (Theorem 4.1.2) we note that as long as λ is not an eigenvalue of the underlying homogeneous problem, there will exist a unique solution. Note that the eigenfunctions of this eigenvalue problem were the functions    nπ
sin L-t . Therefore, to find the solution, we first find f(t)  in terms of the Fourier sine series. We write x as a sine series as well with unknown coefficients. We substitute into the equation and solve for the Fourier coefficients of x .

If on the other hand we have the Neumann boundary conditions  ′
x (0) = 0  ,  ′
x (L ) = 0  . We do the same procedure using the cosine series. These methods are best seen by examples.

Example 4.4.3: Take the boundary value problem for 0 < t < 1  ,

 ′′
x  (t) + 2x(t) = f (t),

where f (t) = t on 0 < t < 1  . We want to look for a solution x satisfying the Dirichlet conditions x(0) = 0  , x(1) = 0  . We write f(t)  as a sine series

       ∞
      ∑
f(t) =    cnsinnπt,
       n=1

where

      ∫  1            2 (- 1)n+1
cn = 2    tsin nπt dt =--------.
        0                nπ

We write x(t)  as

      ∑∞
x(t) =    bnsinnπt.
       n=1

We plug in to obtain

 ′′           ∑∞      2 2          ∑∞
x (t) + 2x(t) =  - bnn π sinn πt + 2   bnsinnπt
              n=1                   n=1
              ∑∞
            =    bn(2 - n2π2)sinnπt
              n=1
                    ∑∞       n+1
            = f(t) =    2(-1)---sinn πt.
                     n=1    nπ

Therefore,

                    n+1
bn(2 - n2π2) = 2(--1)---
                 nπ

or

            n+1
bn = --2(-1)-----.
     nπ(2 - n2π2)

We have thus obtained a Fourier series for the solution

       ∞
      ∑   --2(-1)n+1--
x(t) =    nπ(2 - n2π2) sinnπt.
       n=1

Example 4.4.4: Similarly we handle the Neumann conditions. Take the same boundary value problem for 0 < t < 1  ,

 ′′
x  (t) + 2x(t) = f (t),

where f (t) = t on 0 < t < 1  . However, let us now consider the Neumann conditions x′(0) = 0  , x′(1) = 0  . We write f(t)  as a cosine series

           ∞∑
      c0
f(t) = 2  +    cncos nπt,
           n=1

where

      ∫ 1
c0 = 2    t dt = 1,
       0

and

      ∫  1                   n       (| -4-
c = 2     tcosnπt dt = 2((--1)---1)-= |{ π2n2  if n odd,
 n     0                  π2n2       ||(0     if n even.

We write x(t)  as a cosine series

           ∑∞
x(t) = a0-+    a co snπt.
      2        n
           n=1

We plug in to obtain

              ∑∞                          ∞∑
x′′(t) + 2x(t) =  [-a n 2π 2cosn πt] + a + 2    [a  cosnπt]
                     n               0         n
               n=1   ∞                     n=1
                   ∑          2 2
            = a0 +    an(2 - n π )cosnπt
                   n=1
                     1   ∑∞  - 2
            = f (t) = --+     -2-2 co snπt.
                     2   n=1 π n
                         n odd

Therefore,      1
a 0 = 2   , an = 0  for n even and for n odd (n ≥ 1  )

        2 2   ---4-
an(2 - n π ) = π 2n2

or

a  = -------4-----.
 n   n2π2(2 - n 2π 2)

We have thus obtained a Fourier series for the solution

      ∑∞
x(t) =    -------4------cos nπt.
       n=1 n2π2(2 - n2π2)
      n odd

4.4.4 Exercises

Exercise 4.4.4: Take f(t) = (t - 1)2   defined on 0 ≤ t ≤ 1  . a) Sketch the plot of the even periodic extension of f . b) Sketch the plot of the odd periodic extension of f .

Exercise 4.4.5: Find the Fourier series of both the odd and even periodic extension of the function f (t) = (t - 1 )2   for 0 ≤ t ≤ 1  . Can you tell which extension is continuous from the Fourier series coefficients?

Exercise 4.4.6: Find the Fourier series of both the odd and even periodic extension of the function f (t) = t for 0 ≤ t ≤ π .

Exercise 4.4.7: Find the Fourier series of the even periodic extension of the function f(t) = sin t for 0 ≤ t ≤ π .

Exercise 4.4.8: Let

 ′′
x  (t) + 4x(t) = f (t),

where f (t) = 1  on 0 < t < 1  . a) Solve for the Dirichlet conditions x(0) = 0,x(1) = 0  . b) Solve for the Neumann conditions x′(0) = 0,x′(1 ) = 0  .

Exercise 4.4.9: Let

 ′′
x  (t) + 9x(t) = f (t),

for f (t) = sin 2πt on 0 < t < 1  . a) Solve for the Dirichlet conditions x(0) = 0,x(1) = 0  . b) Solve for the Neumann conditions x′(0) = 0,x′(1 ) = 0  .

Exercise 4.4.10: Let

 ′′
x  (t) + 3x (t) = f(t), x(0) = 0,  x(1) = 0,

where        ∑
f (t) =  ∞n=1bn sin nπt . Write the solution x(t)  as a Fourier series, where the coefficients are given in terms of b
 n  .

4.5 Applications of Fourier series

Note: 2 lectures, §9.4 in EP

4.5.1 Periodically forced oscillation

PIC

Let us return to the forced oscillations. We have a mass spring system as before, where we have a mass m on a spring with spring constant k , with damping c , and a force F (t)  applied to the mass. Now suppose that the forcing function F (t)  is 2L -periodic for some L > 0  . We have already seen this problem in chapter 2 with a simple F(t)  . The equation that governs this particular setup is

mx ′′(t) + cx ′(t) + kx(t) = F (t).
(4.9)

We know that the general solution will consist of xc  which solves the associated homogeneous equation mx ′′ + cx′ + kx = 0  , and a particular solution of (4.9) we will call xp  . Since the complementary solution xc  will decay as time goes on, we are mostly interested in the part of xp  which does not decay. We call this x
 p  the steady periodic solution as before. The difference in what we will do now is that we consider an arbitrary forcing function F(t)  .

For simplicity, let us suppose that c = 0  . The problem with c > 0  is very similar. The equation

mx ′′ + kx = 0

has the general solution

x(t) = A cosω 0t + B sin ω0t.

where       ∘ --
ω 0 =   k-
        m  . So any solution to mx′′(t) + kx(t) = F (t)  will be of the form A cos ω0t + B sinω 0t + xsp  , where xsp  is the particular steady periodic solution. The steady periodic solution will always have the same period as F (t)  .

In the spirit of the last section and the idea of undetermined coefficients we will first write

      c0   ∑∞       nπ          nπ
F(t) =-- +    cn cos---t + dnsin--t.
       2   n=1       L          L

Then we write

      a0   ∞∑        nπ         n π
x(t) = ---+    ancos ---t + bnsin--t,
      2    n=1      L           L

and we plug in x into the differential equation and solve for an  and bn  in terms of cn  and dn  . This is perhaps best seen by example.

Example 4.5.1: Suppose that k = 2  , and m = 1  . The units are the mks units (meters-kilograms-seconds) again. There is a jetpack strapped to the mass, which fires with a force of 1 Newtons for 1 second and then is off for 1 second. We want to find the steady periodic solution.

The equation is, therefore,

x′′ + 2x = F (t),

where F (t)  is the step function

      (
      ||{ 1  if 0 < t < 1,
F(t) = ||(
        0  if - 1 < t < 0,

extended periodically.

We write

           ∑∞
F (t) = c0+     c cos nπt + d sinn πt.
       2        n          n
            n=1

It is not hard to see that cn = 0  for n ≥ 1  :

     ∫                  ∫
       1                   1
cn =    F (t)co snπt dt =    cosnπt dt = 0.
      -1                  0

On the other hand

    ∫  1         ∫ 1
c0 =    F (t) dt =    dt = 1.
      -1          0

And

     ∫ 1
d =     F (t)sinn πt dt
 n    -1
     ∫ 1
  =     sinnπt dt
      0
     [- co-snπt]1
  =      nπ
               t=0( 2
     1 --(--1)n   ||{πn  if n odd,
  =     πn    =  ||(0   if n even.

So

           ∑∞
       1-      -2-
F (t) = 2 +     πn sinnπt.
           nn=o1dd

We want to try

           ∑∞
x(t) = a-0+    a cosn πt + b sinnπt.
       2   n=1  n          n

Once we plug into the differential equation  ′′
x  + 2x = F(t)  , it is clear that an = 0  for n ≥ 1  as there are no corresponding terms in the series for F(t)  . Similarly bn = 0  for n even. Hence we try

      a0   ∑∞
x(t) = ---+    bn sin nπt.
      2    n=1
           nodd

We plug into the differential equation and obtain

          ∑∞ [              ]         ∞∑  [        ]
x′′ + 2x =    - bnn2π2sinnπt + a 0 + 2    bnsinnπt
          n=1                         n=1
          nodd  ∞                    n odd
               ∑          2 2
        = a0 +    bn(2 - n π )sin nπt
              nn=od1d
                     ∑∞
        = F (t) = 1-+     2--sin nπt.
                 2       πn
                     nn=od1d

So      1
a0 = 2   , bn = 0  for even n , and for odd n we get

b  = -----2------.
 n   πn(2 - n2π2)

The steady periodic solution has the Fourier series

        1   ∑∞       2
xsp(t) = 4-+     πn(2---n2π2) sinnπt.
            nn=o1dd

We know this is the steady periodic solution as it contains no terms of the complementary solution and it is periodic with the same period as F(t)  itself. See Figure 4.12 for the plot of this solution.


PIC

Figure 4.12: Plot of the steady periodic solution xsp  of Example 4.5.1.


4.5.2 Resonance

Just like when the forcing function was a simple cosine, resonance could still happen. Let us assume c = 0  and we will discuss only pure resonance. Again, take the equation

  ′′
mx (t) + kx(t) = F (t).

When we expand F(t)  and find that some of its terms coincide with the complementary solution to mx ′′ + kx = 0  , we cannot use those terms in the guess. Just like before, they will disappear when we plug into the left hand side and we will get a contradictory equation (such as 0 = 1  ). That is, suppose

xc = A cosω 0t + B sin ω0t,

where       Nπ
ω 0 = L-  for some positive integer N . In this case we have to modify our guess and try

            (                      )   ∞
      a0-          N-π         N-π     ∑        nπ-        n-π
x(t) =  2 + t aN cos L t + bN sin L t +    anco s L t + bnsin L t.
                                       nn⇔=N1

In other words, we multiply the offending term by t . From then on, we proceed as before.

Of course, the solution will not be a Fourier series (it will not even be periodic) since it contains these terms multiplied by t . Further, the terms  (                     )
t aN cos NLπt + bN sin NLπt will eventually dominate and lead to wild oscillations. As before, this behavior is called pure resonance or just resonance.

Note that there now may be infinitely many resonance frequencies to hit. That is, as we change the frequency of F (we change L ), different terms from the Fourier series of F may interfere with the complementary solution and will cause resonance. However, we should note that since everything is an approximation and in particular c is never actually zero but something very close to zero, only the first few resonance frequencies will matter.

Example 4.5.2: Find the steady periodic solution to the equation

2x′′ + 18π 2x = F (t),

where

       (
       ||{1    if 0 < t < 1,
F(t) = ||(-1   if - 1 < t < 0,

extended periodically. We note that

        ∞
       ∑   -4-
F (t) =     πn sinnπt.
       nn= o1dd

Exercise 4.5.1: Compute the Fourier series of F to verify.

The solution must look like

x (t) = c1 cos3πt + c2sin 3πt + xp (t)

for some particular solution xp  .

We note that if we just tried a Fourier series with sinnπt as usual, we would get duplication when n = 3  . Therefore, we pull out that term and multiply by t . And we have add a cosine term to get everything right. That is, we must try

                               ∑∞
xp(t) = a3tcos3πt + b3tsin 3πt +    bn sin nπt.
                               n=1
                              nnod⇔d3

Let us compute the second derivative.

x′′p(t) = -6a 3πsin3πt - 9π2a3tcos3πt + 6b3π cos3πt - 9 π2b3tsin 3πt+
                                                                   ∞
                                                                  ∑      2 2
                                                                +    (- n π bn)sin nπt.
                                                                  nn= o1dd
                                                                  n⇔3
We now plug into the differential equation.
  ′′     2                        2                              2
2xp + 18π x = - 12a3π sin 3πt - 18π a 3t cos3πt + 1 2b3πcos 3πt - 18 π b3tsin 3πt+
                             + 18π2a tcos 3πt               + 1 8π2b tsin 3πt+
                                    3                               3
                ∑∞      2 2        2
              +    (- 2n π bn + 18 π bn)sin nπt.
                nn= o1dd
                n⇔3
If we simplify we obtain
   ′′      2                                  ∑∞      2 2        2
2x p + 18 π x = - 12a3π sin 3πt + 12b 3πcos 3πt + (- 2n π bn + 18π bn)sinnπt.
                                             nn= o1dd
                                              n⇔3

This series has to equal to the series for F (t)  . We equate the coefficients and solve for a3   and bn  .

     4∕(3π)   - 1
a3 = -------= --2-
     - 12π    9π
b3 = 0
            4               2
bn = ------2-----2-2-=  -3-------2-    for n odd and n ⇔ 3.
     nπ(18π  - 2n π )   π n(9 - n )

That is,

                     ∑∞
xp(t) = -1-tcos3 πt +    -----2-----sinnπt.
        9π2           n=1 π3n(9 - n2)
                     n on⇔d3d

When c > 0  , you will not have to worry about pure resonance. That is, there will never be any conflicts and you do not need to multiply any terms by t . There is a corresponding concept of practical resonance and it is very similar to the ideas we already explored in chapter 2. We will not go into details here.

4.5.3 Exercises

Exercise 4.5.2: Let F(t) = 1 + ∑ ∞ 1-cosn πt
      2     n=1 n2 . Find the steady periodic solution to  ′′
x  + 2x = F (t)  . Express your solution as a Fourier series.

Exercise 4.5.3: Let F(t) = ∑ ∞ -1sinn πt
        n=1n3 . Find the steady periodic solution to x′′ + x′ + x = F(t)  . Express your solution as a Fourier series.

Exercise 4.5.4: Let       ∑
F (t) =  ∞n=1n12 cosnπt . Find the steady periodic solution to x ′′ + 4x = F (t)  . Express your solution as a Fourier series.

Exercise 4.5.5: Let F(t) = t for - 1 < t < 1  and extended periodically. Find the steady periodic solution to  ′′
x + x = F (t)  . Express your solution as a Fourier series.

Exercise 4.5.6: Let F(t) = t for - 1 < t < 1  and extended periodically. Find the steady periodic solution to x′′ + π2x = F (t)  . Express your solution as a Fourier series.

4.6 PDEs, separation of variables, and the heat equation

Note: 2 lectures, §9.5 in EP

Let us recall that a partial differential equation or PDE is an equation containing the partial derivatives with respect to several independent variables. Solving PDEs will be our main application of Fourier series.

A PDE is said to be linear if the dependent variable and its derivatives appear at most to the first power and in no functions. We will only talk about linear PDEs. Together with a PDE, we usually have specified some boundary conditions, where the value of the solution or its derivatives is specified along the boundary of a region, and/or some initial conditions where the value of the solution or its derivatives is specified for some initial time. Sometimes such conditions are mixed together and we will refer to them simply as side conditions.

We will study three specific partial differential equations, each one representing a more general class of equations. First, we will study the heat equation, which is an example of a parabolic PDE. Next, we will study the wave equation, which is an example of a hyperbolic PDE. Finally, we will study the Laplace equation, which is an example of an elliptic PDE. Each of our examples will illustrate behavior that is typical for the whole class.

4.6.1 Heat on an insulated wire

Let us first study the heat equation. Suppose that we have a wire (or a thin metal rod) that is insulated except at the endpoints. Let x denote the position along the wire and let t denote time. See Figure 4.13.


PIC

Figure 4.13: Insulated wire.


Now let u (x,t)  denote the temperature at point x at time t . The equation governing this system is the so-called one-dimensional heat equation:

|---------2----|
| ∂u-    ∂-u-  |
--∂t-=-k-∂x2,--|

where k > 0  is a constant. That is, the change in heat at a specific point is proportional to the second derivative of the heat along the wire. This makes sense; if the heat distribution has a maximum (the graph is concave down), then heat flows away from the maximum. And vice-versa.

We will generally use a more convenient notation for partial derivatives. We will write u
 t  instead of ∂u
∂t  , and we will write uxx  instead of ∂2u
∂x2    . With this notation the heat equation becomes

ut = kuxx.

For the heat equation, we must also have some boundary conditions. We assume that the wire is of length L and the ends are either exposed and touching some body of constant heat, or the ends are insulated. If the ends of the wire are for example kept at temperature 0, then we must have the conditions

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

If, on the other hand, the ends are also insulated we get the conditions

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

In other words, heat is not flowing in nor out of the wire at the ends. Note that we always have two conditions along the x axis as there are two derivatives in the x direction. These side conditions are called homogeneous (that is, u or a derivative of u is set to zero).

Furthermore, we will suppose we know the initial temperature distribution.

u(x,0) = f (x ),

for some known function f(x)  . This initial condition is not a homogeneous side condition.

4.6.2 Separation of variables

The heat equation is linear, since u and its derivatives do not appear to any powers or in any functions. Thus the principle of superposition still applies for the heat equation (without side conditions). If u1   and u 2   are solutions and c1   , c2   are constants, then u = c1u1 + c2u 2   is also a solution.

Exercise 4.6.1: Verify the principle of superposition for the heat equation.

Superposition also preserves some of the side conditions. In particular, if u 1   and u2   are solutions that satisfy u(0,t) = 0  and u(L,t) = 0  , and c
 1   , c
 2   are constants, then u = c u  + cu
     1 1    2 2   is still a solution that satisfies u(0,t) = 0  and u(L,t) = 0  . Similarly for the side conditions ux(0,t) = 0  and ux(L,t) = 0  . In general, superposition preserves all homogeneous side conditions.

The method of separation of variables is to try to find solutions that are sums or products of functions of one variable. For example, for the heat equation, we try to find solutions of the form

u(x,t) = X (x)T(t).

That the desired solution we are looking for is of this form is too much to hope for. What is perfectly reasonable to ask, however, is to find enough “building-block” solutions u(x, t) = X(x)T(t)  using this procedure so that the desired solution to the PDE is somehow constructed from these building blocks by the use of superposition.

Let us try to solve the heat equation

ut = kuxx    with  u(0,t) = 0  and  u (L, t) = 0  and   u(x,0) = f (x).

Let us guess u(x,t) = X (x)T (t)  . We plug into the heat equation to obtain

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

We rewrite as

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

This equation is supposed to hold for all x and all t . But the left hand side does not depend on x and the right hand side does not depend on t . Therefore, each side must be a constant. Let us call this constant - λ (the minus sign is for convenience later). We obtain the two equations

  ′            ′′
T-(t) = -λ = X--(x).
kT (t)         X(x)

Or in other words

X′′(x) + λX(x) = 0,
  ′
T (t) + λkT (t) = 0.
The boundary condition u(0,t) = 0  implies X (0)T(t) = 0  . We are looking for a nontrivial solution and so we can assume that T (t)  is not identically zero. Hence X (0 ) = 0  . Similarly, u(L,t) = 0  implies X(L) = 0  . We are looking for nontrivial solutions X of the eigenvalue problem X ′′ + λX = 0  , X (0) = 0  , X(L) = 0  . We have previously found that the only eigenvalues are      n2π2
λn = L2    , for integers n ≥ 1  , where eigenfunctions are    nπ
sin L x . Hence, let us pick the solutions
           nπ
Xn(x) = sin --x.
           L

The corresponding Tn  must satisfy the equation

        2 2
T′(t) + n-π-kT (t) = 0.
 n      L2    n

By the method of integrating factor, the solution of this problem is

        -n2Lπ22kt
Tn(t) = e     .

It will be useful to note that Tn(0) = 1  . Our building-block solutions are

                     (   n π )  -n2π2-
un(x,t) = Xn (x)Tn(t) = sin--x e  L2 kt.
                          L

We note that un(x, 0) = sin nπL x . Let us write f(x)  as the sine series

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

That is, we find the Fourier series of the odd periodic extension of f(x)  . We used the sine series as it corresponds to the eigenvalue problem for X (x)  above. Finally, we use superposition to write the solution as

|---------∑∞------------∑∞----(-------)--------|
| u(x,t) =    b u (x,t) =    b  sin nπ-x e-nL2π22kt. |
|             n n            n     L           |
----------n=1-----------n=1---------------------

Why does this solution work? First note that it is a solution to the heat equation by superposition. It satisfies u(0,t) = 0  and u(L,t) = 0  , because x = 0  or x = L makes all the sines vanish. Finally, plugging in t = 0  , we notice that Tn(0) = 1  and so

         ∞              ∞
        ∑              ∑        n-π
u(x,0) =    bnun(x,0) =    bnsin L x = f(x).
         n=1             n=1

Example 4.6.1: Suppose that we have an insulated wire of length 1, such that the ends of the wire are embedded in ice (temperature 0). Let k = 0.003  . Then suppose that initial heat distribution is u(x,0) = 50x(1 - x)  . See Figure 4.14.


PIC

Figure 4.14: Initial distribution of temperature in the wire.


We want to find the temperature function u(x, t)  . Let us suppose we also want to find when (at what t ) does the maximum temperature in the wire drop to one half of the initial maximum of 12.5.

We are solving the following PDE problem:

ut = 0.003uxx,
u(0,t) = u(1,t) = 0,

u(x,0) = 5 0x(1 - x)   for 0 < x < 1.
We find the sine series for f (x) = 50x(1 - x)  for 0 < x < 1  . That is,        ∑ ∞
f (x ) =  n=1bnsinnπx, where
                                                   (
      ∫  1                       200   2 00(-1)n   ||{0     if n even,
bn = 2    50x(1 - x)sinnπx dx = --3-3 -----3-3-- = ||( 400-
        0                       π n       π n        π3n3  if n odd.


PIC

Figure 4.15: Plot of the temperature of the wire at position x at time t .


The solution u(x,t)  , plotted in Figure 4.15 for 0 ≤ t ≤ 100  , is given by the following series:

         ∞
         ∑  -400-          -n2π20.003t
u(x,t) =    π 3n 3 (sin nπx)e       .
        nn=od1d

Finally, let us answer the question about the maximum temperature. It is relatively easy to see that the maximum temperature will always be at x = 0.5  , in the middle of the wire. The plot of u(x,t)  confirms this intuition.

If we plug in x = 0.5  we get

           ∞∑
u (0.5,t) =    -400-(sin nπ0.5)e-n2π20.003t.
           n=1π 3n 3
          n odd

For n = 3  and higher (remember we are taking only odd n ), the terms of the series are insignificant compared to the first term. The first term in the series is already a very good approximation of the function and hence

          400   2
u(0.5,t) ≈ --3 e-π 0.003t.
          π

The approximation gets better and better as t gets larger as the other terms decay much faster. Let us plot the function u(0.5,t)  , the temperature at the midpoint of the wire at time t , in Figure 4.16. The figure also plots the approximation by the first term.


PIC

Figure 4.16: Temperature at the midpoint of the wire (the bottom curve), and the approximation of this temperature by using only the first term in the series (top curve).


It would be hard to tell the difference after t = 5  or so between the first term of the series representation of u(x,t)  and the real solution. This behavior is a general feature of solving the heat equation. If you are interested in behavior for large enough t , only the first one or two terms may be necessary.

Getting back to the question of when is the maximum temperature one half of the initial maximum temperature. That is, when is the temperature at the midpoint 12.5∕2 = 6.25  . We notice from the graph that if we use the approximation by the first term we will be close enough. Therefore, we solve

6.25 = 400-e-π20.003t.
        π3

That is,

       6.25π3-
t =-ln--400-- ≈ 24.5.
   - π20.003

So the maximum temperature drops to half at about t = 24.5  .

4.6.3 Insulated ends

Now suppose the ends of the wire are insulated. In this case, we are solving the equation

ut = kuxx    with  ux(0,t) = 0  and  ux(L,t) = 0  and   u(x,0) = f (x ).

Yet again we try a solution of the form u(x,t) = X (x )T (t)  . By the same procedure as before we plug into the heat equation and arrive at the following two equations

X′′(x) + λX(x) = 0,
  ′
T (t) + λkT (t) = 0.
At this point the story changes slightly. The boundary condition ux(0,t) = 0  implies X ′(0)T (t) = 0  . Hence X ′(0) = 0  . Similarly, ux(L, t) = 0  implies X ′(L) = 0  . We are looking for nontrivial solutions X of the eigenvalue problem X′′ + λX = 0  , X′(0) = 0  , X′(L) = 0  . We have previously found that the only eigenvalues are      n2π2
λn =  L2    , for integers n ≥ 0  , where eigenfunctions are     nπ
co sL x (we include the constant eigenfunction). Hence, let us pick solutions
           n-π
Xn(x) = cos L x     and     X0(x) = 1.

The corresponding T
 n  must satisfy the equation

       n2π2
T′n(t) +--2-kTn (t) = 0.
        L

For n ≥ 1  , as before,

        -n2Lπ22kt
Tn(t) = e     .

For n = 0  , we have   ′
T 0(t) = 0  and hence T0(t) = 1  . Our building-block solutions will be

                     (       )
                         n-π    -n22π2kt
un(x,t) = Xn(x)Tn(t) =  cos L x e  L  ,

and

u0(x,t) = 1.

We note that              nπ
un(x, 0) = cos L x . Let us write f using the cosine series

            ∞∑
f(x) = a0-+    a cos nπ-x.
       2        n    L
            n=1

That is, we find the Fourier series of the even periodic extension of f(x)  .

We use superposition to write the solution as

|--------------------------------------------------------|
|         a    ∞∑             a    ∑∞    (   nπ  ) -n2π2   |
|u (x,t) = -0-+    anun(x,t) = -0-+    an  cos---x e L2 kt. |
|         2    n=1            2   n=1        L           |
----------------------------------------------------------

Example 4.6.2: Let us try the same example as before, but for insulated ends. We are solving the following PDE problem

ut = 0.003uxx,
ux(0,t) = ux(1,t) = 0,

u(x,0) = 5 0x(1 - x)   for 0 < x < 1.

For this problem, we must find the cosine series of u (x,0)  . For 0 < x < 1  we have

             25   ∑∞  (-2 00)
50x(1 - x) = ---+      --2-2  cosnπx.
             3    n=2  π n
                  neven

The calculation is left to the reader. Hence, the solution to the PDE problem, plotted in Figure 4.17, is given by the series

              ∞  (      )
        25-   ∑   --200            -n2π20.003t
u(x,t) =  3 +       π2n2  (cosn πx)e        .
             nne=2ven


PIC

Figure 4.17: Plot of the temperature of the insulated wire at position x at time t .


Note in the graph that the temperature evens out across the wire. Eventually, all the terms except the constant die out, and you will be left with a uniform temperature of 25 ≈ 8.33
 3  along the entire length of the wire.

4.6.4 Exercises

Exercise 4.6.2: Suppose you have a wire of length 2, with k = 0.00 1  and an initial temperature distribution of u(x,0) = 50x . Suppose that both the ends are embedded in ice (temperature 0). Find the solution as a series.

Exercise 4.6.3: Find a series solution of

ut = uxx,

u(0,t) = u(1,t) = 0,
u(x,0) = 100     for 0 < x < 1.

Exercise 4.6.4: Find a series solution of

ut = uxx,

ux(0,t) = ux(π,t) = 0,
u (x,0 ) = 3 cosx + cos3x    for 0 < x < π.

Exercise 4.6.5: Find a series solution of

ut = uxx,
ux(0,t) = ux(π,t) = 0,

u(x,0) = cosx     for 0 < x < π.

Exercise 4.6.6: Find a series solution of

ut = uxx,
u(0,t) = 0, u (1,t) = 100,

u(x,0) = sin πx     for 0 < x < 1.
Hint: Use the fact that u(x,t) = 100x is a solution satisfying ut = uxx  , u(0,t) = 0  , u(1,t) = 1 00  . Then use superposition.

Exercise 4.6.7: Find the steady state temperature solution as a function of x alone, by letting t → ∞ in the solution from exercises 4.6.5 and 4.6.6. Verify that it satisfies the equation uxx = 0  .

Exercise 4.6.8: Use separation variables to find a nontrivial solution to uxx + uyy = 0  , where u(x,0) = 0  and u(0,y) = 0  . Hint: Try u(x,y) = X (x )Y (y)  .

Exercise 4.6.9 (challenging): Suppose that one end of the wire is insulated (say at x = 0  ) and the other end is kept at zero temperature. That is, find a series solution of

ut = kuxx,
ux(0,t) = u(L, t) = 0,

u(x, 0) = f(x)    for 0 < x < L.
Express any coefficients in the series by integrals of f(x)  .

4.7 One dimensional wave equation

Note: 1 lecture, §9.6 in EP

Suppose we have a string such as on a guitar 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:

|------2-----|
-ytt =-a-yxx,-

for some a > 0  . We will assume that the ends of the string are fixed and hence we get

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

Note that we always 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 will need two further conditions here. We will need to know the initial position and the initial velocity of the string.

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

ztt = a2zxx,
z(0,t) = z(L,t) = 0,
z(x,0) = f (x )          for 0 < x < L,
z(x,0) = 0              for 0 < x < L.
 t
(4.11)

The principle of superposition will then imply 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

y  = a2y ,
 tt      xx
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)
-2---- = ------.
a T (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
X (x) = sin nπx.
 n         L

The general solution for T for this particular λn  is

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

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 will be convenient to pick B  = -L-
     nπa  and hence

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

Our building-block solution will be

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

We differentiate in t , that is

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

Hence,

               nπ-
(wn)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

Now 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
           nπ-
Xn(x) = sin L x.

The condition for T however becomes T(0) = 0  . Thus instead of A = 0  we get that B = 0  and we can take

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

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) =    cn sin---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 we will 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 + cn cos 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 the string of length 2 is plucked in the middle such that it has the initial shape

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

See Figure 4.19. Further, 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--x - --2 sin--x + ----2 sin--x - ⋅⋅⋅
       π     2     9π     2     25π      2

The solution y(x,t)  is given by

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


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.” In fact the 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 x ↦→  u(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 + 1sin6π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,
y(x,0) = sin 3πx + 14 sin6πx      for 0 < x < 1,
yt(x, 0) = sin9π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 .

Exercise 4.7.6: Suppose 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 y (x,0) = - 1
 t  . 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

      2
ytt = a yxx - 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)  .

4.8 D’Alembert solution of the wave equation

Note: 1 lecture, different from §9.6 in EP

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‡ . 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 which 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,
y (x,0) = g(x)       0 < x < L.
 t
(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∂ η   ∂ξ   ∂η
 ∂   ∂ξ  ∂   ∂η ∂        ∂       ∂
-- = ------+ ------= - a2---+ a2---.
∂t   ∂t ∂ξ   ∂t ∂η       ∂ξ     ∂η
We compute
       2    (       ) (        )    2      2      2
yxx = ∂-y-=  ∂--+ -∂-  ∂y-+ ∂y- = ∂-y-+ 2 ∂-y--+ ∂-y,
      ∂x2    ∂ξ   ∂η   ∂ξ   ∂η    ∂ ξ2    ∂ξ∂η   ∂η2
     ∂2y   (    ∂      ∂ )(    ∂y     ∂y )     ∂2y      ∂ 2y      ∂2y
ytt = --2-=  -a2 --+ a 2--- - a2---+ a2--- = a2 --2 - 2a 2----+ a2--2-.
     ∂t         ∂ξ     ∂η      ∂ξ     ∂η       ∂ξ       ∂ξ∂η     ∂η
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 integration twice. Let us integrate with respect to η first§ and notice that the constant of integration depends on ξ to 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 then 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)  . Now define

                  ∫ x                               ∫  x
A(x) = 1F (x) - -1-    G(s) ds,    B(x) = 1F (x) +-1-    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:

|------------------------∫--x-at--------------------------∫-x+at--------|
| y(x,t) = 1F (x - at) - 1-     G (s) ds + 1F (x + at) + 1     G (s) ds |
|         2            2a  0             2            2a  0            |
|         F (x - at) + F (x + at)  1 ∫  x+at                              |
|       = --------------------+ ---      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

Now F (x)  and G (x )  are 2L periodic as well. Furthermore,

                        ∫  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: What the d’Alembert solution says is 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 do an example. Suppose that we have 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.4 5)  if 0 ≤ x < 0.45,
       |||||20(0.55 - x)  if 0.4 5 ≤ x < 0.55,
       ||(0             if 0.5 5 ≤ x ≤ 1.

The graph of this pulse 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 .

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 ) = sinx , 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  .

4.9 Steady state temperature, Laplacian, and Dirichlet problems

Note: 1 lecture, §9.7 in EP

Suppose we have an insulated wire, a plate, or a 3-dimensional object. We apply certain fixed temperatures on the ends of the wire, the edges of the plate or on all sides of the 3-dimensional object. We wish to find out what is the steady state temperature distribution. That is, we wish to know what will be the temperature after long enough period of time.

We are really looking for a solution to the heat equation that is not dependent on time. Let us first do this in one space variable. We are looking for a function u that satisfies

u = ku  ,
 t     xx

but such that ut = 0  for all x and t . Hence, we are looking for a function of x alone that satisfies uxx = 0  . It is easy to solve this equation by integration and we see that u = Ax + B for some constants A and B .

Suppose we have an insulated wire, and we apply constant temperature T
 1   at one end (say where x = 0  ) and T2   and the other end (at x = L where L is the length of the wire). Then our steady state solution is

u (x) = T-2 --T1x + T .
          L        1

This solution agrees with our common sense intuition with how the heat should be distributed in the wire. So in one dimension, the steady state solutions are basically just straight lines.

Things are more complicated in two or more space dimensions. Let us restrict to two space dimensions for simplicity. The heat equation in two variables is

ut = k(uxx + uyy),
(4.18)

or more commonly written as u = kΔu
 t or u = k∇ 2u
 t . Here the Δ  and ∇2   symbols mean ∂2+  ∂2-
∂x2   ∂y2    . We will use Δ  from now on. The reason for that notation is that you can define Δ  to be the right thing for any number of space dimensions and then the heat equation is always ut = kΔu . The Δ  is called the Laplacian.

OK, now that we have notation out of the way, let us see what does an equation for the steady state solution look like. We are looking for a solution to (4.18) which does not depend on t . Hence we are looking for a function u(x,y)  such that

|--------------------|
| Δu = uxx + uyy = 0.|
----------------------

This equation is called the Laplace equation¶ . Solutions to the Laplace equation are called harmonic functions and have many nice properties and applications far beyond the steady state heat problem.

Harmonic functions in two variables are no longer just linear (plane graphs). For example, you can check that the functions x2 - y2   and xy are harmonic. However, if you remember your multi-variable calculus we note that if uxx  is positive, u is concave up in the x direction, then uyy  must be negative and u must be concave down in the y direction. Therefore, a harmonic function can never have any “hilltop” or “valley” on the graph. This observation is consistent with our intuitive idea of steady state heat distribution.

Commonly the Laplace equation is part of a so-called Dirichlet problem∥ . That is, we have some region in the xy -plane and we specify certain values along the boundaries of the region. We then try to find a solution u defined on this region such that u agrees with the values we specified on the boundary.

For simplicity, we will consider a rectangular region. Also for simplicity we will specify boundary values to be zero at 3 of the four edges and only specify an arbitrary function at one edge. As we still have the principle of superposition, you can use this simpler solution to derive the general solution for arbitrary boundary values by solving 4 different problems, one for each edge, and adding those solutions together. This setup is left as an exercise.

We wish to solve the following problem. Let h and w be the height and width of our rectangle, with one corner at the origin and lying in the first quadrant.

Δu = 0,                     (4.19)

u(0,y) = 0 for 0 < y < h,   (4.20)
u(x,h) = 0 for 0 < x < w,   (4.21)

u(w,y) = 0 for 0 < y < h,   (4.22)
u(x,0) = f (x) for 0 < x < w. (4.23)
PIC

The method we will apply is separation of variables. Again, we will come up with enough building-block solutions satisfying all the homogeneous boundary conditions (all conditions except (4.23)). We notice that superposition still works for all the equation and all the homogeneous conditions. Therefore, we can use the Fourier series for f(x)  to solve the problem as before.

We try u(x,y) = X(x)Y(y)  . We plug into the equation to get

X ′′Y + XY ′′ = 0.

We put the X s on one side and the Y s on the other to get

  X′′   Y′′
- ---=  --.
  X     Y

The left hand side only depends on x and the right hand side only depends on y . Therefore, there is some constant λ such that       ′′    ′′
λ = -XX-=  YY-  . And we get two equations

X ′′ + λX = 0,
Y ′′ - λY = 0.
Furthermore, the homogeneous boundary conditions imply that X(0) = X (w) = 0  and Y (h) = 0  . Taking the equation for X we have already seen that we have a nontrivial solution if and only if          n2π2
λ = λn = w2-    and the solution is a multiple of
           nπ
Xn(x) = sin --x.
           w

For these given λn  , the general solution for Y (one for each n ) is

               nπ            nπ
Yn (y) = An cosh---y + Bn sinh--y.
                w            w
(4.24)

We only have one condition on Yn  and hence we can pick one of An  or Bn  constants to be whatever is convenient. It will be useful to have Yn(0) = 1  , so we let An = 1  . Setting Yn(h) = 0  and solving for Bn  we get that

     - cosh nπh-
Bn = -------w--.
      sinh nπwh-

After we plug the A
 n  and B
 n  we into (4.24) and simplify, we find

       sinh nπ(h-wy)
Yn(y) = ------nπh--.
        sinh  w

We define un(x,y) = Xn (x )Yn(y)  . And note that un  satisfies (4.19)–(4.22).

Observe that

un(x,0) = Xn (x)Yn(0) = sin nπ-x.
                          n

Suppose that

      ∑∞       nπx
f(x) =    bnsin----.
       n=1       w

Then we get a solution of (4.19)–(4.23) of the following form.

|---------------------------------------(----------)---|
|          ∞∑             ∑∞    (   nπ  )|||sinh nπ(hw-y)|||   |
| u(x,y) =    bnun(x,y) =    bn sin ---x ||(------nπh-||).  |
-----------n=1------------n=1--------w------sinh--w------|

As u
  n  satisfies (4.19)–(4.22) and any linear combination (finite or infinite) of u
 n  must also satisfy (4.19)–(4.22), we see that u must satisfy (4.19)–(4.22). By plugging in y = 0  it is easy to see that u satisfies (4.23) as well.

Example 4.9.1: Suppose that we take w = h = π and we let f (x) = π . We compute the sine series for the function π (we will get the square wave). We find that for 0 < x < π we have

        ∞
       ∑   4-
f (x ) =    n sin nx.
       nn=o1dd

Therefore the solution u(x,y)  , see Figure 4.22, to the corresponding Dirichlet problem is given as

          ∞           (            )
         ∑   4-        sinhn(π---y)
u (x,y) =     n (sin nx)    sinh nπ    .
         nn=o1dd


PIC

Figure 4.22: Steady state temperature of a square plate with three sides held at zero and one side held at π .


This scenario corresponds to the steady state temperature on a square plate of width π with 3 sides held at 0 degrees and one side held at π degrees. If we have arbitrary initial data on all sides, then we solve four problems, each using one piece of nonhomogeneous data. Then we use the principle of superposition to add up all four solutions to have a solution to the original problem.

There is another way to visualize the solutions. Take a wire and bend it in just the right way so that it corresponds to the graph of the temperature above the boundary of your region. Then dip the wire in soapy water and let it form a soapy film stretched between the edges of the wire. It turns out that this soap film is precisely the graph of the solution to the Laplace equation. Harmonic functions come up frequently in problems when we are trying to minimize area of some surface or minimize energy in some system.

4.9.1 Exercises

Exercise 4.9.1: Let R be the region described by 0 < x < π and 0 < y < π . Solve the problem

Δu = 0,  u(x,0) = sin x,  u(x,π ) = 0, u (0,y) = 0,  u(π,y) = 0.

Exercise 4.9.2: Let R be the region described by 0 < x < 1  and 0 < y < 1  . Solve the problem

uxx + uyy = 0,
u(x,0) = sin πx - sin 2πx,   u(x, 1) = 0,

u(0,y) = 0,  u(1,y) = 0.

Exercise 4.9.3: Let R be the region described by 0 < x < 1  and 0 < y < 1  . Solve the problem

uxx + uyy = 0,
u (x,0 ) = u(x,1) = u(0,y) = u(1,y) = C.
for some constant C . Hint: Guess, then check your intuition.

Exercise 4.9.4: Let R be the region described by 0 < x < π and 0 < y < π . Solve

Δu =  0,  u(x,0) = 0,  u(x,π) = π,  u(0,y) = y,  u(π,y) = y.

Hint: Try a solution of the form u(x, y) = X (x) + Y(y)  (different separation of variables).

Exercise 4.9.5: Use the solution of Exercise 4.9.4 to solve

Δu = 0,  u (x,0 ) = sinx, u (x,π ) = π,  u(0, y) = y, u(π,y) = y.

Hint: Use superposition.

Exercise 4.9.6: Let R be the region described by 0 < x < w and 0 < y < h . Solve the problem

uxx + uyy = 0,

u (x,0 ) = 0, u (x,h ) = f(x),
u (0,y) = 0,  u (w, y) = 0.
The solution should be in series form using the Fourier series coefficients of f(x)  .

Exercise 4.9.7: Let R be the region described by 0 < x < w and 0 < y < h . Solve the problem

uxx + uyy = 0,
u (x,0 ) = 0, u (x,h ) = 0,

u (0,y) = f(y),  u(w,y) = 0.
The solution should be in series form using the Fourier series coefficients of f(y)  .

Exercise 4.9.8: Let R be the region described by 0 < x < w and 0 < y < h . Solve the problem

uxx + uyy = 0,
u (x,0 ) = 0, u (x,h ) = 0,

u (0,y) = 0,  u(w, y) = f (y).
The solution should be in series form using the Fourier series coefficients of f(y)  .

Exercise 4.9.9: Let R be the region described by 0 < x < 1  and 0 < y < 1  . Solve the problem

uxx + uyy = 0,
u(x, 0) = sin9πx,  u(x,1) = sin 2πx,

u(0, y) = 0, u (1,y) = 0.
Hint: Use superposition.

Exercise 4.9.10: Let R be the region described by 0 < x < 1  and 0 < y < 1  . Solve the problem

uxx + uyy = 0,
u(x,0) = sinπx,  u(x,1) = sin πx,

u(0,y) = sinπy,  u(1,y) = sinπy.
Hint: Use superposition.