Differential Equations
Differential Equations
EQUATIONS FOR
ENGINEERS
Jiří Lebl
Oklahoma State University
Oklahoma State University
Differential Equations for Engineers
Jiří Lebl
This open text is disseminated via the Open Education Resource (OER) LibreTexts Project (https://LibreTexts.org) and like the
hundreds of other open texts available within this powerful platform, it is licensed to be freely used, adapted, and distributed. This
book is openly licensed which allows you to make changes, save, and print this book as long; the applicable license is indicated at the
bottom of each page.
LibreTexts Reduces COST for Students and Provides CONTROL for Faculty
Instructors can adopt existing LibreTexts texts or Remix them to quickly build course-specific resources to meet the needs of their
students. Unlike traditional textbooks LibreTexts’ web based origins allow powerful integration of advanced features and new
technologies to support learning.
The LibreTexts mission is to unite students, faculty and scholars in a cooperative effort to develop an easy-to-use online platform for
the construction, customization, and dissemination of OER content to reduce the burdens of unreasonable textbook costs to our
students and society. The LibreTexts project is a multi-institutional collaborative venture to develop the next generation of open-access
texts to improve postsecondary education at all levels of higher learning by developing an Open Access Resource environment. The
project currently consists of 13 independently operating and interconnected libraries that are constantly being optimized by students,
faculty, and outside experts to supplant conventional paper-based books. These free textbook alternatives are organized within a central
environment that is both vertically (from advance to basic level) and horizontally (across different fields) integrated.
The LibreTexts libraries are Powered by MindTouch® and are supported by the Department of Education Open Textbook Pilot Project,
the UC Davis Office of the Provost, the UC Davis Library, the California State University Affordable Learning Solutions Program, and
Merlot. This material is based upon work supported by the National Science Foundation under Grant No. 1246120, 1525057, and
1413739. Unless otherwise noted, LibreTexts content is licensed by CC BY-NC-SA 3.0.
Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not
necessarily reflect the views of the National Science Foundation nor the US Department of Education
Have questions or comments? For information about adoptions or adaptions contact [email protected]. More information on our
activities can be found via our Facebook (https://facebook.com/Libretexts), Twitter (https://twitter.com/libretexts), or Blog
(http://Blog.Libretexts.org)
Compiled on 01/08/2020
TABLE OF CONTENTS
A one semester first course on differential equations, aimed at engineering students. Prerequisite for the course is the basic calculus
sequence.
3: SYSTEMS OF ODES
3.1: INTRODUCTION TO SYSTEMS OF ODES
3.2: MATRICES AND LINEAR SYSTEMS
3.3: LINEAR SYSTEMS OF ODES
3.4: EIGENVALUE METHOD
3.5: TWO DIMENSIONAL SYSTEMS AND THEIR VECTOR FIELDS
3.6: SECOND ORDER SYSTEMS AND APPLICATIONS
3.7: MULTIPLE EIGENVALUES
3.8: MATRIX EXPONENTIALS
3.9: NONHOMOGENEOUS SYSTEMS
3.E: SYSTEMS OF ODES (EXERCISES)
5: EIGENVALUE PROBLEMS
5.1: STURM-LIOUVILLE PROBLEMS
1 1/8/2020
5.2: APPLICATION OF EIGENFUNCTION SERIES
5.3: STEADY PERIODIC SOLUTIONS
5.E: EIGENVALUE PROBLEMS (EXERCISES)
8: NONLINEAR EQUATIONS
Linear equations suffice in many applications, but in reality most phenomena require nonlinear equations. Nonlinear equations,
however, are notoriously more difficult to understand than linear ones, and many strange new phenomena appear when we allow our
equations to be nonlinear.
2 1/8/2020
CHAPTER OVERVIEW
1: FIRST ORDER ODES
Topic hierarchy
1 1/8/2020
1.1 INTEGRALS AS SOLUTIONS
A first order ODE is an equation of the form
dy
= f(x, y) (1)
dx
or just
′
y = f(x, y) (2)
In general, there is no simple formula or procedure one can follow to find solutions. In the next few lectures we will look at special
cases where solutions are not difficult to obtain. In this section, let us assume that f is a function of x alone, that is, the equation is
′
y = f(x) (3)
′
∫ y (x)dx = ∫ f(x)dx + C (4)
that is
This y(x) is actually the general solution. So to solve Equation 3, we find some antiderivative of f(x) and then we add an arbitrary
constant to get the general solution.
Now is a good time to discuss a point about calculus notation and terminology. Calculus textbooks muddy the waters by talking about
the integral as primarily the so-called indefinite integral. The indefinite integral is really the antiderivative (in fact the whole one-
parameter family of antiderivatives). There really exists only one integral and that is the definite integral. The only reason for the
indefinite integral notation is that we can always write an antiderivative as a (definite) integral. That is, by the fundamental theorem of
calculus we can always write ∫ f(x)dx + C as
x
∫ f(t)dt + C (6)
x0
Hence the terminology to integrate when we may really mean to antidifferentiate. Integration is just one way to compute the
antiderivative (and it is a way that always works, see the following examples). Integration is defined as the area under the graph, it only
happens to also compute antiderivatives. For sake of consistency, we will keep using the indefinite integral notation when we want an
antiderivative, and you should always think of the definite integral.
Example 1:
Find the general solution of y ′
= 3x
2
.
Solution
Elementary calculus tells us that the general solution must be y = x 3
+C . Let us check: y ′
= 3x
2
. We have gotten precisely our
equation back.
Normally, we also have an initial condition such as y(x ) = y for some two numbersx and y
0 0 0 0 x0 is usually 0, but not always).
We can then write the solution as a definite integral in a nice way. Suppose our problem is y ′
= f(x), y(x0 ) = y0 . Then the
solution is
x
Let us check! We compute y = f(x) , via the fundamental theorem of calculus, and by Jupiter,y is a solution. Is it the one
′
x0
satisfying the initial condition? Well, y(x ) = ∫ f(x)dx + y = y . It is!
0
x0
0 0
Do note that the definite integral and the indefinite integral (antidifferentiation) are completely different beasts. The definite integral
always evaluates to a number. Therefore, Equation 7 is a formula we can plug into the calculator or a computer, and it will be happy
to calculate specific values for us. We will easily be able to plot the solution and work with it just like with any other function. It is
not so crucial to always find a closed form for the antiderivative.
12/11/2019 1 https://math.libretexts.org/link?332
Example 2:
Solve
2
′ −x
y = e , y(0) = 1. (8)
Solution
Here is a good way to make fun of your friends taking second semester calculus. Tell them to find the closed form solution. Ha ha
ha (bad math joke). It is not possible (in closed form). There is absolutely nothing wrong with writing the solution as a definite
integral. This particular integral is in fact very important in statistics.
Using this method, we can also solve equations of the form
′
y = f(y) (10)
Now we use the inverse function theorem from calculus to switch the roles of x and y to obtain
dy 1
= (12)
dx f(y)
What we are doing seems like algebra with dx and dy. It is tempting to just do algebra with dx and dy as if they were numbers.
And in this case it does work. Be careful, however, as this sort of hand-waving calculation can lead to trouble, especially when
more than one independent variable is involved. At this point we can simply integrate,
1
x(y) = ∫ dy + C (13)
f(y)
Example 3:
Previously, we guessed y = ky (for some k > 0 ) has the solution y = Ce . We can now find the solution without guessing.
′ kx
We integrate to obtain
1
x(y) = x = ln|y| + D (15)
k
If we replace e −kD
with an arbitrary constant C we can get rid of the absolute value bars (which we can do as D was arbitrary). In
this way, we also incorporate the solution y = 0 . We get the same general solution as we guessed before, y = Ce . kx
Example 4:
Find the general solution of y ′
= y
2
.
Solution
First we note that y = 0 is a solution. We can now assume that y ≠ 0 . Write
12/11/2019 2 https://math.libretexts.org/link?332
dx 1
= (17)
2
dy y
We integrate to get
−1
x = +C (18)
y
1
We solve fory = . So the general solution is
C−x
1
y= or y = 0 (19)
C−x
Note the singularities of the solution. If for example C = 1 , then the solution “blows up” as we approach x = 1 . Generally, it is
hard to tell from just looking at the equation itself how the solution is going to behave. The equation y = y is very nice and ′ 2
defined everywhere, but the solution is only defined on some interval (−∞, C) or (C, ∞) .
Classical problems leading to differential equations solvable by integration are problems dealing with velocity, acceleration and
distance. You have surely seen these problems before in your calculus class.
Example 5:
Suppose a car drives at a speed e t/2
meters per second, where t is time in seconds. How far did the car get in 2 seconds (starting at
t = 0 )? How far in 10 seconds?
Solution
Let x denote the distance the car traveled. The equation is
′ t/2
x = e (20)
We still need to figure out C . We know that when t = 0 , then x = 0 . That is, x(0) = 0 . So
0/2
0 = x(0) = 2 e +C = 2 +C (22)
Thus C = −2 and
t/2
x(t) = 2 e −2 (23)
Now we just plug in to get where the car is at 2 and at 10 seconds. We obtain
2/2 10/2
x(2) = 2 e − 2 ≈ 3.44~meters, x(10) = 2 e − 2 ≈ 294~meters (24)
Example 6:
Suppose that the car accelerates at a rate of t 2 m
s2
. At time t = 0 the car is at the 1 meter mark and is traveling at 10 m/s. Where is
the car at time t = 10 .
Solution
Well this is actually a second order problem. If x is the distance traveled, then x
′
is the velocity, and ′′
x is the acceleration. The
equation with initial conditions is
′′ 2 ′
x = t , x(0) = 1, x (0) = 10 (25)
What if we say x ′
= v . Then we have the problem
′ 2
v = t , v(0) = 10 (26)
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
12/11/2019 3 https://math.libretexts.org/link?332
12/11/2019 4 https://math.libretexts.org/link?332
1.2: SLOPE FIELDS
The general first order equation we are studying looks like
′
y = f(x, y) (1.2.1)
In general, we cannot simply solve these kinds of equations explicitly. It would be nice if we could at least figure out the shape and
behavior of the solutions, or if we could find approximate solutions. At this point it may be good to first try the Lab I and/or Project I
from the IODE website: http://www.math.uiuc.edu/iode/.
1.2.1 SLOPE FIELDS
As you have seen in IODE Lab I (if you did it), the equation y = f(x, y) gives you a slope at each point in the (x, y) - plane. We can
′
plot the slope at lots of points as a short line through the point (x, y) with the slope f(x, y). See Figure 1.1.
PIC
PIC
what y(0) is, all solutions tend to zero as x tends to infinity (see Figure 1.3).
PIC
with
y(x0 ) = y0 (1.2.3)
What do you think is the answer? The answer seems to be yes to both does it not? Well, pretty much. But there are cases when the
answer to either question can be no.
Since generally the equations we encounter in applications come from real life situations, it seems logical that a solution always exists.
It also has to be unique if we believe our universe is deterministic. If the solution does not exist, or if it is not unique, we have probably
not devised the correct model. Hence, it is good to know when things go wrong and why.
Example 1.2.1:
Attempt to solve
1
′
y = , y(0) = 0. (1.2.4)
x
Integrate to find the general solution y = ln|x| + C . Note that the solution does not exist at x = 0 . See Figure 1.4.
PIC
1
Figure 1.4: Slope field of y ′
= .
x
PIC
−−
Figure 1.5: Slope field of y ′
= 2 √|y| with two solutions satisfying y(0) = 0.
PIC
−−
Figure 1.5: Slope field of y ′
= 2 √|y| with two solutions satisfying y(0) = 0 .
Note that y = 0 is a solution. But another solution is the function
2
x if x ≥ 0
y(x) = { (1.2.6)
2
−x if x < 0
It is hard to tell by staring at the slope field that the solution is not unique. Is there any hope? Of course there is. We have the following
theorem, known as Picard’s theorem1.
∂f
Theorem 1.2.1. (Picard’s theorem on existence and uniqueness). If f(x, y) is continuous (as afunction of two variables) and
∂y
with
y(x0 ) = y0 (1.2.8)
exists (at least for some small interval of x’s) and is unique.
1 −−
Note that the problems y ′
= , y(0) = 0 and y ′
= 2 √|y| , y(0) = 0 do not satisfy the hypothesis of the theorem. Even if we can
x
use the theorem, we ought to be careful about this existence business. It is quite possible that the solution only exists for a short while.
Example 1.2.3:
For some constant A , solve:
y
′
= y
2
, y(0) = A .
1
We know how to solve this equation. First assume that A ≠ 0 , so y is not equal to zero at least for some x near 0. So x ′
= , so
2
y
1 1 1
x = − +C , so y = . If y(0) = A , then C = so
y C−x A
1
y= (1.2.9)
1
−x
A
If A = 0 , then y = 0 is a solution.
For example, when A = 1 the solution “blows up” at x = 1 . Hence, the solution does not exist for all x even if the equation is nice
everywhere. The equation y = y certainly looks nice.
′ 2
For most of this course we will be interested in equations where existence and uniqueness holds, and in fact holds “globally” unlike for
the equation y = y . ′ 2
1Named after the French mathematician Charles Émile Picard (1856 – 1941)
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
longer works for the general form of the equation y = f(x, y) . Integrating both sides yields
′
for some functions f(x) and g(y) . Let us write the equation in the Leibniz notation
dy
= f(x)g(y) (3)
dx
If we can find closed form expressions for these two integrals, we can, perhaps, solve for y.
Example 1:
Take the equation
′
y = xy (6)
dy
First note that y = 0 is a solution, so assume y ≠ 0 from now on. Write the equation as dx
= xy, then
dy
∫ = ∫ xdx + C. (7)
y
Or
2 2
x x
C
|y| = e 2
e = De 2
(9)
where D > 0 is some constant. Because y = 0 is a solution and because of the absolute value we actually can write:
2
x
y = De 2
We should be a little bit more careful with this method. You may be worried that we were integrating in two different variables. We
seemed to be doing a different operation to each side. Let us work this method out more rigorously.
dy
= f(x)g(y) (11)
dx
12/11/2019 1 https://math.libretexts.org/link?335
dy
We rewrite the equation as follows. Note that y = y(x) is a function of x and so is dx
!
1 dy
= f(x) (12)
g(y) dx
We separate variables,
2
y +1 1
dy = (y + ) dy = xdx (16)
y y
We integrate to get
2 2
y x
+ ln |y| = +C (17)
2 2
It is not easy to find the solution explicitly as it is hard to solve for y . We, therefore, leave the solution in this form and call it an
implicit solution. It is still easy to check that an implicit solution satisfies the differential equation. In this case, we differentiate to get
2
′
y (2y + ) = 2x (19)
y
It is simple to see that the differential equation holds. If you want to compute values for y , you might have to be tricky. For example,
you can graph x as a function of y , and then flip your paper. Computers are also good at some of these tricks.
We note that the above equation also has the solution y = 0 . The general solution is y
2 2
+ 2ln |y| = x +C together with y= 0 .
These outlying solutions such as y = 0 are sometimes called singular solutions.
Example 2:
Solve x 2
y
′ 2
= 1 −x +y
2 2
−x y
2
, y(1) = 0.
First factor the right hand side to obtain
2 ′ 2 2
x y = (1 − x ) (1 + y ) (20)
′
y 1
= − 1, (22)
2 2
1 +y x
1
arctan(y) = − − x + C, (23)
2
x
12/11/2019 2 https://math.libretexts.org/link?335
1
y = tan(− − x + C) (24)
x
Now solve for the initial condition, 0 = tan(−2 + C) to get C = 2( or 2 + π, etc …) . The solution we are seeking is,
therefore,
1
y = tan(− − x + C) (25)
x
Example 3:
Bob made a cup of coffee, and Bob likes to drink coffee only once it will not burn him at 60 degrees. Initially at time t = 0
minutes, Bob measured the temperature and the coffee was 89 degrees Celsius. One minute later, Bob measured the coffee again
and it had 85 degrees. The temperature of the room (the ambient temperature) is 22 degrees. When should Bob start drinking?
Let T be the temperature of the coffee, and let A be the ambient (room) temperature. Newton’s law of cooling states that the rate at
which the temperature of the coffee is changing is proportional to the difference between the ambient temperature and the
temperature of the coffee. That is,
dT
= k(A − T ), (26)
dt
for some constant k. For our setup A = 22 , T (0) = 89 , T (1) = 85 . We separate variables and integrate (let C and D denote
arbitrary constants)
1 dT
= −k, (27)
T −A dt
−kt
T − A = De , (29)
−kt
T = A + De (30)
That is, T = 22 + De
−kt
. We plug in the first condition: 89 = T (0) = 22 + D , and hence D = 67 . So T = 22 + 67e
−kt
. The
85−22
second condition says 85 = T (1) = 22 + 67e −k
. Solving for k we get k = − ln 67
≈ 0.0616 . Now we solve for the time t
60−22
ln
that gives us a temperature of 60 degrees. That is, we solve 60 = 22 + 67e to get t = − ≈ 9.21 minutes. So Bob
−0.0616t 67
0.0616
can begin to drink the coffee at just over 9 minutes from the time Bob made it. That is probably about the amount of time it took us
to calculate how long it would take.
Example 4:
2
xy
Find the general solution to y = −
′
3
(including singular solutions).
First note that y = 0 is a solution (a singular solution). So assume that y ≠ 0 and write
3 ′
− y = x, (31)
2
y
2
3 x
= + C, (32)
y 2
3 6
y= = . (33)
2
x 2
+C x + 2C
2
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
12/11/2019 3 https://math.libretexts.org/link?335
1.4 LINEAR EQUATIONS AND THE INTEGRATING FACTOR
INTRODUCTION
One of the most important types of equations we will learn how to solve are the so-called linear equations. In fact, the majority of the
course is about linear equations. In this lecture we focus on the first order linear equation. A first order equation is linear if we can put
it into the form:
′
y + p(x)y = f(x). (1)
Here the word “linear” means linear in y and y ; no higher powers nor functions of y or y appear. The dependence on x can be more
′ ′
complicated.
Solutions of linear equations have nice properties. For example, the solution exists wherever p(x) and f(x) are defined, and has the
same regularity (read: it is just as nice). But most importantly for us right now, there is a method for solving linear first order equations.
The trick is to rewrite the left hand side of (1.4.1) as a derivative of a product of y with another function. To this end we find a function
r(x) such that
′
d
r(x)y + r(x)p(x)y = [r(x)y] (2)
dx
This is the left hand side of (1.4.1) multiplied by r(x). So if we multiply (1.4.1) by r(x), we obtain
d
[r(x)y] = r(x)f(x) (3)
dx
Now we integrate both sides. The right hand side does not depend on y and the left hand side is written as a derivative of a function.
Afterwards, we solve fory . The function r(x) is called the integrating factor and the method is called the integrating factor method.
We are looking for a function r(x), such that if we differentiate it, we get the same function back multiplied by p(x) . That seems like
a job for the exponential function! Let
∫ p(x)dx
r(x) = e (4)
We compute:
′
y + p(x)y = f(x), (5)
d ∫ p(x)dx ∫ p(x)dx
[e y] = e f(x), (7)
dx
∫ p(x)dx ∫ p(x)dx
e y= ∫ e f(x)dx + C, (8)
− ∫ p(x)dx ∫ p(x)dx
y= e (∫ e f(x)dx + C) . (9)
Of course, to get a closed form formula for y , we need to be able to find a closed form formula for the integrals appearing above.
Example 1:
Solve
2
′ x−x
y + 2xy = e , y(0) = −1 (10)
2 2
d 2
x x
[e y] = e . (12)
dx
We integrate
12/11/2019 1 https://math.libretexts.org/link?333
2
x x
e y= e + C, (13)
2 2
x−x −x
y= e + Ce . (14)
Note that we do not care which antiderivative we take when computing e ∫ p(x)dx
. You can always add a constant of integration, but
those constants will not matter in the end.
Exercise 1:
Try it! Add a constant of integration to the integral in the integrating factor and show that the solution you get in the end is the same
as what we got above. An advice: Do not try to remember the formula itself, that is way too hard. It is easier to remember the
process and repeat it.
Since we cannot always evaluate the integrals in closed form, it is useful to know how to write the solution in definite integral form.
A definite integral is something that you can plug into a computer or a calculator. Suppose we are given
′
y + p(x)y = f(x), y(x0 ) = y0 (16)
.
Look at the solution and write the integrals as definite integrals.
x
t
∫ −x p(s)ds ∫ p(s)ds
y(x) = e x
0 (∫ e x
0 f(t)dt + y0 ) (17)
x0
You should be careful to properly use dummy variables here. If you now plug such a formula into a computer or a calculator, it will
be happy to give you numerical answers.
Exercise 2:
Check that y(x 0) = y0 in formula (1.4.17).
Exercise 3:
Write the solution of the following problem as a definite integral, but try to simplify as far as you can. You will not be able to find
the solution in closed form.
2
′ x −x
y +y = e , y(0) = 10 (18)
Remark 1.4.1: Before we move on, we should note some interesting properties of linear equations. First, for the linear initial value
problem y + p(x)y = f(x), y(x ) = y , there is always an explicit formula (1.4.17) for the solution. Second, it follows from the
′
0 0
formula (1.4.17) that if p(x) and f(x) are continuous on some interval (a, b), then the solution y(x) exists and is differentiable on
(a, b). Compare with the simple nonlinear example we have seen previously, y = y , and compare to Theorem 1.2.1.
′ 2
Example 2:
Let us discuss a common simple application of linear equations. This type of problem is used often in real life. For example, linear
equations are used in figuring out the concentration of chemicals in bodies of water (rivers and lakes).
A 100 liter tank contains 10 kilograms of salt dissolved in 60 liters of water. Solution of water and salt (brine) with concentration of
0.1 kilograms per liter is flowing in at the rate of 5 liters a minute. The solution in the tank is well stirred and flows out at a rate of 3
liters a minute. How much salt is in the tank when the tank is full?
12/11/2019 2 https://math.libretexts.org/link?333
Let us come up with the equation. Let x denote the kilograms of salt in the tank, let t denote the time in minutes. For a small
change Δt in time, the change in x (denoted Δx ) is approximately
x x
concentration out = = . (24)
volume 60 + (5 − 3)t
d 3/2 3/2
[(60 + 2t ) x] = 0.5(60 + 2t ) , (29)
dt
3/2 3/2
(60 + 2t ) x = ∫ 0.5(60 + 2t ) dt + C, (30)
3/2
(60 + 2t)
−3/2 −3/2
x = (60 + 2t ) ∫ dt + C(60 + 2t ) (31)
2
−3/2
1 5/2 −3/2
x = (60 + 2t ) (60 + 2t ) + C(60 + 2t ) , (32)
10
(60 + 2t)
−3/2
x = + C(60 + 2t ) . (33)
10
or
3/2
C = 4(60 ) ≈ 1859.03. (35)
We are interested in x when the tank is full. So we note that the tank is full when 60 + 2t = 100 , or when t = 20 . So
12/11/2019 3 https://math.libretexts.org/link?333
60 + 40 −3/2 −3/2
x(20) = + C (60 + 40) ≈ 10 + 1859.03 (100) ≈ 11.86. (36)
10
The concentration at the end is approximately 0.1186 kg/liter and we started with 1/6 or 0.167 kg/liter.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
12/11/2019 4 https://math.libretexts.org/link?333
1.5: SUBSTITUTION
Just as when solving integrals, one method to try is to change variables to end up with a simpler equation to solve.
SUBSTITUTION
The equation
′ 2
y = (x − y + 1 ) (1.5.1)
is neither separable nor linear. What can we do? How about trying to change variables, so that in the new variables the equation is
simpler. We use another variable v, which we treat as a function of x. Let us try
v = x − y + 1. (1.5.2)
In other words,
′ 2
v = 1 −v . (1.5.4)
So
1 ∣ v+1 ∣
ln∣ ∣ = x +C (1.5.6)
2 ∣ v−1 ∣
∣ v+1 ∣ 2x+2C
∣ ∣ = e (1.5.7)
∣ v−1 ∣
v+1
or = De
2x
for some constant D . Note that v = 1 and v = −1 are also solutions.
v−1
and also the two solutions x − y + 1 = 1 or y = x , and x − y + 1 = −1 or y = x + 2 . We solve the first equation for y .
2x
x − y + 2 = (x − y) De , (1.5.9)
2x 2x
x − y + 2 = Dx e − yDe , (1.5.10)
2x 2x
−y + yDe = Dx e − x − 2, (1.5.11)
2x 2x
y(−1 + De ) = Dx e − x − 2, (1.5.12)
2x
Dx e −x −2
y= . (1.5.13)
2x
De −1
2 ′ 3
y y v=y
′
(cos y)y v = sin y
′
(sin y)y v = cos y
′ y y
y e v=e
BERNOULLI EQUATIONS
There are some forms of equations where there is a general rule for substitution that always works. One such example is the so-called
Bernoulli equation.2
′ n
y + p(x)y = q(x)y (1.5.14)
′ n
y + p(x) y = q(x) y (1.5.15)
This equation looks a lot like a linear equation except for the y . If n = 0 or n = 1 , then the equation is linear and we can solve it.
n
Otherwise, the substitution v = y transforms the Bernoulli equation into a linear equation. Note that n need not be an integer.
1−n
Solution
x +1
First, the equation is Bernoulli p(x) = ( and q(x) = −1 ). We substitute
x
1−5 −4 ′ −5 ′
v= y = y , v = −4 y y (1.5.17)
−1
In other words, ( )y v = y
5 ′ ′
. So
4
′ 5
x y + y(x + 1) + x y = 0, (1.5.18)
5
−xy ′ 5
v + y(x + 1) + x y = 0, (1.5.19)
4
−x ′ −4
v +y (x + 1) + x = 0, (1.5.20)
4
−x
′
v + v(x + 1) + x = 0, (1.5.21)
4
and finally
4(x + 1)
′
v − v= 4 (1.5.22)
x
Now the equation is linear. We can use the integrating factor method. In particular, we use formula (??? ). Let us assume that x > 0
so |x| = x . This assumption is OK, as our initial condition is x = 1 . Let us compute the integrating factor. Here p(s) from
−4(s + 1)
formula (1.4.2) is .
s
x −4x+4
x −4(s + 1) e
∫ p(s)ds −4x−4ln(x)+4 −4x+4 −4
e 1
= exp ( ∫ ds) = e = e x = (1.5.23)
1 s x4
x
−∫ p(s)ds 4x+4ln(x)−4 4x−4 4
e 1
= e = e x (1.5.24)
x −4t+4
e
4x−4 4
= e x (∫ 4 dt + 1) (1.5.26)
4
1 t
Note that the integral in this expression is not possible to find in closed form. As we said before, it is perfectly fine to have a
definite integral in our solution. Now “unsubstitute”
−x+1
e
y= (1.5.28)
1/4
−4t+4
x e
x (4 ∫ dt + 1)
1
t4
HOMOGENEOUS EQUATIONS
Another type of equations we can solve by substitution are the so-called homogeneous equations. Suppose that we can write the
differential equation as
y
′
y = F ( ) (1.5.29)
x
Example 1.5.2
Solve
2 ′ 2
x y = y + xy y(1) = 1 (1.5.33)
Solution
y y y
We put the equation into the form y ′
= (
2
) + . We substitute v = to get the separable equation
x x x
′ 2 2
xv = v +v−v = v (1.5.34)
−1
= ln |x| + C (1.5.36)
v
−1
v= (1.5.37)
ln |x| + C
We unsubstitute
y −1
= (1.5.38)
x ln |x| + C
−x
y= (1.5.39)
ln |x| + C
We want y(1) = 1 , so
−1 −1
1 = y(1) = = (1.5.40)
ln |1| + C C
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
where the derivative of solutions depends only on x (the dependent variable). Such equations are called
autonomous equations. If we think of t as time, the naming comes from the fact that the equation is
independent of time.
Let us come back to the cooling coffee problem (see Example 1.3.3). Newton’s law of cooling says that
dx
= −k(x − A) (2)
dt
where x is the temperature, t is time, k is some constant, and A is the ambient temperature. See Figure
1.6 for an example with k = 0.3 and A = 5 .
Note the solution x = A (in the figure x = 5 ). We call these constant solutions the equilibrium solutions.
The points on the x axis where f (X) = 0 are called critical points. The point x = A is a critical point. In
fact, each critical point corresponds to an equilibrium solution. Note also, by looking at the graph, that
the solution x = A is “stable” in that small perturbations in x do not lead to substantially different
solutions as t grows. If we change the initial condition a little bit, then as t → ∞ we get x → A . We call
such critical points stable. In this simple example it turns out that all solutions in fact go to A as t → ∞ . If
a critical point is not stable we would say it is unstable.
PIC
for some positive k and M . This equation is commonly used to model population if we know the limiting
population M , that is the maximum sustainable population. The logistic equation leads to less
catastrophic predictions on world population than x′ = kx . In the real world there is no such thing as
negative population, but we will still consider negative x for the purposes of the math (see Figure 1.7 for
an example).
PIC
⎧5 if x(0) > 0,
Where DNE means “does not exist.” From just looking at the slope field we cannot quite decide what
happens if x(0) < 0 . It could be that the solution does not exist for t all the way to ∞ . Think of the
equation x′ = x2 , we have seen that it only exists for some finite period of time. Same can happen here. In
our example equation above it will actually turn out that the solution does not exist for all time, but to see
that we would have to solve the equation. In any case, the solution does go to −∞ , but it may get there
rather quickly.
Often we are interested only in the long term behavior of the solution and we would be doing unnecessary
work if we solved the equation exactly. It is easier to just look at the phase diagram or phase portrait,
which is a simple way to visualize the behavior of autonomous equations. In this case there is one
Armed with the phase diagram, it is easy to sketch the solutions approximately.
Exercise 1:
Try sketching a few solutions simply from looking at the phase diagram. Check with the preceding
graphs if you are getting the type of curves. Once we draw the phase diagram, we can easily classify
critical points as stable or unstable.
Since any mathematical model we cook up will only be an approximation to the real world, unstable
points are generally bad news.
Let us think about the logistic equation with harvesting. Suppose an alien race really likes to eat
humans. They keep a planet with humans on it and harvest the humans at a rate of h million humans
per year. Supposex is the number of humans in millions on the planet and t is time in years. Let M be
the limiting population when no harvesting is done and k > 0 is some constant depending on how fast
humans multiply. Our equation becomes
dx
= kx(M − x) − h (5)
dt
We expand the right hand side and solve for critical points
dx 2
= −kx + kM x − h (6)
dt
Solving for the critical points A and B from the quadratic equations:
−−−−−−−−− − −−−−−−−−− −
2 2
kM + √(kM ) − 4hk kM − √(kM ) − 4hk
A = , B = (7)
2k 2k
Exercise 2:
Draw the phase diagram for different possibilities. Note that these possibilities are A > B , or A = B ,
or A and B both complex (i.e. no real solutions). Hint: Fix some simple k and M and then vary h.
For example, let M = 8 and k = 0.1 . When h = 1 , then A and B are distinct and positive. The graph we
will get is given in Figure 1.8. As long as the population starts above B, which is approximately 1.55
million, then the population will not die out. It will in fact tend towards A ≈ 6.45 million. If ever some
catastrophe happens and the population drops below B, humans will die out, and the fast food restaurant
serving them will go out of business.
PIC
REFERENCES
1. Paul W. Berg and James L. McGregor, Elementary Partial Differential Equations, Holden-Day, San
Francisco, CA, 1966.
2. William E. Boyce, Richard C. DiPrima, Elementary Differential Equations and Boundary Value
Problems, 9th edition, John Wiley & Sons Inc., New York, NY, 2008.
3. C.H. Edwards and D.E. Penney, Differential Equations and Boundary Value Problems: Computing and
Modeling, 4th edition, Prentice Hall, 2008.
4. Stanley J. Farlow, An Introduction to Differential Equations and Their Applications, McGraw-Hill, Inc.,
Princeton, NJ, 1994. (Published also by Dover Publications, 2006.)
5. E.L. Ince, Ordinary Differential Equations, Dover Publications, Inc., New York, NY, 1956.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and
DMS-1362337.
What if we want to find the value of the solution at some particularx? Or perhaps we want to produce a graph of the solution to inspect
the behavior. In this section we will learn about the basics of numerical approximation of solutions.
The simplest method for approximating a solution is Euler’s method4. It works as follows: We take x and compute the slope 0
k = f(x , y ) . The slope is the change in y per unit change in x. We follow the line for an interval of length h on the x axis. Hence if
0 0
y= y at x , then we will say that y (the approximate value of y at x = x + h ) will be y = y + hk . Rinse, repeat! That is,
0 0 1 1 0 1 0
compute x and y using x and y . For an example of the first two steps of the method see Figure 1.11.
2 2 1 1
PIC
PIC
2
y
Figure 1.11: First two steps of Euler’s method with h = 1 for the equation y ′
=
3
with initial conditions y(0) = 1 .
More abstractly, for any i = 1, 2, 3, ⋯, we compute
xi+1 = xi + h, yi+1 = yi + hf(xi , yi ) (1.7.2)
The line segments we get are an approximate graph of the solution. Generally it is not exactly the solution. See Figure 1.12 for the plot
of the real solution and the approximation.
PIC
2
y
Figure 1.12: Two steps of Euler’s method (step size 1) and the exact solution for the equation y ′
=
3
with initial conditions
y(0) = 1 .
2
y
Let us see what happens with the equation y ′
=
3
, y(0) = 1 . Let us try to approximate y(2) using Euler’s method. In Figures 1.11
and 1.12 we have graphically approximated y(2) with step size 1. With step size 1 we have y(2) ≈ 1.926 . The real answer is 3. So
we are approximately 1.074 off. Let us halve the step size. Computing y with h = 0.5 , we find that y(2) ≈ 2.209 , so an error of
4
about 0.791. Table 1.1 gives the values computed for various parameters.
Exercise 1.7.1:
Solve this equation exactly and show that y(2) = 3 .
The difference between the actual solution and the approximate solution we will call the error. We will usually talk about just the
size of the error and we do not care much about its sign. The main point is, that we usually do not know the real solution, so we
only have a vague understanding of the error. If we knew the error exactly …what is the point of doing the approximation?
h Approximate y(2) Error --Error--- Previouserror
1 1.92593 1.07407
0.5 2.20861 0.79139 0.73681
0.25 2.47250 0.52751 0.66656
0.125 2.68034 0.31966 0.60599
0.0625 2.82040 0.17960 0.56184
0.03125 2.90412 0.09588 0.53385
0.015625 2.95035 0.04965 0.51779
0.0078125 2.97472 0.02528 0.50913
2
y
Table 1.1: Euler’s method approximation of y(2) where of y ′
=
3
, y(0) = 1 .
We notice that except for the first few times, every time we halved the interval the error approximately halved. This halving of the
error is a general feature of Euler’s method as it is a first order method. In the IODE Project II you are asked to implement a second
order method. A second order method reduces the error to approximately one quarter every time we halve the interval (second order
as = x ).
1
4
1
2
1
altogether fair, a second order method would probably double the time to do each step. Even so, it is 1 minute versus 17 minutes.
Next, suppose that we have to repeat such a calculation for different parameters a thousand times. You get the idea.
Note that in practice we do not know how large the error is! How do we know what is the right step size? Well, essentially we keep
halving the interval, and if we are lucky, we can estimate the error from a few of these calculations and the assumption that the error
goes down by a factor of one half each time (if we are using standard Euler).
Exercise 1.7.2:
In the table above, suppose you do not know the error. Take the approximate values of the function in the last two lines, assume that
the error goes down by a factor of 2. Can you estimate the error in the last time from this? Does it (approximately) agree with the
table? Now do it for the first two rows. Does this agree with the table?
2
y
Let us talk a little bit more about the example y
′
=
3
, y(0) = 1 . Suppose that instead of the value y(2) we wish to find y(3) .
The results of this effort are listed in Table 1.2 for successive halvings of h. What is going on here? Well, you should solve the
equation exactly and you will notice that the solution does not exist at x = 3 . In fact, the solution goes to infinity when you
approach x = 3 .
h Approximate y(3)
1 3.16232
0.5 4.54329
0.25 6.86079
0.125 10.80321
0.0625 17.59893
0.03125 29.46004
0.015625 50.40121
0.0078125 87.75769
2
y
Table 1.2: Attempts to use Euler’s to approximate y(3) where of y = , y(0) = 1 .
′
Another case when things can go bad is if the solution oscillates wildly near some point. Such an example is given in IODE Project
II. The solution may exist at all points, but even a much better numerical method than Euler would need an insanely small step size
to approximate the solution with reasonable precision. And computers might not be able to easily handle such a small step size.
In real applications we would not use a simple method such as Euler’s. The simplest method that would probably be used in a real
application is the standard Runge-Kutta method (see exercises). That is a fourth order method, meaning that if we halve the interval,
the error generally goes down by a factor of 16 (it is fourth order as = x x x ).
1
16
1
2
1
2
1
2
1
Choosing the right method to use and the right step size can be very tricky. There are several competing factors to consider.
Computational time: Each step takes computer time. Even if the function f is simple to compute, we do it many times over.
Large step size means faster computation, but perhaps not the right precision.
Roundoff errors: Computers only compute with a certain number of significant digits. Errors introduced by rounding numbers
off during our computations become noticeable when the step size becomes too small relative to the quantities we are working
with. So reducing step size may in fact make errors worse.
Stability: Certain equations may be numerically unstable. What may happen is that the numbers never seem to stabilize no
matter how many times we halve the interval. We may need a ridiculously small interval size, which may not be practical due to
roundoff errors or computational time considerations. Such problems are sometimes called stiff. In the worst case, the numerical
computations might be giving us bogus numbers that look like a correct answer. Just because the numbers have stabilized after
successive halving, does not mean that we must have the right answer.
We have seen just the beginnings of the challenges that appear in real applications. Numerical approximation of solutions to
differential equations is an active research area for engineers and mathematicians. For example, the general purpose method used for
the ODE solver in Matlab and Octave (as of this writing) is a method that appeared in the literature only in the 1980s.
dy
Exercise 1.1.3: Solve = sin(5x) for y(0) = 2 .
dx
dy 1
Exercise 1.1.4: Solve =
2
for y(0) = 0 .
dx x −1
time t = 0 it is 1000 kilometers from earth. How far from earth is it at one minute from time t = 0 ?
dx
Exercise 1.1.10: Solve = sin(t ) + t
2
, x(0) = 20 . It is OK to leave your answer as a definite integral.
dt
dy
Exercise 1.1.101: Solve = e
x
+x and y(0) = 10 .
dx
1
Exercise 1.1.102: Solve x ′
= , x(1) = 1 .
x2
1 π
Exercise 1.1.103: Solve x ′
= , x(0) = .
cos(x) 2
Exercise 1.1.104: Sid is in a car traveling at speed 10t + 70 miles per hour away from Las Vegas, where t is in hours. At t = 0 the
Sid is 10 miles away from Vegas. How far from Vegas is Sid 2 hours later?
Exercise 1.1.105: Solve y ′
= y
′′
, y(0) = 1 , where n is a positive integer. Hint: You have to consider different cases.
Exercise 1.2.7 (challenging): Take y = f(x, y) , y(0) = 0 , where f(x, y) > 1 for all
′
x and y . If the solution exists for all x, can
you say what happens to y(x) as x goes to positive infinity? Explain.
Exercise 1.2.8 (challenging): Take (y − x)y
′
= 0 , x(0) = 0 . a) Find two distinct solutions. b) Explain why this does not violate
Picard’s theorem.
Exercise 1.2.101: Sketch the slope field of y ′
= y
3
. Can you visually find the solution that satisfies y(0) = 0 ?
Exercise 1.2.102: Is it possible to solve y ′
= xy for y(0) = 0 ? Is the solution unique?
Exercise 1.2.103: Is it possible to solve y ′
= 2
x
for y(1) = 0 ?
x −1
y
.
Exercise 1.3.2: Solve y ′
= x y
2
.
Exercise 1.3.3: Solve , for x(0) = 0 .
dx 2
= (x − 1)
dt
dt
= x sin(t) , for x(0) = 1 .
dy
Exercise 1.3.5: Solve dx
= xy + x + y + 1 . Hint: Factor the right hand side.
Exercise 1.3.6: Solve x y ′
= y + 2x y
2
, where y(1) = 1 .
2
dy y +1
Exercise 1.3.7: Solve = , for y(0) = 1 .
dx x2 +1
2
dy
Exercise 1.3.8: Find an implicit solution for , for y(0) = 1 .
x +1
= 2
dx y +1
Exercise 1.3.106: Take Exercise 1.3.3 with the same numbers: 89 degrees at t = 0 , 85 degrees at t = 1 , and ambient temperature of
22 degrees. Suppose these temperatures were measured with precision of ±0.5 degrees. Given this imprecision, the time it takes the
coffee to cool to (exactly) 60 degrees is also only known in a certain range. Find this range. Hint: Think about what kind of error
makes the cooling time longer and what shorter.
Exercise 1.4.9: Suppose there are two lakes located on a stream. Clean water flows into the first lake, then the water from the first lake
flows into the second lake, and then water from the second lake flows further downstream. The in and out flow from each lake is 500
liters per hour. The first lake contains 100 thousand liters of water and the second lake contains 200 thousand liters of water. A truck
with 500 kg of toxic substance crashes into the first lake. Assume that the water is being continually mixed perfectly by the stream.
a) Find the concentration of toxic substance as a function of time in both lakes.
b) When will the concentration in the first lake be below 0.001 kg per liter?
temperature, and k > 0 is a constant. Suppose that A = A cos(ωt) for some constants A and ω. That is, the ambient temperature
0 0
oscillates (for example night and day temperatures). a) Find the general solution. b) In the long term, will the initial conditions make
much of a difference? Why or why not?
Exercise 1.4.11: Initially 5 grams of salt are dissolved in 20 liters of water. Brine with concentration of salt 2 grams of salt per liter is
added at a rate of 3 liters a minute. The tank is mixed well and is drained at 3 liters a minute. How long does the process have to
continue until there are 20 grams of salt in the tank?
Exercise 1.4.12: Initially a tank contains 10 liters of pure water. Brine of unknown (but constant) concentration of salt is flowing in at
1 liter per minute. The water is mixed well and drained at 1 liter per minute. In 20 minutes there are 15 grams of salt in the tank. What
is the concentration of salt in the incoming brine?
Exercise 1.4.101: Solve y ′
+ 3x y + x
2 2
.
Exercise 1.4.102: Solve y ′
+ 2 sin(2x)y = 2 sin(2x) with y(π/2) = 3 .
Exercise 1.4.103: Suppose a water tank is being pumped out at 3 L/min. The water tank starts at 10 L of clean water. Water with toxic
substance is flowing into the tank at 2 L/min, with concentration 20tg/L at time t. When the tank is half empty, how many grams of
toxic substance are in the tank (assuming perfect mixing)?
Exercise 1.4.104: Suppose we have bacteria on a plate and suppose that we are slowly adding a toxic substance such that the rate of
growth is slowing down. That is, suppose that = (2 − 0.1 t)P . If P (0) = 1000 , find the population at t = 5 .
dP
dt
1.5: SUBSTITUTION
Hint: Answers need not always be in closed form.
Exercise 1.5.1: Solve y ′
+ y(x
2
− 1) + x y
6
= 0 , with y(1) = 1 .
Exercise 1.5.2: Solve 2yy ′
+1 = y
2
+x , with y(0) = 1 .
Exercise 1.5.3: Solve y ′
+ xy = y
4
, with y(0) = 1 .
−−−−−−
Exercise 1.5.4: Solve ′ 2
yy + x = √x + y
2
.
Exercise 1.5.5: Solve y ′
= (x + y − 1)
2
.
2 2
x −y
Exercise 1.5.6: Solve y ′
= , with y(1) = 2 .
xy
solutions of the equation. c) Find lim x(t) for the solution with the initial condition x(0) = −1 .
t→∞
Exercise 1.6.4: Let x = sin x . a) Draw the phase diagram for −4π ≤ x ≤ 4π . On this interval mark the critical points stable or
′
unstable. b) Sketch typical solutions of the equation. c) Find lim x(t) for the solution with the initial condition x(0) = 1 .
t→∞
Exercise 1.6.5: Suppose f(x) is positive for 0 < x < 1 , it is zero when x = 0 and x = 1 , and it is negative for all other x. a) Draw
the phase diagram for x = f(x) , find the critical points and mark them stable or unstable. b) Sketch typical solutions of the equation.
′
c) Find lim x(t) for the solution with the initial condition x(0) = 0.5 .
t→∞
Exercise 1.6.6: Start with the logistic equation = kx(M − x) . Suppose that we modify our harvesting. That is we will only
dx
dt
harvest an amount proportional to current population. In other words we harvest hx per unit of time for some h > 0 (Similar to earlier
example with h replaced with hx). a) Construct the differential equation. b) Show that if kM > h , then the equation is still logistic. c)
What happens when kM < h ?
Exercise 1.6.103: Assume that a population of fish in a lake satisfies = kx(M − x) . Now suppose that fish are continually added
dx
dt
at A fish per unit of time. a) Find the differential equation for x. b) What is the new limiting population?[1]
3The unstable points that have one of the arrows pointing towards the critical point are sometimes called semistable.
dt
= (2t − x )
2
, x(0) = 2 . Use Euler’s method with step size h = 0.5 to approximate x(1) .
Exercise 1.7.4: Consider = t − x , x(0) = 1 . a) Use Euler’s method with step sizes h = 1,
dx
dt
, , to approximate x(1) . b) 1
2
1
4
1
Solve the equation exactly. c) Describe what happens to the errors for each h you used. That is, find the factor by which the error
changed each time you halved the interval.
Exercise 1.7.5: Approximate the value of e by looking at the initial value problem y
′
= y with y(0) = 1 and approximating y(1)
grows. Using Euler’s method, start with h = 1 and compute y , y , y , y to try to approximate y(4) . What happened? Now halve
1 2 3 4
the interval. Keep halving the interval and approximating y(4) until the numbers you are getting start to stabilize (that is, until they
start going towards zero). Note: You might want to use a calculator.
dy
The simplest method used in practice is the Runge-Kutta method. Consider dx
= f(x, y) , y(x 0) = y0 and a step size h. Everything
is the same as in Euler’s method, except the computation of y and x . i+1 i+1
k1 = f(xi , yi ), (1.E.1)
h h
k2 = f(xi + , yi + k1 ) xi+1 = xi + h, (1.E.2)
2 2
h h k1 + 2 k2 + 2 k3 + k4
k3 = f(xi + , yi + k2 ) yi+1 = yi + h, (1.E.3)
2 2 6
dy
Exercise 1.7.7: Consider dx
= yx
2
, y(0) = 1 . a) Use Runge-Kutta (see above) with step sizes h = 1 and h = 1
2
to approximate
y(1) . b) Use Euler’s method with h = 1 and h = 1
2
. c) Solve exactly, find the exact value of y(1), and compare.
Exercise 1.7.101: Let x = sin(xt) , and x(0) = 1 . Approximate
′
x(1) using Euler’s method with step sizes 1, 0.5, 0.25. Use a
calculator and compute up to 4 decimal digits.
Exercise 1.7.102: Let x = 2t , and x(0) = 0 . a) Approximate x(4) using Euler’s method with step sizes 4, 2, and 1. b) Solve
′
exactly, and compute the errors. c) Compute the factor by which the errors changed.
Exercise 1.7.103: Let x = x e
′
, and x(0) = 0 . a) Approximate
xt+1
x(4) using Euler’s method with step sizes 4, 2, and 1. b) Guess
an exact solution based on part a) and compute the errors.
4Named after the Swiss mathematician Leonhard Paul Euler (1707 – 1783). Do note the correct pronunciation of the name sounds
more like “oiler.”
1 1/8/2020
2.1: SECOND ORDER LINEAR ODES
Let us consider the general second order linear differential equation
′′ ′
A(x)y + B(x)y + C(x)y = F (x). (2.1.1)
2. y ′′ 2
−k y = 0 with two solutions of y 1 = e
kx
and y = e 2
−kx
.
If we know two solutions of a linear homogeneous equation, we know a lot more of them.
Theorem 2.1.1 (Superposition). Suppose y and y are two solutions of the homogeneous equation (2.1.3). Then
1 2
That is, we can add solutions together and multiply them by constants to obtain new and different solutions. We call the expression
C y +C y
1 1 a linear combination of y and y . Let us prove this theorem; the proof is very enlightening and illustrates how linear
2 2 1 2
equations work.
Proof. Let y = C 1 y1 + C2 y2 . Then
′′ ′ ′′ ′
y + p y + qy = (C1 y1 + C2 y2 ) + p(C1 y1 + C2 y2 ) + q(C1 y1 + C2 y2 ) (2.1.5)
′′ ′′ ′ ′
= C1 y + C2 y + C1 p y + C2 p y + C1 q y1 + C2 q y2 (2.1.6)
1 2 1 2
′′ ′ ′′ ′
= C1 (y + py + q y1 ) + C2 (y + py + q y2 ) (2.1.7)
1 1 2 2
= C1 .0 + C2 .0 = 0 (2.1.8)
The proof becomes even simpler to state if we use the operator notation. An operator is an object that eats functions and spits out
functions (kind of like what a function, which eats numbers and spits out numbers). Define the operator L by
′′ ′
Ly = y + p y + qy. (2.1.9)
The differential equation now becomes Ly = 0 . The operator (and the equation) L being linear means that
L(C y + C y ) = C Ly + C Ly
1 1 2 2. The proof above becomes
1 1 2 2
d d
cosh x = sinh x sinh x = cosh x (2.1.12)
dx dx
2 2
cosh x − sinh x = 1 (2.1.13)
Exercise 2.1.1 :
Derive these properties using the definitions of sinh and cosh in terms of exponentials.
Theorem 2.1.2 (Existence and uniqueness). Suppose p(x) , q(x), and f(x) are continuous functions on some interval I containing a
′′ ′
y + p(x)y + q(x)y = f(x). (2.1.14)
has exactly one solution y(x) defined on the same interval I satisfying the initial conditions
y(a) = b0 and y ′
(a) = b1 .
For example, the equation y ′′ 2
+k y = 0 with y(0) = b and y 0
′
(0) = b1 has the solution
b1
y(x) = b0 cos(kx) + sin(kx) (2.1.15)
k
The equation y ′′ 2
−k y = 0 with y(0) = b 0 and y ′
(0) = b1 has the solution
b1
y(x) = b0 cosh(kx) + sinh(kx) (2.1.16)
k
Using cosh and sinh in this solution allows us to solve for the initial conditions in a cleaner way than if we have used the
exponentials.
The initial conditions for a second order ODE consist of two equations. Common sense tells us that if we have two arbitrary constants
and two equations, then we should be able to solve for the constants and find a solution to the differential equation satisfying the initial
conditions.
Question: Suppose we find two different solutions y and 1 y2 to the homogeneous equation (2.1.3). Can every solution be written
(using superposition) in the form y = C y + C y ? 1 1 2 2
Answer is affirmative! Provided that y and y are different enough in the following sense. We will say
1 2 y1 and y2 are linearly
independent if one is not a constant multiple of the other.
Theorem 2.1.3. Let p(x) and q(x) be continuous functions and let y1 and y2 be two linearly independent solutions to the
homogeneous equation (2.1.3). Then every other solution is of the form
y = C1 y1 + C2 y2 . (2.1.17)
Theorem 2.1.3 basically says that the general solution of the ODE are y = C y + C y . For example, we found the solutions 1 1 2 2
y = sin x and y = cos x for the equation y + y = 0 . It is not hard to see that sine and cosine are not constant multiples of each
′′
1 2
other. If sin x = A cos x for some constant A , we let x = 0 and this would imply A = 0 . But then sin x = 0 for all x, which is
preposterous. So y and y are linearly independent and
1 2
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
This is a second order linear homogeneous equation with constant coefficients. Constant coefficients means that the functions in front
of y , y , and y are constants and do not depend on x.
′′ ′
To guess a solution, think of a function that you know stays essentially the same when we differentiate it, so that we can take the
function and its derivatives, add some multiples of these together, and end up with zero.
Let us try a solution of the form y = e rx
. Then y ′
= re
rx
and y ′′
= r e
2 rx
. Plug in to get
′′ ′
y − 6 y + 8y = 0 (2.2.2)
2 rx rx rx
r e − 6re + 8e = 0 (2.2.3)
2
r − 6r + 8 = 0 (2.2.4)
divide through by e rx
(r − 2)(r − 4) = 0 (2.2.5)
Hence, if r = 2 or r = 4 , then e rx
is a solution. So let y 1 = e
2x
and y 2 = e
4x
.
Exercise 2.2.1:
Check that y and y are solutions.
1 2
Solution
The functions e and e are linearly independent. If they were not linearly independent we could write e = Ce
2x 4x 4x 2x
for some
constant C , implying that e = C for all x, which is clearly not possible. Hence, we can write the general solution as
2x
2x 4x
y = C1 e + C2 e (2.2.6)
We need to solve for C1 and C2 . To apply the initial conditions we first find y
′ 2x
= 2 C1 e + 4 C2 e
4x
. We plug in x = 0 and
solve.
−2 = y(0) = C1 + C2 (2.2.7)
′
6 = y (0) = 2 C1 + 4 C2 (2.2.8)
Either apply some matrix algebra, or just solve these by high school math. For example, divide the second equation by 2 to obtain
3 = C + 2 C , and subtract the two equations to get 5 = C . Then C = −7 as −2 = C + 5 . Hence, the solution we are
1 2 2 1 1
looking for is
2x 4x
y = −7 e + 5e (2.2.9)
Let us generalize this example into a method. Suppose that we have an equation
′′ ′
ay + b y + cy = 0, (2.2.10)
2
ar + br + c = 0 (2.2.12)
The equation ar 2
+ br + c = 0 is called the characteristic equation of the ODE. Solve for the r by using the quadratic formula.
− − −−−−−
2
−b ± √ b − 4ac
r1 , r2 = (2.2.13)
2a
Therefore, we have e r1 x
and e r2 x
as solutions. There is still a difficulty if r 1 = r2 , but it is not hard to overcome.
Theorem 2.2.1
Suppose that r and r are the roots of the characteristic equation.
1 2
r1 x
y = (C1 + C2 x)e (2.2.15)
If r1 = r2 (happens when b 2
− 4ac = 0 ), then (2.2.10) has the general solution
r1 x r2 x
y = C1 e + C2 e (2.2.16)
r1 x
y = (C1 + C2 x)e (2.2.17)
For another example of the first case, take the equation y − k y = 0 . Here the characteristic equation is
′′ 2
r
2
−k
2
= 0 or
(r − k)(r + k) = 0 . Consequently, e and e are the two linearly independent solutions.
−kx kx
Example 2.2.1:
Find the general solution of
′′ ′
y − 8 y + 16y = 0 (2.2.18)
Solution
The characteristic equation is r . The equation has a double root r . The general solution
2 2
− 8r + 16 = (r − 4) = 0 1 = r2 = 4
is, therefore,
4x 4x 4x
y = (C1 + C2 x)e = C1 e + C2 x e (2.2.19)
and y ′′
= 8e
4x
+ 16x e . Plug in
4x
′′ ′ 4x 4x 4x 4x 4x
y − 8 y + 16y = 8 e + 16x e − 8(e + 4x e ) + 16x e = 0 (2.2.20)
We should note that in practice, doubled root rarely happens. If coefficients are picked truly randomly we are very unlikely to get a
doubled root.
r2 −r1
is a solution when the roots are distinct. When we take the limit as r goes to r , 1 2
It turns out that with this multiplication rule, all the standard properties of arithmetic hold. Further, and most importantly
(0, 1) × (0, 1) = (−1, 0). (2.2.22)
Generally we just write (a, b) as (a + ib) , and we treat i as if it were an unknown. We do arithmetic with complex numbers just as we
would with polynomials. The property we just mentioned becomes i = −1 . So whenever we see i , we replace it by −1 . The2 2
Note that engineers often use the letter j instead of i for the square root of −1 . We will use the mathematicians’ convention and use i.
3−2i 3+2i
=
3+2i
13
=
3
13
+
13
2
i .
We can also define the exponential e of a complex number. We do this by writing down the Taylor series and plugging in the
a+ib
complex number. Because most properties of the exponential can be proved by looking at the Taylor series, these properties still hold
for the complex exponential. For example the very important property: e = e e . This means that e = e e . Hence if we can
x+y x y a+ib a ib
Exercise 2.2.4:
Using Euler’s formula, check the identities:
iθ −iθ iθ −iθ
e +e e −e
cos θ = and sin θ = (2.2.24)
2 2
Exercise 2.2.5:
2
Double angle identities: Start with e i(2θ)
= (e
iθ
) . Use Euler on each side anddeduce:
2 2
cos(2θ) = cos θ − sin θ and sin(2θ) = 2 sin θ cos θ (2.2.25)
For a complex number a + ib we call a the real part and b the imaginary part of the number. Often the following notation is used,
− −−−−−−
−b √ 4ac − b2
r1 , r2 = ±i (2.2.27)
2a 2a
As you can see, we always get a pair of roots of the form α ± iβ . In this case we can still write the solution as
(α+iβ)x (α−iβ)x
y = C1 e + C2 e (2.2.28)
However, the exponential is now complex valued. We would need to allow C and C to be complex numbers to obtain a real-valued 1 2
solution (which is what we are after). While there is nothing particularly wrong with this approach, it can make calculations harder and
it is generally preferred to find two real-valued solutions.
Here we can use Euler’s formula. Let
(α+iβ)x (α−iβ)x
y1 = e and y2 = e (2.2.29)
ax ax
y2 = e cos(βx) − i e sin(βx) (2.2.31)
are also solutions. Furthermore, they are real-valued. It is not hard to see that they are linearly independent (not multiples of each
other). Therefore, we have the following theorem.
Theorem 2.2.3. For the homegneous second order ODE
′′ ′
ay + b y + cy = 0 (2.2.34)
Example 2.2.2:
Find the general solution of y ′′ 2
+k y = 0 , for a constant k > 0 .
The characteristic equation is r 2
+k
2
= 0 . Therefore, the roots are r = ±ik and by the theorem we have the general solution
Example 2.2.3:
Find the solution of y ′′ ′
− 6 y + 13y = 0, y(0) = 0, y (0) = 10.
′
Solution
The characteristic equation is r − 6r + 13 = 0 . By completing the square we get
2
(r − 3)
2 2
+2 = 0 and hence the roots are
r = 3 ± 2i . By the theorem we have the general solution
3x 3x
y = C1 e cos(2x) + C2 e sin(2x) (2.2.37)
To find the solution satisfying the initial conditions, we first plug in zero to get
0 0
0 = y(0) = C1 e cos 0 + C2 e sin 0 = C1 (2.2.38)
Hence C 1 = 0 and y = C 2e
3x
sin(2x) . We differentiate
′ 3x 3x
y = 3 C2 e sin(2x) + 2 C2 e cos(2x) (2.2.39)
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
In other words, a linear combination of solutions to Equation 2.3.1 is also a solution to Equation 2.3.1 . We also have the existence
and uniqueness theorem for nonhomogeneous linear equations.
has exactly one solution y(x) defined on the same interval I satisfying the initial conditions
′ (n−1)
y(a) = b0 , y (a) = b1 , …, y (a) = bn−1 (2.3.4)
for n functions. In this case it is easier to state as follows. The functions y , y , … , y are linearly independent if
1 2 n
c1 y1 + c2 y2 + ⋯ + cn yn = 0 (2.3.5)
has only the trivial solution c = c = ⋯ = c = 0 , where the equation must hold for all x. If we can solve equation with some
1 2 n
constants where for example c ≠ 0 , then we can solve for y as a linear combination of the others. If the functions are not linearly
1 1
Example 2.3.1
Show that e , e , and e
x 2x 3x
are linearly independent functions.
Solution
Let us give several ways to show this fact. Many textbooks introduce Wronskians, but that is really not necessary to solve this
example. Let us write down
x 2x 3x
c1 e + c2 e + c3 e = 0 (2.3.6)
2 3
c1 z + c2 z + c3 z = 0 (2.3.7)
The left hand side is a third degree polynomial in z. It can either be identically zero, or it can have at most 3 zeros. Therefore, it is
identically zero, c = c = c = 0 , and the functions are linearly independent.
1 2 3
As the equation is true for all x, let x → ∞ . After taking the limit we see that c 3 = 0 . Hence our equation becomes
x 2x
c1 e + c2 e = 0 (2.3.10)
Rinse, repeat!
How about yet another way. We again write
x 2x 3x
c1 e + c2 e + c3 e = 0 (2.3.11)
We can evaluate the equation and its derivatives at different values of x to obtain equations for c , c , and c . Let us first divide by 1 2 3
e for simplicity.
x
x 2x
c1 + c2 e + c3 e = 0 (2.3.12)
There is no one best way to do it. All of these methods are perfectly valid.
Example 2.3.2
On the other hand, the functions e x
,e
−x
and cosh x are linearly dependent. Simply apply definition of the hyperbolic cosine:
x −x
e +e x −x
cosh x = or 2 cosh x − e −e = 0 (2.3.14)
2
Solution
Try: y = e rx
. We plug in and get
3 rx 2 rx rx rx
r e − 3r e − re + 3e = 0 (2.3.16)
3 2
r − 3r −r+3 = 0 (2.3.17)
The trick now is to find the roots. There is a formula for the roots of degree 3 and 4 polynomials, but it is very complicated. There is
no formula for higher degree polynomials. That does not mean that the roots do not exist. There are always n roots for an n th
degree polynomial. They may be repeated and they may be complex. Computers are pretty good at finding roots approximately for
reasonable size polynomials.
A good place to start is to plot the polynomial and check where it is zero. We can also simply try plugging in. We just start plugging
in numbers r = −2, −1, 0, 1, 2, … and see if we get a hit (we can also try complex numbers). Even if we do not get a hit, we
may get an indication of where the root is. For example, we plug r = −2 into our polynomial and get -15; we plug in r = 0 and
get 3. That means there is a root between r = −2 and r = 0 , because the sign changed. If we find one root, say r , then we know 1
polynomial such as this is the multiple of the negations of all the roots because r − 3 r − r + 3 = (r − r )(r − r )(r − r ) . 3 2
1 2 3
So
3 = (−r1 )(−r2 )(−r3 ) = (1)(−1)(−r3 ) = r3 (2.3.18)
You should check that r = 3 really is a root. Hence we know that e , e , and e are solutions to (2.3.15). They are linearly
3
−x x 3x
independent as can easily be checked, and there are three of them, which happens to be exactly the number we need. Hence the
general solution is
−x x 3x
y = C1 e + C2 e + C3 e (2.3.19)
′
2 = y (0) = −C1 + C2 + 3 C3 (2.3.21)
′′
3 = y (0) = C1 + C2 + 9 C3 (2.3.22)
It is possible to find the solution by high school algebra, but it would be a pain. The sensible way to solve a system of equations
such as this is to use matrix algebra. For now we note that the solution is C = − , C = 1 , and C = . The specific solution1
1
4
2 3
1
to the ODE is
1 1
−x x 3x
y= − e +e + e (2.3.23)
4 4
Next, suppose that we have real roots, but they are repeated. Let us say we have a root r repeated k times. In the spirit of the second
order solution, and for the same reasons, we have the solutions
rx rx 2 rx k−1 rx
e , xe ,x e , …, x e (2.3.24)
Example 2.3.4
Solve
(4) ′′′ ′′ ′
y − 3y + 3y −y = 0 (2.3.25)
Solution
We note that the characteristic equation is
4 3 2
r − 3r + 3r −r = 0 (2.3.26)
The case of complex roots is similar to second order equations. Complex roots always come in pairs r = α ± iβ . Suppose we have
two such complex roots, each repeated k times. The corresponding solution is
k−1 ax k−1 ax
(C0 + C1 x + ⋯ + Ck−1 x )e cos(βx) + (D0 + D1 x + ⋯ + Dk−1 x )e sin(βx)
Example 2.3.5
Solve
(4) ′′′ ′′ ′
y − 4y + 8y − 8 y + 4y = 0 (2.3.28)
Solution
The characteristic equation is
2
2
(r − 2r + 2) = 0 (2.3.30)
2 2
( (r − 1) + 1) = 0 (2.3.31)
Hence the roots are 1 ± i , both with multiplicity 2. Hence the general solution to the ODE is
x x
y = (C1 + C2 x)e cos x + (C3 + C4 x)e sin x (2.3.32)
The way we solved the characteristic equation above is really by guessing or by inspection. It is not so easy in general. We could
also have asked a computer or an advanced calculator for the roots.
OUTSIDE LINKS
After reading this lecture, it may be good to try Project III from the IODE website: http://www.math.uiuc.edu/iode/.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Our first example is a mass on a spring. Suppose we have a mass m > 0 (in kilograms) connected by a spring with spring constant
k > 0 (in newtons per meter) to a fixed wall. There may be some external force F (t) (in newtons) acting on the mass. Finally, there is
some friction measured by c ≥ 0 (in newton-seconds per meter) as the mass slides along the floor (or perhaps there is a damper
connected).
Let x be the displacement of the mass ( x = 0 is the rest position), with x growing to the right (away from the wall). The force
exerted by the spring is proportional to the compression of the spring by Hooke’s law. Therefore, it is kx in the negative direction.
Similarly the amount of force exerted by friction is proportional to the velocity of the mass. By Newton’s second law we know that
force equals mass times acceleration and hence m x = F (t) − cx − kx or
′′ ′
′′ ′
mx + c x + kx = F (t) (2.4.1)
This is a linear second order constant coefficient ODE. We set up some terminology about this equation. We say the motion is
I. forced, if F ≢ 0 (if F is not identically zero),
II. unforced or free, if F ≡ 0 (if F is identically zero),
III. damped, if c > 0 , and
IV. undamped, if c = 0 .
This system appears in lots of applications even if it does not at first seem like it. Many real world scenarios can be simplified to a
mass on a spring. For example, a bungee jump setup is essentially a mass and spring system (you are the mass). It would be good if
someone did the math before you jump off the bridge, right? Let us give two other examples.
Here is an example for electrical engineers. Suppose that we have the pictured RLC circuit. There is a resistor with a resistance of R
ohms, an inductor with an inductance of L henries, and a capacitor with a capacitance of C farads. There is also an electric source
(such as a battery) giving a voltage of E(t) volts at time t (measured in seconds). Let Q(t) be the charge in coulombs on the capacitor
and I (t) be the current in the circuit. The relation between the two is Q = 1 . By elementary principles we have that
′
Q
LI
′
+ RI + = E . If we differentiate we get
C
1
′′ ′ ′
LI + RI (t) + I (t) = E (t) (2.4.2)
C
This is an nonhomogeneous second order constant coefficient linear equation. Further, as L, R, andC are all positive, this system
behaves just like the mass and spring system. The position of the mass is replaced by the current. Mass is replaced by the inductance,
damping is replaced by resistance and the spring constant is replaced by one over the capacitance. The change in voltage becomes the
forcing function. Hence for constant voltage this is an unforced motion.
Our next example behaves like a mass and spring system only approximately. Suppose we have a mass m on a pendulum of length L.
We wish to find an equation for the angle θ(t). Let g be the force of gravity. Elementary physics mandates that the equation is of the
form
g
′′
θ + sin θ = 0 (2.4.3)
L
m. So mLθ has to be equal to the tangential component of the force given by the gravity. This is mq sin θ in the opposite direction.
Note that the errors that we get from the approximation build up. So after a very long time, the behavior of the real system might be
substantially different from our solution. Also we will see that in a mass-spring system, the amplitude is independent of the period.
This is not true for a pendulum. Nevertheless, for reasonably short periods of time and small swings (for example if the pendulum is
very long), the approximation is reasonably good.
In real world problems it is very often necessary to make these types of simplifications. Therefore, it is good to understand both the
mathematics and the physics of the situation to see if the simplification is valid in the context of the questions we are trying to answer.
2.4.2 FREE UNDAMPED MOTION
In this section we will only consider free or unforced motion, as we cannot yet solve nonhomogeneous equations. Let us start with
undamped motion where c = 0 . We have the equation
′′
mx + kx = 0 (2.4.5)
−−
−
k
If we divide by m and let w 0 = √ , then we can write the equation as
m
′′ 2
x +w x = 0 (2.4.6)
0
By a trigonometric identity, we have that for two different constants C and γ, we have
A cos(w0 t) + B sin(w0 t) = C cos(w0 t − γ) (2.4.8)
−−− −−−− B
It is not hard to compute that 2
C = √A + B
2
and tan γ = . Therefore, we let C and γ be our arbitrary constants and write
A
x(t) = C cos(w0 t − γ) .
Exercise 2.4.1:
Justify the above identity and verify the equations for C and γ. Hint: Start with cos(α − β) = cos(α) cos(β) + sin(α) sin(β)
We can see that the amplitude is C , w is the (angular) frequency, and γ is the so-called phase shift. The phase shift just shifts the
0
graph left or right. We call w the natural (angular) frequency. This entire setup is usually called simple harmonic motion.
0
Let us pause to explain the word angular before the word frequency. The units of w are radians per unit time, not cycles per unit
0
w0
time as is the usual measure of frequency. Because we know one cycle is 2π radians, the usual frequency is given by . It is
2π
simply a matter of where we put the constant 2π, and that is a matter of taste.
2π
The period of the motion is one over the frequency (in cycles per unit time) and hence . That is the amount of time it takes to
w0
Example 2.4.1:
−−
−
k –
We can directly compute w0 = √ = √4 = 2 . Hence the angular frequency is 2. The usual frequency in Hertz (cycles per
m
2 1
second) is = ≈ 0.318 .
2π π
Letting x(0) = 0.5 means A = 0.5 . Then x (t) = −2(0.5) sin(2t) + 2B cos(2t) . Letting x (0) = 1 we get
′ ′
B = 0.5 .
−−−−−−− −−−− −−−−− −−
−
Therefore, the amplitude is C = √A + B = √0.25 + 0.25 = √0.5 ≈ 0.707 . The solution is
2 2
corresponds to the initial conditions x(0) = A and x (0) = w B . Therefore, it is easy to figure out A and B from the initial
′
0
conditions. The amplitude and the phase shift can then be computed from A and B. In the example, we have already found the
B
amplitude C . Let us compute the phase shift. We know that tan γ = = 1 . We take the arctangent of 1 and get approximately
A
0.785. We still need to check if this γ is in the correct quadrant (and add π to γ if it is not). Since both A and B are positive, then γ
should be in the first quadrant, and 0.785 radians really is in the first quadrant.
Note: Many calculators and computer software do not only have the atan function for arctangent, but also what is sometimes called
atan2. This function takes two arguments, B and A , and returns a γ in the correct quadrant for you.
2.4.3 FREE DAMPED MOTION
Let us now focus on damped motion. Let us rewrite the equation
′′ ′
mx + c x + kx = 0 (2.4.14)
as
′′ ′ 2
x + 2p x + w x = 0 (2.4.15)
0
where
−
−−
k c
w0 = √ ,p = (2.4.16)
m 2m
The form of the solution depends on whether we get complex or real roots. We get real roots if and only if the following number is
nonnegative:
2
c 2 k c − 4km
2 2
p −w = ( ) − = (2.4.19)
0 2
2m m 4m
OVERDAMPING
When c 2
− 4km > 0 , we say the system is overdamped. In this case, there are two distinct real roots r and r . Notice that both roots
1 2
−−−−−− −−−−−−−
are negative. As √p 2
−w
2
0
is always less than P , then −P ± √P 2
−w
2
0
is negative.
The solution is
r1 t r2 t
x(t) = C1 e + C2 e (2.4.20)
Since r , r are negative, x(t) → 0 as t → ∞ . Thus the mass will tend towards the rest position as time goes to infinity. For a few
1 2
−C1
( r2 −r1 )t
= e (2.4.21)
C2
This equation has at most one solution t ≥ 0 . For some initial conditions the graph will never cross the x axis, as is evident from the
sample graphs.
Example 2.4.2:
Suppose the mass is released from rest. That is x(0) = x and x (0) = 0 . Then 0
′
x0
r2 t r1 t
x(t) = (r1 e − r2 e ) (2.4.22)
r1 − r2
CRITICAL DAMPING
When c − 4km = 0 , we say the system is critically damped. In this case, there is one root of multiplicity 2 and this root is
2
−P .
Therefore, our solution is
−pt −pt
x(t) = C1 e + C2 t e (2.4.23)
The behavior of a critically damped system is very similar to an overdamped system. After all a critically damped system is in some
sense a limit of overdamped systems. Since these equations are really only an approximation to the real world, in reality we are never
critically damped, it is a place we can only reach in theory. We are always a little bit underdamped or a little bit overdamped. It is better
not to dwell on critical damping.
UNDERDAMPING
PIC
− −−−−−
−
−− 2 2
= −p ± √−1 √ w − p (2.4.25)
0
= −p ± iw1 (2.4.26)
−pt
x(t) = e (A cos(w1 t) + B sin(w1 t) (2.4.27)
or
−pt
x(t) = Ce cos(w1 t − γ) (2.4.28)
An example plot is given in Figure 2.4. Note that we still have that x(t) → 0 as t → ∞ .
In the figure we also show the envelope curves Ce −pt
and −Ce . The solution is the oscillating line between the two envelope
pt
curves. The envelope curves give the maximum amplitude of the oscillation at any given point in time. For example if you are bungee
jumping, you are really interested in computing the envelope curve so that you do not hit the concrete with your head.
The phase shift γ just shifts the graph left or right but within the envelope curves (the envelope curves do not change if γ changes).
Finally note that the angular pseudo-frequency (we do not call it a frequency since the solution is not really a periodic function) w 1
becomes smaller when the damping c (and hence P ) becomes larger. This makes sense. When we change the damping just a little bit,
we do not expect the behavior of the solution to change dramatically. If we keep making c larger, then at some point the solution
should start looking like the solution for critical damping or overdamping, where no oscillation happens. So if c approaches 4km, we
2
want w to approach 0.
1
On the other hand when c becomes smaller, w approaches w ( w is always smaller than w ), and the solution looks more and more
1 0 1 0
like the steady periodic motion of the undamped case. The envelope curves become flatter and flatter as c (and hence P ) goes to 0.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
We will write Ly = 2x + 1 when the exact form of the operator is not important. We solve (Equation 2.5.1) in the following manner. First,
we find the general solution y to the associated homogeneous equation
c
′′ ′
y + 5 y + 6y = 0 (2.5.2)
We call y the complementary solution. Next, we find a single particular solution y to (2.5.1) in some way. Then
c p
y = yc + yp (2.5.3)
is the general solution to (2.5.1). We have Lyc = 0 and Ly = 2x + 1 . As L is a linear operator we verify that
p y is a solution,
Ly = L(yc + yp ) = Lyc + Lyp = 0 + (2x + 1) . Let us see why we obtain the general solution.
Let y and y~ be two different particular solutions to (2.5.1). Write the difference as w = y
p p p
~
− yp . Then plug w into the left hand side of the
equation to get
′′ ′ ′′ ′ ~′′ ~′ ~
w + 5 w + 6w = (yp + 5 yp + 6 yp ) − (y p + 5 y p + 6 y p ) = (2x + 1) − (2x + 1) = 0 (2.5.4)
Using the operator notation the calculation becomes simpler. As L is a linear operator we write
~ ~
Lw = L(yp − y p ) = Lyp − Ly p = (2x + 1) − (2x + 1) = 0 (2.5.5)
So w = y − y~ is a solution to (2.5.2), that is Lw = 0 . Any two solutions of (2.5.1) differ by a solution to the homogeneous equation
p p
(2.5.2). The solution y = y + y includes all solutions to (2.5.1), since y is the general solution to the associated homogeneous equation.
c p c
Theorem 2.5.1
Let Ly = f(x) be a linear ODE (not necessarily constant coefficient). Let y be the complementary solution (the general solution to the
c
associated homogeneous equation Ly = 0 ) andlet y be any particular solution to Ly = f(x) . Then the general solution to
p
Ly = f(x) is
y = yc + yp . (2.5.6)
The moral of the story is that we can find the particular solution in any old way. If we find a different particular solution (by a different
method, or simply by guessing), then we still get the same general solution. The formula may look different, and the constants we will have
to choose to satisfy the initial conditions may be different, but it is the same solution.
yp = Ax + B (2.5.7)
We plug in to obtain
′′ ′ ′′ ′
yp + 5 yp + 6 yp = (Ax + B) + 5(Ax + B) + 6(Ax + B) = 0 + 5A + 6Ax + 6B = 6Ax + (5A + 6B) (2.5.8)
1 1 1 1 3x − 1
So 6Ax + (5A + 6B) = 2x + 1 . Therefore, A = and B = − . That means yp = x− = . Solving the
3 9 3 9 9
complementary problem (exercise!) we get
−2x −3x
yc = C1 e + C2 e (2.5.9)
1 1 1
′
0 = y(0) = C1 + C2 − , = y (0) = −2 C1 − 3 C2 + (2.5.11)
9 3 3
1 2
We solve to get C 1 = and C 2 = − . The particular solution we want is
3 9
−2x −3x
1 −2x
2 −3x
3x − 1 3e − 2e + 3x − 1
y(x) = e − e + = (2.5.12)
3 9 9 9
Exercise 2.5.1
Check that y really solves the equation (2.5.1) and the given initial conditions.
Note: A common mistake is to solve for constants using the initial conditions with y and only add the particular solution y after that. c p
That will not work. You need to first compute y = y + y and only then solve for the constants using the initial conditions.
c p
A right hand side consisting of exponentials, sines, and cosines can be handled similarly. For example,
′′ ′
y + 2 y + 2y = cos(2x) (2.5.13)
Let us find some y . We start by guessing the solution includes some multiple of
p cos(2x) . We may have to also add a multiple of
sin(2x) to our guess since derivatives of cosine are sines. We try
The left hand side must equal to right hand side. We group terms and we get that −4A + 4B + 2A = 1 and −4B − 4A + 2B = 0 .
−1 1
So −2A + 4B = 1 and 2A + B = 0 and hence A = and B = . So
10 5
− cos(2x) + 2 sin(2x)
yp = A cos(2x) + B sin(2x) = (2.5.16)
10
Similarly, if the right hand side contains exponentials we try exponentials. For example, for
3x
Ly = e (2.5.17)
we will try y = Ae 3x
as our guess and try to solve for A .
When the right hand side is a multiple of sines, cosines, exponentials, and polynomials, we can use the product rule for differentiation to
come up with a guess. We need to guess a form for y such that Ly is of the same form, and has all the terms needed to for the right
p p
We will plug in and then hopefully get equations that we can solve for A, B, C, D, Eand F . As you can see this can make for a very long
and tedious calculation very quickly.
There is one hiccup in all this. It could be that our guess actually solves the associated homogeneous equation. That is, suppose we have
′′ 3x
y − 9y = e (2.5.20)
There is no way we can choose A to make the left hand side be e . The trick in this case is to multiply our guess by 3x
x to get rid of
duplication with the complementary solution. That is first we compute y (solution to Ly = 0 ) c
−3x 3x
yc = C1 e + C2 e (2.5.22)
′′ 3x 3x 3x 3x
y − 9y = 6Ae + 9Ax e − 9Ax e = 6Ae (2.5.23)
1
Thus 6Ae 3x
is supposed to equal e . Hence, 6A = 1 and so A =
3x
. We can now write the general solution as
6
1
−3x 3x 3x
y = yc + yp = C1 e + C2 e + xe (2.5.24)
6
It is possible that multiplying by x does not get rid of all duplication. For example,
′′ ′ 3x
y − 6 y + 9y = e (2.5.25)
The complementary solution is y = C e + C x e . Guessing y = Axe would not get us anywhere. In this case we want to guess
c 1
3x
2
3x 3x
y = Ax e
p . Basically, we want to multiply our guess by x until all duplication is gone. But no more! Multiplying too many times will
2 3x
not work.
Finally, what if the right hand side has several terms, such as
2x
Ly = e + cos x (2.5.26)
In this case we find u that solves Lu = e and v that solves Lv = cos x (that is, do each term separately). Then note that if
2x
Note that each new derivative of tan x looks completely different and cannot be written as a linear combination of the previous derivatives.
We get sec x, 2 sec x tan x, etc …
2 2
This equation calls for a different method. We present the method of variation of parameters, which will handle any equation of the form
Ly = f(x) , provided we can solve certain integrals. For simplicity, we restrict ourselves to second order constant coefficient equations, but
the method works for higher order equations just as well (the computations become more tedious). The method also works for equations with
nonconstant coefficients, provided we can solve the associated homogeneous equation.
Perhaps it is best to explain this method by example. Let us try to solve the equation
′′
Ly = y + y = tan x (2.5.28)
where u and u are functions and not constants. We are trying to satisfy Ly = tan x . That gives us one condition on the functions u and
1 2 1
′ ′ ′ ′ ′
y = (u y1 + u y2 ) + (u1 y + u2 y ) (2.5.30)
1 2 1 2
We can still impose one more condition at our discretion to simplify computations (we have two unknown functions, so we should be allowed
two conditions). We require that (u y + u y ) = 0 . This makes computing the second derivative easier.
′
1 1
′
2 2
′ ′ ′
y = u1 y + u2 y (2.5.31)
1 2
′′ ′ ′ ′ ′ ′′ ′′
y = (u y + u y ) + (u1 y + u2 y ) (2.5.32)
1 1 2 2 1 2
′′ ′ ′ ′ ′
y = (u y + u y ) − (u1 y1 + u2 y2 ) (2.5.33)
1 1 2 2
We have (u 1 y1 + u2 y2 ) = y and so
′′ ′ ′ ′ ′
y = (u y +u y )−y (2.5.34)
1 1 2 2
′ ′
u y1 + u y2 = 0 (2.5.36)
1 2
′ ′ ′ ′
u y +u y = f(x) (2.5.37)
1 1 2 2
We can now solve for uand u in terms of f(x), y and y . We will always get these formulas for any Ly = f(x) , where
′
1
′
2 1 2
Ly = y
′′ ′
+ p(x)y + q(x)y . There is a general formula for the solution we can just plug into, but it is better to just repeat what we do
below. In our case the two equations become
′ ′
u cos(x) + u sin(x) = 0 (2.5.38)
1 2
′ ′
−u sin(x) + u cos(x) = tan(x) (2.5.39)
1 2
Hence
′ ′ 2
u cos(x) sin(x) + u sin (x) = 0 (2.5.40)
1 2
′ ′ 2
−u sin(x) cos(x) + u cos (x) = tan(x) cos(x) = sin(x) (2.5.41)
1 2
And thus
′ 2 2
u (sin (x) + cos (x)) = sin(x) (2.5.42)
2
′
u = sin(x) (2.5.43)
2
2
−sin (x)
′
u = = − tan(x) sin(x) (2.5.44)
1
cos(x)
1 sin(x) − 1
′
u1 = ∫ u dx = ∫ − tan(x) sin(x)dx = ln ∣ ∣ + sin(x) (2.5.45)
1
2 sin(x) + 1
′
u2 = ∫ u dx = ∫ sin(x)dx = − cos(x) (2.5.46)
2
1 sin(x) − 1
y = C1 cos(x) + C2 sin(x) + cos(x) ln ∣ ∣ (2.5.48)
2 sin(x) + 1
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
for some nonzero F (t) . The setup is again: m is mass, c is friction, k is the spring constant, and F (t) is an external force acting on
the mass.
What we are interested in is periodic forcing, such as noncentered rotating parts, or perhaps loud sounds, or other sources of periodic
force. Once we learn about Fourier series in Chapter 4, we will see that we cover all periodic functions by simply considering
F (t) = F cos(ωt) (or sine instead of cosine, the calculations are essentially the same).
0
This equation has the complementary solution (solution to the associated homogeneous equation)
xc = C1 cos(ω0 t) + C2 sin(ω0 t) (2.6.3)
−−
where ω 0 = √
k
m
is the natural frequency (angular), which is the frequency at which the system “wants to oscillate” without external
interference.
Let us suppose that ω ≠ ω . We try the solution x = A cos(ωt) and solve for A . Note that we need not have sine in our trial
0 p
solution as on the left hand side we will only get cosines anyway. If you include a sine it is fine; you will find that its coefficient will be
zero.
We solve using the method of undetermined coefficients. We find that
F0
xp = cos(ωt) (2.6.4)
2 2
m(ω −ω )
0
Example 2.6.1:
Take
′′ ′
0.5 x + 8x = 10 cos(πt), x(0) = 0, x (0) = 0 (2.6.7)
−
−−
Let us compute. First we read off the parameters: ω = π, ω . The general solution is
8
0 = √ = 4, F0 = 10, m = 0.5
0.5
Solve for C and C using the initial conditions. It is easy to see that C and C . Hence
−20
1 2 1 = 2 = 0
16−π 2
20
x = (cos(πt) − cos(4t)) (2.6.9)
2
16 − π
Notice the “beating” behavior in Figure 2.5. First use the trigonometric identity
A−B A+B
2 sin( ) sin( ) = cos B − cos A (2.6.10)
2 2
to get that
20 4 −π 4 +π
x = (2 sin( t) sin( t)) (2.6.11)
2
16 − π 2 2
coefficients. We notice that cos(ωt) solves the associated homogeneous equation. Therefore, we need to try
x = At cos(ωt) + Bt sin(ωt) . This time we do need the sine term since the second derivative of t cos(ωt) does contain sines.
p
′′ 2
F0
x +ω x = cos(ωt) (2.6.12)
m
F0
2Bω cos(ωt) − 2Aω sin(ωt) = cos(ωt) (2.6.13)
m
F0 F0
Hence A = 0 and B = 2mω
. Our particular solution is 2mω
t sin(ωt) and our general solution is
F0
x = C1 cos(ωt) + C2 sin(ωt) + t sin(ωt) (2.6.14)
2mω
The important term is the last one (the particular solution we found). We can see that this term grows without bound as t → ∞ . In
−−−−−−−
F0 t −F0 t
fact it oscillates between 2mω
and 2mω
. The first two terms only oscillate between ±√C
2
1
+C
2
2
, which becomes smaller and
smaller in proportion to the oscillations of the last term as t gets larger. In Figure 2.6 we see the graph with
C = C = 0, F = 2, m = 1, ω = π .
1 2 0
By forcing the system in just the right frequency we produce very wild oscillations. This kind of behavior is called resonance or
perhaps pure resonance. Sometimes resonance is desired. For example, remember when as a kid you could start swinging by just
moving back and forth on the swing seat in the “correct frequency”? You were trying to achieve resonance. The force of each one of
your moves was small, but after a while it produced large swings.
On the other hand resonance can be destructive. In an earthquake some buildings collapse while others may be relatively
undamaged. This is due to different buildings having different resonance frequencies. So figuring out the resonance frequency can
be very important.
A common (but wrong) example of destructive force of resonance is the Tacoma Narrows bridge failure. It turns out there was a
different phenomenon at play1.
for some c > 0 . We have solved the homogeneous problem before. We let
−
−−
c k
p = ω0 = √ (2.6.16)
2m m
−−−−−−
The roots of the characteristic equation of the associated homogeneous problem are r1 , r2 = −p ± √p
2 2
−ω
0
. The form of the
general solution of the associated homogeneous equation depends on the sign of p 2
−ω
2
0
, or equivalently on the sign of c 2
− 4km , as
we have seen before. That is,
r1 t r2 t 2
⎧ C1 e + C2 e if c > 4km,
pt −pt 2
xc = ⎨ C1 e + C2 t e if c = 4km, (2.6.18)
⎩
−pt 2
e (C1 cos(ω1 t) + C2 sin(ω1 t)) if c < 4km,
−−−−−−
where ω 1 = √ω
2
0
− p2 . In any case, we can see that xc (t) → 0 as t → ∞ . Furthermore, there can be no conflicts when trying to
solve for the undetermined coefficients by trying x p = A cos(ωt) + B sin(ωt) . Let us plug in and solve for A and B. We get (the
tedious details are left to reader)
F0
2 2 2 2
((ω − ω )B − 2ωpA) sin(ωt) + ((ω − ω )A + 2ωpB) cos(ωt) = cos(ωt) (2.6.19)
0 0
m
We get that
2 2
(ω − ω )F0
0
A = (2.6.20)
2 2
2 2
m (2ωp) + m (ω −ω )
0
2ωpF0
B = (2.6.21)
2 2 2
2
m (2ωp) + m (ω −ω )
0
−−− −−−−
We also compute 2
C = √A + B
2
to be
F0
C = −−−−−−−−−−−−−−−− (2.6.22)
2 2
2
m √ (2ωp) + (ω − ω2 )
0
2 2
(ω − ω )F0 2ωpF0
0
xP = cos(ωt) + sin(ωt) (2.6.24)
2 2 2 2
2 2
m (2ωp) + m (ω − ω2 ) m (2ωp) + m (ω − ω2 )
0 0
Or in the alternative notation we have amplitude C and phase shift γ where (if ω ≠ ω ) 0
B 2ωp
tan γ = = (2.6.25)
2 2
A ω −ω
0
Hence we have
F0
xp = −−−−−−−−−−−−−−−− cos(ωt − γ) (2.6.26)
2 2
2 2
m √ (2ωp) + (ω −ω )
0
F0
If ω = ω we see that A = 0, B = C =
0
2mωp
, and γ =
π
2
.
The exact formula is not as important as the idea. Do not memorize the above formula, you should instead remember the ideas
involved. For different forcing function F , you will get a different formula for x . So there is no point in memorizing this specific
p
formula. You can always recompute it later or look it up if you really need it.
For reasons we will explain in a moment, we call x the transient solution and denote it by
c xtr . We call the xp we found above the
steady periodic solution and denote it by x . The general solution to our problem is
sp
Figure 2.7: Solutions with different initial conditions for parameters k = 1, m = 1, F 0 = 1, c = 0.7, and ω = 1.1.
We note that x = x goes to zero as t → ∞ , as all the terms involve an exponential with a negative exponent. Hence for large t, the
c tr
effect of x is negligible and we will essentially only see x . Hence the name transient. Notice that x involves no arbitrary
tr sp sp
constants, and the initial conditions will only affect x . This means that the effect of the initial conditions will be negligible after some
tr
period of time. Because of this behavior, we might as well focus on the steady periodic solution and ignore the transient solution. See
Figure 2.7 for a graph of different initial conditions.
Notice that the speed at which x goes to zero depends on P (and hence c ). The bigger P is (the bigger c is), the “faster” x becomes
tr tr
negligible. So the smaller the damping, the longer the “transient region.” This agrees with the observation that when c = 0 , the initial
conditions affect the behavior for all time (i.e. an infinite “transient region”).
Let us describe what we mean by resonance when damping is present. Since there were no conflicts when solving with undetermined
coefficient, there is no term that goes to infinity. What we will look at however is the maximum value of the amplitude of the steady
maximum. We call the ω that achieves this maximum the practical resonance frequency. We call the maximal amplitude C(ω) the
practical resonance amplitude. Thus when damping is present we talk of practical resonance rather than pure resonance. A sample plot
for three different values of c is given in Figure 2.8. As you can see the practical resonance amplitude grows as damping gets smaller,
and any practical resonance can disappear when damping is large.
Figure 2.8: Graph of C(ω) showing practical resonance with parameters k = 1, m = 1, F = 1 . The top line is with c = 0.4 , the
0
middle line with c = 0.8 , and the bottom line with c = 1.6 .
To find the maximum we need to find the derivative C ′
(ω) . Computation shows
2 2 2
−4ω(2 p +ω − ω )F0
′ 0
C (ω) = (2.6.28)
3/2
2 2 2
m ((2ωp) + (ω − ω ))
0
−−−−−−−
It can be shown that if 2
ω
0
2
− 2p is positive, then √ω
2
0
− 2p
2
is the practical resonance frequency (that is the point where C(ω) is
maximal, note that in this case C (ω) > 0 for small ω). If ω = 0 is the maximum, then essentially there is no practical resonance
′
since we assume that ω > 0 in our system. In this case the amplitude gets larger as the forcing frequency gets smaller.
If practical resonance occurs, the frequency is smaller than ω . As the damping c (and hence P ) becomes smaller, the practical
0
resonance frequency goes to ω . So when damping is very small, ω is a good estimate of the resonance frequency. This behavior
0 0
agrees with the observation that when c = 0 , then ω is the resonance frequency.
0
The behavior is more complicated if the forcing function is not an exact cosine wave, but for example a square wave. It will be good to
come back to this section once we have learned about the Fourier series.
1K.Billah and R. Scanlan, Resonance, Tacoma Narrows Bridge Failure, and Undergraduate Physics Textbooks, American Journal of
Physics, 59(2), 1991, 118–124, http://www.ketchum.org/billah/Billah-Scanlan.pdf
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
2 2
(b − a) − 4ac = 0 or (b − a) − 4ac < 0 ?
2
We will revisit the case when (b − a) − 4ac < 0 later.
2
Exercise 2.1.7: Same equation as in Exercise 2.1.6. Suppose (b − a) − 4ac = 0 . Find a formula for the
general solution of ax2 y ′′ + bxy ′ + cy = 0 . Hint: Try y = xr ln x for the second solution.
If you have one solution to a second order linear homogeneous equation you can find another one. This is
the reduction of order method.
Exercise 2.1.8 (reduction of order): Suppose y1 is a solution to y
′′
+ p(x) y
′
+ q(x)y = 0 . Show that
− ∫ p(x)dx
e
y2 (x) = y1 (x) ∫ dx (2.E.1)
2
( y1 (x))
is also a solution.
Note: If you wish to come up with the formula for reduction of order yourself, start by trying
y2 (x) = y1 (x)v(x). Then plug y2 into the equation, use the fact that y1 is a solution, substitute w = v , and
′
you have a first order linear equation in w. Solve for w and then for v. When solving for w, make sure to
include a constant of integration. Let us solve some famous equations using the method.
Exercise 2.1.9 (Chebyshev’s equation of order 1): Take (1 − x2 ) y ′′ − xy ′ + y = 0 . a) Show that y = x is a
solution. b) Use reduction of order to find a second linearly independent solution. c) Write down the
general solution.
Exercise 2.1.10 (Hermite’s equation of order 2): Take y ′′ − 2xy ′ + 4y = 0 . a) Show that y = 1 − 2x2 is a
solution. b) Use reduction of order to find a second linearly independent solution. c) Write down the
general solution.
Exercise 2.1.101: Are sin(x) and x
e linearly independent? Justify.
Exercise 2.1.102: Are e
x
and x+2
e linearly independent? Justify.
Exercise 2.1.103: Guess a solution to y
′′
+ y
′
+ y = 5 .
Exercise 2.1.104: Find the general solution to xy
′′
+ y
′
= 0 . Hint: Notice that it is a first order ODE in y
′
.
1 1/8/2020
3.1: INTRODUCTION TO SYSTEMS OF ODES
Often we do not have just one dependent variable and just one differential equation, we may end up with systems of several equations
and several dependent variables even if we start with a single equation. If we have several dependent variables, suppose y , y , ..., y , 1 2 n
then we can have a differential equation involving all of them and their derivatives. For example, y = f(y , y , y , y , x) . Usually, ′′
1
′
1
′
2 1 2
′′ ′ ′
y = f2 (y , y , y1 , y2 , x) (3.1.2)
2 1 2
for some functions f and f . We call the above a system of differential equations. More precisely, the above is a second order system
1 2
of ODEs.
Example 3.1.1:
Sometimes a system is easy to solve by solving for one variable and then for the second variable. Take the first order system
′
y = y1 , (3.1.3)
1
′
y = y1 − y2 , (3.1.4)
2
equation y = C e − y , which is a linear first order equation that is easily solved for y . By the method of integrating factor we
′
2 1
x
2 2
obtain
C1
x 2x
e y2 = e + C2 (3.1.5)
2
or
C1
2 −x
y2 = e + C2 e . (3.1.6)
2
and
C1 x −x
y2 = e + C2 e . (3.1.8)
2
We now solve for and given the initial conditions. We substitute and find that and . Thus the
3
C1 C2 x = 0 C1 = 1 C2 =
2
solution is:
x
y1 = e , (3.1.9)
and
1 3
x −x
y2 = e + e . (3.1.10)
2 2
Generally, we will not be so lucky to be able to solve for each variable separately as in the example above, and we will have to solve
for all variables at once.
As an example application, let us think of mass and spring systems again. Suppose we have one spring with constant k, but two masses
m and m . We can think of the masses as carts, and we will suppose that they ride along a straight track with no friction. Let x be
1 2 1
the displacement of the first cart and x be the displacement of the second cart. That is, we put the two carts somewhere with no
2
tension on the spring, and we mark the position of the first and second cart and call those the zero positions. Then x measures how far 1
on the first cart is k(x − x ) , since x − x is how far the string is stretched (or compressed) from the rest position. The force
2 1 2 1
exerted on the second cart is the opposite, thus the same thing with a negative sign.
Newton’s second law states that force equals mass times acceleration. So the system of equations governing the setup is
′′
m1 x = k(x2 − x1 ) (3.1.11)
1
′′
m2 x = −k(x2 − x1 ) (3.1.12)
2
In this system we cannot solve for the x or x variable separately. That we must solve for both x and x at once is intuitively clear,
1 2 1 2
since where the first cart goes depends exactly on where the second cart goes and vice-versa.
Before we talk about how to handle systems, let us note that in some sense we need only consider first order systems. Let us take an
n
th
order differential equation
(n) (n−1) ′
y = F (y , . . . , y , y, x). (3.1.13)
′
u = u3 (3.1.15)
2
. (3.1.16)
. (3.1.17)
. (3.1.18)
′
u = un (3.1.19)
n−1
′
un = F (un , un−1 , … , u2 , u1 , x) (3.1.20)
We solve this system for u , u , … , u . Once we have solved for the u’s, we can discard
1 2 n u2 through un and let y = u1 . We note
that this y solves the original equation.
A similar process can be followed for a system of higher order differential equations. For example, a system of k differential equations
in k unknowns, all of order n, can be transformed into a first order system of nxk equations and nxk unknowns.
Example 3.1.2:
Sometimes we can use this idea in reverse as well. Let us take the system
′
x = 2y − x (3.1.21)
′
y = x (3.1.22)
where the independent variable is t. We wish to solve for the initial conditions x(0) = 1 and y(0) = 0 .
If we differentiate the second equation we get y ′′
= x
′
. We know what x is in terms of x and y , and we know that x = y .
′ ′
′′ ′
y = x = 2y − x = 2y − y. (3.1.23)
We now have the equation y + y − 2y = 0 . We know how to solve this equation and we find that y = C
′′ ′
1e
−2t
+ C2 e
t
. Once
we have y we use the equation y = x to get x.
′
′ −2t t
x = y = −2 C1 e + C2 e (3.1.24)
We solve for the initial conditions 1 = x(0) = −2 C 1 + C2 and 0 = y(0) = C 1 + C2 . Hence, C 1 = −C2 and 1 = 3C . So 2
3 3
−2t t −2t t
2e +e −e +e
x = , y= (3.1.25)
3 3
Exercise 3.1.1:
Plug in and confirm that this really is the solution.
It is useful to go back and forth between systems and higher order equations for other reasons. For example, the ODE
approximation methods are generally only given as solutions for first order systems. It is not very hard to adapt the code for the
equations should be the direction of the vector (2y − x, x) with the speed equal to the magnitude of this vector. So we draw the
vector 2y − x, x based at the point x, y and we do this for many points on the xy -plane. We may want to scale down the size of
our vectors to fit many of them on the same direction field (Figure 3.1).
We can now draw a path of the solution in the plane. That is, suppose the solution is given by x = f(t), y = g(t) then we can pick
an interval of t (say 0 ⩾ t ⩾ 2 for our example) and plot all the points (f(t), g(t)) for t in the selected range. The resulting
picture is usually called the phase portrait (or phase plane portrait). The particular curve obtained we call the trajectory or solution
curve. An example plot is given in Figure 3.2. In this figure the line starts at (1, 0) and travels along the vector field for a distance
of 2 units of t. Since we solved this system precisely we can compute x(2) and y(2) . We get that x(2) ≈ 2.475 and
y(2) ≈ 2.457 . This point corresponds to the top right end of the plotted solution curve in the figure.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
By a vector we will usually mean a column vector, that is an m × 1 matrix. If we mean a row vector we will explicitly say so (a row
vector is a 1 × n matrix). We will usually denote matrices by upper case letters and vectors by lower case letters with an arrow such as x⃗
or b ⃗. By 0⃗ we will mean the vector of all zeros.
It is easy to define some operations on matrices. Note that we will want 1 × 1 matrices to really act like numbers, so our operations will
have to be compatible with this viewpoint.
First, we can multiply by a scalar (a number). This means just multiplying each entry by the same number. For example,
1 2 3 2 4 6
2[ ] = [ ] (3.2.2)
4 5 6 8 10 12
Matrix addition is also easy. We add matrices element by element. For example,
1 2 3 1 1 −1 2 3 2
[ ]+[ ] = [ ] (3.2.3)
4 5 6 0 2 4 4 7 10
(A + B) + C = A + (B + C) (3.2.6)
c(A + B) = cA + cB (3.2.7)
(c + d)A = cA + dA (3.2.8)
Another useful operation for matrices is the so-called transpose. This operation just swaps rows and columns of a matrix. The transpose of
A is denoted by A . Example:
T
T 1 4
⎡ ⎤
1 2 3
[ ] = ⎢2 5⎥ (3.2.9)
4 5 6 ⎣ ⎦
3 6
⎣ ⎦
b3
the j column of A . For an m × n matrix A and an n × p matrix B we can define the product AB. We let AB be an m × p matrix
th
whose ij entry is
th
For multiplication we want an analog of a 1. This analog is the so-called identity matrix. The identity matrix is a square matrix with 1s on
the main diagonal and zeros everywhere else. It is usually denoted by I . For each size we have a different identity matrix and so
sometimes we may denote the size as a subscript. For example, the I would be the 3 × 3 identity matrix
3
1 0 0
⎡ ⎤
I = I3 = ⎢ 0 1 0⎥ (3.2.13)
⎣ ⎦
0 0 1
We have the following rules for matrix multiplication. Suppose that A, B, C are matrices of the correct sizes so that the following make
sense. Let α denote a scalar (number).
A(BC) = (AB)C (3.2.14)
A(B + C) = AB + AC (3.2.15)
(B + C)A = BA + CA (3.2.16)
I A = A = AI (3.2.18)
1 0
B = [ ] .
0 2
For the last two items to hold we would need to “divide” by a matrix. This is where the matrix inverse comes in. Suppose that A and B
are n × n matrices such that
AB = I = BA (3.2.19)
−1
to get A AB = A AC or I B = I C or B = C . It is also not hard to see that (A ) = A .
−1 −1 −1
a b def
det ([ ]) = ad − bc (3.2.20)
c d
Before trying to compute the determinant for larger matrices, let us first note the meaning of the determinant. Consider an n × n matrix
as a mapping of the n dimensional euclidean space R to R . In particular, a 2 × 2 matrix A is a mapping of the plane to itself, where x⃗
n n
gets sent to Ax⃗ . Then the determinant of A is the factor by which the area of objects gets changed. If we take the unit square (square of
side 1) in the plane, then A takes the square to a parallelogram of area ∣det(A)∣ . The sign of det(A) denotes changing of orientation
(negative if the axes got flipped). For example, let
1 1
A = [ ] (3.2.21)
−1 1
Then det(A) = 1 + 1 = 2 . Let us see where the square with vertices (0, 0), (1, 0), (0, 1) and (1, 1) gets sent. Clearly (0, 0) gets
sent to (0, 0).
–
So the image of the square is another square. The image square has a side of length √2 and is therefore of area 2.
If you think back to high school geometry, you may have seen a formula for computing the area of a parallelogram with vertices
(0, 0), (a, c), (b, d) and (a + b, c + d) . And it is precisely
a b
∣det ([ ])∣ (3.2.23)
c d
a b
The vertical lines above mean absolute value. The matrix [ ] carries the unit square to the given parallelogram.
c d
Now we can define the determinant for larger matrices. We define A as the matrix A with the ij
th
i row and the j th
column deleted. To
compute the determinant of a matrix, pick one row, say the i row and compute. th
n
i+j
det(A) = ∑(−1 ) aij det(Aij ) (3.2.24)
j=1
We alternately add and subtract the determinants of the submatrices A for a fixed i and all j. For a 3 × 3 matrix, picking the first row,
ij
1 2 3
⎛⎡ ⎤⎞
5 6 4 6 4 5
det ⎜⎢ 4 5 6 ⎥⎟ = 1 ⋅ det ([ ]) − 2 ⋅ det ([ ]) + 3 ⋅ det ([ ]) (3.2.26)
⎝⎣ ⎦⎠ 8 9 7 9 7 8
7 8 9
The numbers (−1 ) det(A ) are called cofactors of the matrix and this way of computing the determinant is called the cofactor
i+j
ij
expansion. It is also possible to compute the determinant by expanding along columns (picking a column instead of a row above).
Note that a common notation for the determinant is a pair of vertical lines:
a b a b
[ ] = det ([ ]) (3.2.28)
c d c d
I personally find this notation confusing as vertical lines usually mean a positive quantity, while determinants can be negative. I will not
use this notation in this book. One of the most important properties of determinants (in the context of this course) is the following
theorem.
Theorem 3.2.1. An n × n matrix A is invertible if and only if det(A) ≠ 0 .
In fact, there is a formula for the inverse of a 2 × 2 matrix
−1
a b 1 d −b
[ ] = [ ] (3.2.29)
c d ad − bc −c a
Notice the determinant of the matrix in the denominator of the fraction. The formula only works if the determinant is nonzero, otherwise
we are dividing by zero.
3.2.4 SOLVING LINEAR SYSTEMS
One application of matrices we will need is to solve systems of linear equations. This is best shown by example. Suppose that we have the
following system of linear equations
2 x1 + 2 x2 + 2 x3 = 2 (3.2.30)
x1 + x2 + 3 x3 = 5 (3.2.31)
x1 + 4 x2 + x3 = 10 (3.2.32)
Without changing the solution, we could swap equations in this system, we could multiply any of the equations by a nonzero number, and
we could add a multiple of one equation to another equation. It turns out these operations always suffice to find a solution.
⎢1 1 3 ⎥ ⎢ x2 ⎥ = ⎢ 5 ⎥ (3.2.33)
⎣ ⎦⎣ ⎦ ⎣ ⎦
1 4 1 x3 10
To solve the system we put the coefficient matrix (the matrix on the left hand side of the equation) together with the vector on the right
and side and get the so-called augmented matrix
⎡ 2 2 2 2 ⎤
⎢ 1 1 3 5 ⎥ (3.2.34)
⎢ ⎥
⎣ 1 4 1 10 ⎦
We will keep doing these operations until we get into a state where it is easy to read off the answer, or until we get into a contradiction
indicating no solution, for example if we come up with an equation such as 0 = 1 .
Let us work through the example. First multiply the first row by 1
2
to obtain
⎡ 1 1 1 1 ⎤
⎢ 1 1 3 5 ⎥ (3.2.35)
⎢ ⎥
⎣ 1 4 1 10 ⎦
Now subtract the first row from the second and third row.
⎡ 1 1 1 1 ⎤
⎢ 0 0 2 4 ⎥ (3.2.36)
⎢ ⎥
⎣ 0 3 0 9 ⎦
3
and the second row by .
1
⎡ 1 1 1 1 ⎤
⎢ 0 0 1 2 ⎥ (3.2.37)
⎢ ⎥
⎣ 0 1 0 3 ⎦
⎡ 1 1 1 1 ⎤
⎢ 0 1 0 3 ⎥ (3.2.38)
⎢ ⎥
⎣ 0 0 1 2 ⎦
Subtract the last row from the first, then subtract the second row from the first.
⎡ 1 0 0 −4 ⎤
⎢ 0 1 0 3 ⎥ (3.2.39)
⎢ ⎥
⎣ 0 0 1 2 ⎦
If we think about what equations this augmented matrix represents, we see that x1 = −4, x2 = 3 and x3 = 2 . We try this solution in
the original system and, voilà, it works!
Exercise 3.2.1:
Check that the solution above really solves the given equations.
If we write this equation in matrix notation as
⃗
Ax⃗ = b (3.2.40)
−1 −1 ⃗
x⃗ = A Ax⃗ = A b (3.2.41)
One last note to make about linear systems of equations is that it is possible that the solution is not unique (or that no solution exists).
It is easy to tell if a solution does not exist. If during the row reduction you come up with a row where all the entries except the last
one are zero (the last entry in a row corresponds to the right hand side of the equation) the system is inconsistent and has no solution.
For example if for a system of 3 equations and 3 unknowns you find a row such as [ 0 0 0∣ 1 ] in the augmented matrix, you
know the system is inconsistent.
You generally try to use row operations until the following conditions are satisfied. The first nonzero entry in each row is called the
leading entry.
There is only one leading entry in each column.
All the entries above and below a leading entry are zero.
All leading entries are 1.
Such a matrix is said to be in reduced row echelon form. The variables corresponding to columns with no leading entries are said to be
free variables. Free variables mean that we can pick those variables to be anything we want and then solve for the rest of the
unknowns.
Example 3.2.1:
The following augmented matrix is in reduced row echelon form.
⎡ 1 2 0 3 ⎤
⎢ 0 0 1 1 ⎥ (3.2.42)
⎢ ⎥
⎣ 0 0 0 0 ⎦
⎡ 1 2 13 3 ⎤
⎢ 0 0 1 1 ⎥ (3.2.43)
⎢ ⎥
⎣ 0 0 0 3 ⎦
there is no need to go further. The last row corresponds to the equation 0 x1 + 0 x2 + 0 x3 = 3 , which is preposterous. Hence, no
solution exists.
position, then the inverse is the matrix with the columns x⃗ for k = 1, … , n (exercise: why?). Therefore, to find the inverse we can
k
write a larger n × 2n augmented matrix [A ∣ I ] , where I is the identity. We then perform row reduction. The reduced row echelon form
of [A ∣ I ] will be of the form [I ∣ A ] if and only if A is invertible. We can then just read off the inverse A .
−1 −1
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
⎢ x2 (t) ⎥
⎢ ⎥
x⃗(t) = ⎢ ⎥ (3.3.1)
⎢ ⎥
⎢ ⋮ ⎥
⎣ ⎦
xn (t)
⎣ ⎦
an1 (t) an2 (t) ⋯ ann (t)
dt
. This is just the matrix valued function whose ij th
entry is a′
ij
(t) .
Rules of differentiation of matrix valued functions are similar to rules for normal functions. Let A(t) and B(t) be matrix valued
functions. Let c be a scalar and let C be a constant matrix. Then
′ ′ ′
(A(t) + B(t)) = A (t) + B (t) (3.3.3)
′ ′ ′
(A(t)B(t)) = A (t)B(t) + A(t)B (t) (3.3.4)
′ ′
(cA(t)) = c A (t) (3.3.5)
′ ′
(CA(t)) = CA (t) (3.3.6)
′ ′
(A(t)C) = A (t)C (3.3.7)
⃗
and only write x⃗ = P x⃗ + f . A solution of the system is a vector valued function x⃗ satisfying the vector equation.
For example, the equations
′ t 2
x = 2t x1 + e x2 + t (3.3.9)
1
x1 t
′
x = − x2 + e (3.3.10)
2
t
can be written as
t
→ 2t e → 2
′ ′
t
x = [ ] x +[ ] (3.3.11)
1 t
−1 e
t
We will mostly concentrate on equations that are not just linear, but are in fact constant coefficient equations. That is, the matrix P will
be constant; it will not depend on t.
When f ⃗ = 0⃗ (the zero vector), then we say the system is homogeneous. For homogeneous linear systems we have the principle of
superposition, just like for single homogeneous equations.
→ →
Theorem 3.3.1. (Superposition) Let ′
x = Px
′
be a linear homogeneous system of ODEs. Suppose that x⃗ 1, … , x⃗n are n solutions of
the equation, then
x⃗ = c1 x⃗1 + c2 x⃗2 + ⋯ + cn x⃗n (3.3.12)
has only the solution c 1 = c2 = ⋯ = cn = 0 , where the equation must hold for all t.
Example 3.3.1
2 2
t 0 −t
x⃗1 = [ ] , x⃗2 = [ ] , x⃗3 = [ ] are linearly depdendent because x⃗1 + x⃗3 = x⃗2 , and this holds for all t. So
t 1 +t 1
In other words c t − c t = 0 and c t + c t + c = 0 . If we set t = 0 , then the second equation becomes c = 0 . However,
1
2
3
3
1 2 3 3
the first equation becomes c t = 0 for all t and so c = 0 . Thus the second equation is just c t = 0 , which means c = 0 . So
1
2
1 2 2
where X(t) is the matrix with columns x⃗ , … , x⃗ , and c ⃗ is the column vector with entries c
1 n 1, … , cn . The matrix valued function
X(t) is called the fundamental matrix, or the fundamental matrix solution.
To solve nonhomogeneous first order linear systems, we use the same technique as we applied to solve single linear nonhomogeneous
equations.
Theorem 3.3.2. Let ′
x⃗ = P x⃗ + f
⃗
be a linear system of ODEs. Suppose x⃗p is one particular solution. Then every solution can be
written as
x⃗ = x⃗c + x⃗p (3.3.15)
So the procedure will be the same as for single equations. We find a particular solution to the nonhomogeneous equation, then we find
the general solution to the associated homogeneous equation, and finally we add the two together.
Alright, suppose you have found the general solution x⃗ ′
= P x⃗ + f
⃗
. Now you are given an initial condition of the form x⃗t 0 = b
⃗
for
some constant vector b . Suppose that X(t) is the fundamental matrix solution of the associated homogeneous equation (i.e. columns of
⃗
In other words, we are solving for c ⃗ the nonhomogeneous system of linear equations
⃗
X(t0 )c ⃗ = b − x⃗p (t0 ) (3.3.18)
Example 3.3.2
In § 3.1 we solved the system
′
x = x1 (3.3.19)
1
′
x = x1 − x2 (3.3.20)
2
′ 1 0 1
x⃗ = [ ] x⃗, x⃗(0) = [ ] (3.3.21)
1 −1 2
c1
We found the general solution was x1 = C1 e
t
and x2 =
2
t
e + c2 e
−t
. Letting C1 = 1 and C2 = 0 , we obtain the solution
t
e 0
[
1 t
. Letting C
] 1 = 0 and C 2 = 1 , we obtain [ −t
] . These two solutions are linearly independent, as can be seen by setting
e e
2
t = 0 , and noting that the resulting constant vectors are linearly independent. In matrix notation, the fundamental matrix solution
is, therefore,
t
e 0
⃗
X = [ ] (3.3.22)
1 t −t
e e
2
or in other words,
1 0 1
[ ] c⃗ = [ ] (3.3.24)
1
1 2
2
1 1 0 1
⃗
After a single elementary row operation we find that c ⃗ = [ 3
] . Hence our solution is [ 1
]C[ ]
1 2
2 2
t t
e 0 1 e
x⃗(t) = X(t)c ⃗ = [ ][ ] = [ ] (3.3.25)
1 t −t 3 1 t 3 −t
e e e + e
2 2 2 2
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
where P is a constant square matrix. We wish to adapt the method for the single constant coefficient equation by trying the function
e . However, x⃗ is a vector. So we try x⃗ = ve , where v ⃗ is an arbitrary constant vector. We plug this x⃗ into the equation to get
λt λt
⃗
λt λt
⃗
λ ve ⃗
= P ve . (3.4.2)
We divide by e λt
and notice that we are looking for a scalar λ and a vector x⃗ that satisfy the equation
λ v ⃗ = P v.⃗ (3.4.3)
To solve this equation we need a little bit more linear algebra, which we now review.
Av ⃗ = λ v.⃗ (3.4.4)
2 1
[ ]
0 1
because
2 1 1 2 1
[ ][ ] = [ ] = 2[ ].
0 1 0 0 0
Let us see how to compute the eigenvalues for any matrix. We rewrite the equation for an eigenvalue as
⃗
(A − λI )v ⃗ = 0.
We notice that this equation has a nonzero solution v ⃗ only if A − λI is not invertible. Were it invertible, we could write
(A − λI )
−1
(A − λI )v ⃗ = (A − λI ) 0,
⃗
which implies v ⃗ = 0⃗. Therefore, A has the eigenvalue λ if and only if λ solves the
−1
equation
det(A − λI ) = 0.
Consequently, we will be able to find an eigenvalue of A without finding a corresponding eigenvector. An eigenvector will have to
be found later, once λ is known.
Example 3.4.2
2 1 1
⎡ ⎤
Find all eigenvalues of ⎢ 1 2 0⎥ .
⎣ ⎦
0 0 2
We write
2 1 1 1 0 0 2 −λ 1 1
⎛⎡ ⎤ ⎡ ⎤⎞ ⎛⎡ ⎤⎞
2
det ⎜⎢ 1 2 0⎥−λ ⎢0 1 0 ⎥⎟ = det ⎜⎢ 1 2 −λ 0 ⎥⎟ = (2 − λ)((2 − λ ) − 1) =
⎝⎣ ⎦ ⎣ ⎦⎠ ⎝⎣ ⎦⎠
0 0 2 0 0 1 0 0 2 −λ
and solve for a nontrivial (nonzero) vector v ⃗. If λ is an eigenvalue, this will always be possible.
Example 3.4.3.
2 1 1
⎡ ⎤
Find an eigenvector of ⎢ 1 2 0⎥ corresponding to the eigenvalue λ = 3 .
⎣ ⎦
0 0 2
We write
2 1 1 1 0 0 v1 −1 0 0 v1
⎛⎡ ⎤ ⎡ ⎤⎞ ⎡ ⎤ ⎡ ⎤⎡ ⎤
⃗
(A − λI )v ⃗ = ⎜⎢ 1 2 0⎥−3 ⎢0 1 0 ⎥⎟ ⎢ v2 ⎥ = ⎢ 1 −1 0 ⎥ ⎢ v2 ⎥ = 0.
⎝⎣ ⎦ ⎣ ⎦⎠ ⎣ ⎦ ⎣ ⎦⎣ ⎦
0 0 2 0 0 1 v3 0 0 −1 v3
It is easy to solve this system of linear equations. We write down the augmented matrix
⎡ −1 0 0 0 ⎤
= ⎢ 1 −1 0 0 ⎥,
⎢ ⎥
⎣ 0 0 −1 0 ⎦
⎡ 1 −1 0 0 ⎤
= ⎢
⎢ 0 0 1 0 ⎥.
⎥
⎣ 0 0 0 0 ⎦
The entries of v⃗ have to satisfy the equations v1 − v2 = 0, v3 = 0 and v is a free variable. We can pick
2 v2 to be arbitrary (but
1
⎡ ⎤
nonzero), let v 1 = v2 , and of course v 3 = 0. For example, if we pick v2 = 1, then v⃗ = ⎢ 1 ⎥ . Let us verify that v⃗ really is an
⎣ ⎦
0
eigenvector corresponding to λ = 3 :
2 1 1 1 3 1
⎡ ⎤⎡ ⎤ ⎡ ⎤ ⎡ ⎤
Yay! It worked.
Exercise 3.4.1:
(easy): Are eigenvectors unique? Can you find a different eigenvector for λ = 3 in the example
above? How are the two eigenvectors related?
Exercise 3.4.2:
Note that when the matrix is 2 × 2 you do not need to write down the augmented matrix and do
row operations when computing eigenvectors (if you have computed the eigenvalues correctly).
Can you see why? Try it for the matrix v . 2
λ1 t λ2 t λn t
x⃗ = c1 v1
⃗ e ⃗ e
+ c2 v2 ⃗ e
+ ⋯ + cn vn . (3.4.6)
column is v ⃗ e .
j
λj t
Example 3.4.4:
Consider the system
2 1 1
⎡ ⎤
′
x⃗ = ⎢ 1 2 0 ⎥ x⃗.
⎣ ⎦
0 0 2
1 0
⎡ ⎤ ⎡ ⎤
eigenvector ⎢ −1 ⎥ for the eigenvalue 1, and ⎢ 1 ⎥ for the eigenvalue 2 (exercise: check). Hence our general solution is
⎣ ⎦ ⎣ ⎦
0 −1
t 3t
1 0 1 c1 e + c3 e
⎡ ⎤ ⎡ ⎤ ⎡ ⎤ ⎡ ⎤
t 2t 3t t 2t 3t
x⃗ = c1 ⎢ −1 ⎥ e + c2 ⎢ 1 ⎥e + c3 ⎢ 1 ⎥ e = ⎢ −c1 e + c2 e + c3 e ⎥.
⎣ ⎦ ⎣ ⎦ ⎣ ⎦ ⎣ 2t ⎦
0 −1 0 −c2 e
⎣ 2t ⎦⎣ ⎦
0 −e 0 c3
Exercise 3.4.3
Check that this x⃗ really solves the system.
Note: If we write a homogeneous linear constant coefficient n th
order equation as a first order system (as we did in § 3.1), then the
eigenvalue equation
det(P − λI ) = 0
is essentially the same as the characteristic equation we got in § 2.2 and § 2.3.
′ 1 1
x⃗ = [ ] x⃗. (3.4.7)
−1 1
1 1
Let us compute the eigenvalues of the matrix P = [ ].
−1 1
1 −λ 1 2 2
det(P − λI ) = det ([ ]) = (1 − λ ) +1 = λ − 2λ + 2 = 0. (3.4.8)
−1 1 −λ
i 1
⃗
[ ] v ⃗ = 0. (3.4.10)
−1 i
The equations i v 1 + v2 = 0 and −v 1 + i v2 = 0 are multiples of each other. So we only need to consider one of them. After picking
i −i
v2 = 1 , for example, we have an eigenvector v ⃗ = [ ] . In similar fashion we find that [ ] is an eigenvector corresponding to the
1 1
eigenvalue 1 + i .
We could write the solution as
(1−i)t (1+i)t
i (1−i)t
−i (1+i)t
c1 i e − c2 i e
x⃗ = c1 [ ]e + c2 [ ]e = [ ]. (3.4.11)
(1−i)t (1+i)t
1 1 c1 e + c2 e
We would then need to look for complex values c and c to solve any initial conditions. It is perhaps not completely clear that we get
1 2
a real solution. We could use Euler’s formula and do the whole song and dance we did before, but we will not. We will do something a
bit smarter first.
We claim that we did not have to look for a second eigenvector (nor for the second eigenvalue). All complex eigenvalues come in pairs
(because the matrix P is real).
z+z̄ ¯
¯¯¯¯¯¯¯¯¯¯¯
¯
First a small side note. The real part of a complex number z can be computed as , where the bar above z means a + ib = a − ib .
2
This operation is called the complex conjugate. If a is a real number, then ā = a . Similarly we can bar whole vectors or matrices. If a
¯
¯¯¯¯¯
¯
¯ ¯
matrix P is real, then P¯ = P . We note that P x⃗ = P¯x⃗ = P x⃗. . Therefore,
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
¯
¯ ¯
(P − λI )v ⃗ = (P − λI )v ⃗. (3.4.12)
¯
So if v⃗ is an eigenvector corresponding to the eigenvalue λ = a + ib , then v⃗ is an eigenvector corresponding to the eigenvalue
¯
λ = a − ib .
Suppose that a + ib is a complex eigenvalue of P , and v ⃗ is a corresponding eigenvector. Then
(a+ib)t
x⃗1 = ve
⃗ (3.4.13)
′ ¯
¯¯¯¯¯¯¯¯
¯
is a solution (complex valued) of x⃗ = P x⃗ . Euler’s formula shows that e a+ib
= e
a−ib
, and so
¯
¯¯¯
¯
→ ¯ (a+ib)t
x⃗2 = x1 = v ⃗e (3.4.14)
2i
is the imaginary part, we find that
¯
¯¯¯
¯
→ →
x⃗1 − x1 x⃗1 − x2
x⃗4 = Im x⃗1 = = (3.4.16)
2i 2i
is also a real-valued solution. It turns out that x⃗ and x⃗ are linearly independent. We will use Euler’s formula to separate out the real
3 4
Then
t
e sin t
Re x⃗1 = [ ], (3.4.18)
t
e cos t
t
e cos t
Im x⃗1 = [ ], (3.4.19)
t
−e sin t
Exercise 3.4.4:
Check that these really are solutions.
The general solution is
t t t t
e sin t e cos t c1 e sin t + c2 e cos t
x⃗ = c1 [ ] + c2 [ ] = [ ].
t t t t
e cos t −e sin t c1 e cos t − c2 e sin t
This solution is real-valued for real c and c . Now we can solve for any initial conditions that we may have.
1 2
For each pair of complex eigenvalues a + ib and a − ib , we get two real-valued linearly independent solutions. We then go on to the
next eigenvalue, which is either a real eigenvalue or another complex eigenvalue pair. If we have n distinct eigenvalues (real or
complex), then we end up with n linearly independent solutions.
We can now find a real-valued general solution to any homogeneous system where the matrix has distinct eigenvalues. When we have
repeated eigenvalues, matters get a bit more complicated and we will look at that situation in § 3.7.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
′
x x
[ ] = P [ ]. (3.5.1)
y y
The system is autonomous (compare this section to § 1.6) and so we can draw a vector field (see end of § 3.1). We will be able to
visually tell what the vector field looks like and how the solutions behave, once we find the eigenvalues and eigenvectors of the matrix
P . For this section, we assume that P has two eigenvalues and two corresponding eigenvectors.
PIC
3.3.
x
Now suppose that x and y are on the line determined by an eigenvector v ⃗ for an eigenvalue λ. That is, [ ] = av ⃗ for some scalar a.
y
Then
′
x x
[ ] = P [ ⃗ = a(P v)
] = P (av) ⃗ = aλ v ⃗ (3.5.2)
y y
The derivative is a multiple of v ⃗ and hence points along the line determined by v ⃗. As λ > 0 , the derivative points in the direction of
vecv when α is positive and in the opposite direction when α is negative. Let us draw the lines determined by the eigenvectors, and let
us draw arrows on the lines to indicate the directions. See Figure 3.4.
Figure 3.5: Example source vector field with eigenvectors and solutions.
−1 −1
Case 2. Suppose both eigenvalues were negative. For example, take the negation of the matrix in case 1, [ ]. The
0 −2
1 1
eigenvalues are -1 and -2 and corresponding eigenvectors are the same, [ ] and [ . The calculation and the picture are almost the
]
0 1
same. The only difference is that the eigenvalues are negative and hence all arrows are reversed. We get the picture in Figure 3.6. We
call this kind of picture a sink or sometimes a stable node.
PIC
Figure 3.6: Example sink vector field with eigenvectors and solutions.
1 1
Case 3. Suppose one eigenvalue is positive and one is negative. For example the matrix [ ]. The eigenvalues are 1 and -2 and
0 −2
1 1
corresponding eigenvectors are [ ] and [ ] . We reverse the arrows on one line (corresponding to the negative eigenvalue) and we
0 −3
Figure 3.7: Example saddle vector field with eigenvectors and solutions.
For the next three cases we will assume the eigenvalues are complex. In this case the eigenvectors are also complex and we cannot just
plot them in the plane.
0 1
Case 4.Suppose the eigenvalues are purely imaginary. That is, suppose the eigenvalues are ±ib . For example, let P = [ ] .
−4 0
1 1 1
The eigenvalues turn out to be ±2i and eigenvectors are [ ] and [ ] . Consider the eigenvalue 2i and its eigenvector [ ] .
2i −2i 2i
1 sin(2t)
i2t
Im [ ]e = [ ]
2i 2cos(2t)
We can take any linear combination of them to get other solutions, which one we take depends on the initial conditions. Now note that
the real part is a parametric equation for an ellipse. Same with the imaginary part and in fact any linear combination of the two. This is
what happens in general when the eigenvalues are purely imaginary. So when the eigenvalues are purely imaginary, we get ellipses for
the solutions. This type of picture is sometimes called a center. See Figure 3.8.
1
and its eigenvector [ ] and find the real and imaginary of ve⃗ (1+2i)t
are
2i
1 cos(2t)
(1+2i)t t
Re [ ]e = e [ ]
2i −2sin(2t)
1 sin(2t)
(1+2i)t t
Im [ ]e = e [ ]
2i 2cos(2t)
Note the e in front of the solutions. This means that the solutions grow in magnitude while spinning around the origin. Hence we get a
t
1
take −1 − 2i and its eigenvector [ ] and find the real and imaginary of ve⃗ (−1−2i)t
are
2i
1 cos(2t)
(−1−2i)t −t
Re [ ]e = e [ ]
2i 2sin(2t)
1 −sin(2t)
(−1−2i)t −t
Im [ ]e = e [ ]
2i 2cos(2t)
Note the e in front of the solutions. This means that the solutions shrink in magnitude while spinning around the origin. Hence we
−t
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
position of the first mass, and x and x the displacement of the second and third mass. We will make, as usual, positive values go
2 3
right (as x grows, the first mass is moving right). See Figure 3.11.
1
′′
m2 x = −k2 (x2 − x1 ) + k3 (x3 − x2 ) = k2 x1 − (k2 + k3 )x2 + k3 x3 , (3.6.2)
2
′′
m3 x = −k3 (x3 − x2 ) − k4 x3 = k3 x2 − (k3 + k4 )x3 . (3.6.3)
3
At this point we could introduce 3 new variables and write out a system of 6 first order equations. We claim this simple setup is easier
to handle as a second order system. We call x⃗ the displacement vector, M the mass matrix, and K the stiffness matrix.
Exercise 3.6.1:
Repeat this setup for 4 masses (find the matrices M and K ). Do it for 5 masses. Can you find a prescription to do it for n masses?
As with a single equation we want to “divide by M .” This means computing the inverse of M . The masses are all nonzero and M is
a diagonal matrix, so comping the inverse is easy:
1
0 0
⎡ m1 ⎤
−1 ⎢ 1 ⎥
M = ⎢ 0 0 ⎥. (3.6.6)
⎢ m2 ⎥
1
⎣ 0 0 ⎦
m3
This fact follows readily by how we multiply diagonal matrices. As an exercise, you should verify that M M −1
= M
−1
M = I.
′′
x⃗ = Ax⃗. (3.6.7)
Many real world systems can be modeled by this equation. For simplicity, we will only talk about the given masses-and-springs
problem. We try a solution of the form
′′
We compute that for this guess, x⃗ ⃗
= α ve
2 αt
. We plug our guess into the equation and get
2 αt αt
⃗
α ve ⃗
= A ve . (3.6.9)
We divide by e αt
to arrive at α 2
v ⃗ = Av ⃗ . Hence if α is an eigenvalue of A and v ⃗ is a corresponding eigenvector, we have found a
2
solution.
In our example, and in other common applications, A has only real negative eigenvalues (and possibly a zero eigenvalue). So we
study only this case. When an eigenvalue λ is negative, it means that α = λ is negative. Hence there is some real number ω such
2
x⃗ = v(cos(ωt)
⃗ + i sin(ωt)). (3.6.10)
By taking the real and imaginary parts (note that v⃗ is real), we find that v ⃗ cos(ωt) and v ⃗ sin(ωt) are linearly independent
solutions.
If an eigenvalue is zero, it turns out that both v ⃗ and vt⃗ are solutions, where v ⃗ is an eigenvector corresponding to the eigenvalue 0.
Exercise 3.6.2:
′′
Show that if A has a zero eigenvalue and v⃗ is a corresponding eigenvector, then x⃗ = v(a
⃗ + bt) is a solution of x⃗ = Ax⃗ for
arbitrary constants a and b.
Theorem 3.6.1. Let A be an n × n matrix with n distinct real negative eigenvalues we denote by −ω
2
1
> −ω
2
2
> ⋯ > −ωn
2
, and
corresponding eigenvectors by v ⃗ , v ⃗ , … , v ⃗ . If A is invertible (that is, if ω > 0 ), then
1 2 n 1
i=1
x⃗(t) = v1
⃗ (a1 + b1 t) + ∑ vi⃗ (ai cos(ωi t) + bi sin(ωi t)). (3.6.13)
i=2
We use this solution and the setup from the introduction of this section even when some of the masses and springs are missing. For
example, when there are only 2 masses and only 2 springs, simply take only the equations for the two masses and set all the spring
constants for the springs that are missing to zero.
Example 3.6.1:
Suppose we have the system in Figure 3.12, with m 1 = 2, m2 = 1, k1 = 4, and k 2 = 2.
or
′′ −3 1
x⃗ = [ ] x⃗. (3.6.15)
2 −2
respectively (exercise).
We check the theorem and note that ω 1 = 1 and ω 2 = 2 . Hence the general solution is
1 1
x⃗ = [ ] (a1 cos(t) + b1 sin(t)) + [ ] (a2 cos(2t) + b2 sin(2t)). (3.6.16)
2 −1
The two terms in the solution represent the two so-called natural or normal modes of oscillation. And the two (angular) frequencies
are the natural frequencies. The two modes are plotted in Figure 3.13.
PIC
PIC
Figure 3.13: The two modes of the mass-spring system. In the left plot the masses are moving in unison and in the right plot are
masses moving in the opposite direction.
Let us write the solution as
1 1
x⃗ = [ ] c1 cos(t − α1 ) + [ ] c2 cos(2t − α2 ). (3.6.17)
2 −1
corresponds to the mode where the masses move synchronously in the same direction.
The second term,
1 c2 cos(2t − α2 )
[ ] c2 cos(2t − α2 ) = [ ], (3.6.19)
−1 −c2 cos(2t − α2 )
corresponds to the mode where the masses move synchronously but in opposite directions.
The general solution is a combination of the two modes. That is, the initial conditions determine the amplitude and phase shift of
each mode.
Example 3.6.2:
We have two toy rail cars. Car 1 of mass 2 kg is traveling at 3 m/s towards the second rail car of mass 1 kg. There is a bumper on the
second rail car that engages at the moment the cars hit (it connects to two cars) and does not let go. The bumper acts like a spring of
spring constant k = 2 N/m. The second car is 10 meters from a wall. See Figure 3.14.
the position at t = 0 , and let x be the displacement of the second car from its original location. Then the time when x (t) = 10
2 2
is exactly the time when impact with wall occurs. For this t, x (t) is the speed at impact. This system acts just like the system of
′
2
2 0 ′′ −2 2
[ ] x⃗ = [ ] x⃗. (3.6.20)
0 1 2 −2
or
′′ −1 1
x⃗ = [ ] x⃗. (3.6.21)
2 −2
1 1 – –
x⃗ = [ ] (a1 + b1 t) + [ ] (a2 cos(√3t) + b2 sin(√3t)) (3.6.22)
1 −2
– –
a1 + b1 t + a2 cos(√3t) + b2 sin(√3t)
= [ – – ]
a1 + b1 t − 2 a2 cos(√3t) − 2 b2 sin(√3t)
We now apply the initial conditions. First the cars start at position 0 so x (0) = 0 and x 1 2 (0) = 0 . The first car is traveling at 3m/s,
so x (0) = 3 and the second car starts at rest, so x (0) = 0 . The first conditions says
′
1
′
2
a1 + a2
⃗
0 = x⃗(0) = [ ]. (3.6.23)
a1 − 2 a2
It is not hard to see that a 1 = a2 = 0 . We set a 1 = 0 and a 2 = 0 in x⃗(t) and differentiate to get
– –
′ b1 + √3b2 cos(√3t)
x⃗ (t) = [ – – ]. (3.6.24)
b1 − 2 √3b2 cos(√3t)
So
–
3 ′ b1 + √3b2
[ ] = x⃗ (0) = [ – ]. (3.6.25)
0 b1 − 2 √3b2
1 –
⎡ 2t + sin(√3t) ⎤
√3
x⃗ = . (3.6.26)
2 –
⎣ 2t − sin(√3t) ⎦
√3
Note how the presence of the zero eigenvalue resulted in a term containing t. This means that the carts will be traveling in the
positive direction as time grows, which is what we expect.
–
What we are really interested in is the second expression, the one for x2 . We have x2 (t) = 2t −
2
√3
sin(√3t) . See Figure 3.15
for the plot of x versus time.
2
Figure 3.15: Position of the second car in time (ignoring the wall).
Just from the graph we can see that time of impact will be a little more than 5 seconds from time zero. For this we have to solve the
–
equation 10 = x (t) = 2t − 2 sin(√3t) . Using a computer (or even a graphing calculator) we find that t
2
≈ 5.22 impact
√3
seconds.
–
As for the speed we note that x
′
2
= 2 − 2 cos(√3t) . At time of impact (5.22 seconds from t = 0 ) we get that
) ≈ 3.85 .
′
x (t impact
2
–
The maximum speed is the maximum of 2 − 2 cos(√3t) , which is 4. We are traveling at almost the maximum speed when we hit
the wall.
Suppose that Bob is a tiny person sitting on car 2. Bob has a Martini in his hand and would like not to spill it. Let us suppose Bob
would not spill his Martini when the first car links up with car 2, but if car 2 hits the wall at any speed greater than zero, Bob will
spill his drink. Suppose Bob can move car 2 a few meters towards or away from the wall (he cannot go all the way to the wall, nor
can he get out of the way of the first car). Is there a “safe” distance for him to be at? A distance such that the impact with the wall is
at zero speed?
√3
4π
√3
Alternatively Bob could move away from the wall towards the incoming car 2 where another safe distance is 8π
≈ 14.51 and so
√3
That is, we are adding periodic forcing to the system in the direction of the vector F .⃗
As before, this system just requires us to find one particular solution x⃗ , add it to the general solution of the associated homogeneous
p
′′
system x⃗ , and we will have the general solution to (3.6.27). Let us suppose that ω is not one of the natural frequencies of x⃗ = Ax⃗ ,
c
where c ⃗ is an unknown constant vector. Note that we do not need to use sine since there are only second derivatives. We solve for c ⃗ to
find x⃗ . This is really just the method of undetermined coefficients for systems. Let us differentiate x⃗ twice to get
p p
′′ 2
x⃗ = −ω c ⃗ cos(ωt). (3.6.29)
p
′′
Plug x⃗ and x⃗ into the equation:
p p
2 ⃗
−ω c ⃗ cos(ωt) = Ac ⃗ cos(ωt) + F cos(ωt). (3.6.30)
So
2 −1 ⃗
c ⃗ = (A + ω I ) (−F ). (3.6.32)
Of course this is possible only if (A + ω I ) = (A − (−ω )I ) is invertible. That matrix is invertible if and only if
2 2
−ω
2
is not an
eigenvalue of A . That is true if and only if ω is not a natural frequency of the system.
Example 3.6.3:
Let us take the example in Figure 3.12 with the same parameters as before: m 1 = 2, m2 = 1, k1 = 4, and k 2 = 2 . Now suppose
that there is a force 2 cos(3t) acting on the second cart.
The equation is
′′ −3 1 0
x⃗ = [ ] x⃗ + [ ] cos(3t). (3.6.33)
2 −2 2
We solved the associated homogeneous equation before and found the complementary solution to be
1 1
x⃗c = [ ] (a1 cos(t) + b1 sin(t)) + [ ] (a2 cos(2t) + b2 sin(2t)). (3.6.34)
2 −1
The natural frequencies are 1 and 2. Hence as 3 is not a natural frequency, we can try c ⃗ cos(3t). We invert (A + 3 2
I) :
−1 −1 7 −1
−3 1 2
6 1 40 40
([ ] + 3 I) = [ ] = [ ]. (3.6.35)
−1 3
2 −2 2 7
20 20
Hence,
2 −1 40 40 0 20
⃗
c ⃗ = (A + ω I ) (−F ) = [ ][ ] = [ ]. (3.6.36)
−1 3 −3
−2
20 20 10
Combining with what we know the general solution of the associated homogeneous problem to be, we get that the general solution
′′
to x⃗ ⃗
= Ax⃗ + F cos(ωt) is
1
1 1 20
x⃗ = x⃗c + x⃗p = [ ] (a1 cos(t) + b1 sin(t)) + [ ] (a2 cos(2t) + b2 sin(2t)) + [ ] cos(3t). (3.6.37)
−3
2 −1
10
The constants a 1, a2 , b1 , and b must then be solved for given any initial conditions.
2
If ω is a natural frequency of the system resonance occurs because we will have to try a particular solution of the form
⃗
x⃗p = c t
⃗ sin(ωt) + d t cos(ωt). (3.6.38)
That is assuming that the eigenvalues of the coefficient matrix are distinct. Next, note that the amplitude of this solution grows
without bound as t grows.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
practice is an approximation to reality anyway, it is not indispensable to know how to solve these corner cases. It may happen on
occasion that it is easier or desirable to solve such a system directly.
3.7.1 GEOMETRIC MULTIPLICITY
Take the diagonal matrix
3 0
A = [ ] (3.7.1)
0 3
A has an eigenvalue 3 of multiplicity 2. We call the multiplicity of the eigenvalue in the characteristic equation the algebraic
1 0
multiplicity. In this case, there also exist 2 linearly independent eigenvectors, [ ] and [ ] corresponding to the eigenvalue 3. This
0 1
Let us restate the theorem about real eigenvalues. In the following theorem we will repeat eigenvalues according to (algebraic)
multiplicity. So for the above matrix A , we would say that it has eigenvalues 3 and 3.
Theorem 3.7.1. Take x⃗ = P x⃗ . Suppose the matrix P is n × n , has n real eigenvalues (not necessarily distinct), λ1 , ⋯ , λn and there
→ →
are n linearly independent corresponding eigenvectors v 1 , ⋯ , vn . Then the general solution to the ODE can be written as:
→ λ t → λ t → λ t
x⃗ = c1 v1 e
1 2 n
+ c2 v2 e + ⋅ + cn vn e (3.7.3)
The geometric multiplicity of an eigenvalue of algebraic multiplicity n is equal to the number of corresponding linearly independent
eigenvectors. The geometric multiplicity is always less than or equal to the algebraic multiplicity. We have handled the case when these
two multiplicities are equal. If the geometric multiplicity is equal to the algebraic multiplicity, then we say the eigenvalue is complete.
In other words, the hypothesis of the theorem could be stated as saying that if all the eigenvalues of P are complete, then there are n
linearly independent eigenvectors and thus we have the given general solution.
If the geometric multiplicity of an eigenvalue is 2 or greater, then the set of linearly independent eigenvectors is not unique up to
3 0 1 1
multiples as it was before. For example, for the diagonal matrix A = [ ] we could also pick eigenvectors [ ] and [ , or
]
0 3 1 −1
in fact any pair of two linearly independent vectors. The number of linearly independent eigenvectors corresponding to λ is the number
of free variables we obtain when solving Av ⃗ = λv ⃗ . We pick specific values for those free variables to obtain eigenvectors. If you pick
different values, you may get different eigenvectors.
Example 3.7.1
The matrix
3 1
[ ] (3.7.4)
0 3
Solution
v1
We must have that v 2 = 0 . Hence any eigenvector is of the form [ ] . Any two such vectors are linearly dependent, and hence
0
the geometric multiplicity of the eigenvalue is 1. Therefore, the defect is 1, and we can no longer apply the eigenvalue method
directly to a system of ODEs with such a coefficient matrix.
The key observation we will use here is that if λ is an eigenvalue of A of algebraic multiplicity m , then we will be able to find m
⃗
linearly independent vectors solving the equation (A − λI ) m
v⃗ = 0 . We will call these generalized eigenvectors.
3 1
Let us continue with the example A = [ ] and the equation x⃗ = Ax⃗ . We have an eigenvalue λ = 3 of (algebraic)
0 3
→ 1
multiplicity 2 and defect 1. We have found one eigenvector v 1 = [ ] . We have the solution
0
→ → 3t
x1 = v1 e (3.7.6)
In this case, let us try (in the spirit of repeated roots of the characteristic equation for a single equation) another solution of the form
→ → → 3t
x2 = ( v2 + v1 t)e (3.7.7)
We differentiate to get
→ →′ → →′ → 3t → → → → →
As we are assuming that x is a solution, x must equal Ax , and x
2 2 2 2 = v1 e + 3( v2 + v1 t)e
3t
= (3 v2 + v1 )e
3t
+ 3 v1 t e
3t
→ → → 3t
→ 3t → 3t
Ax2 = A( v2 + v1 t)e = A v2 e + A v1 t e (3.7.8)
→ → → → →
By looking at the coefficients of e and te we see 3t 3t
3 v2 + v1 = A v2 and 3 v1 = A v1 . This means that
→ → →
⃗
(A − 3I ) v2 = v1 and (A − 3I ) v1 = 0 (3.7.9)
→ →
Therefore, x is a solution if these two equations are satisfied. We know the second of these two equations is satisfied as
2 v1 is an
eigenvector. If we plug the first equation into the second we obtain
→ 2→
⃗ ⃗
(A − 3I )(A − 3I ) v2 = 0 or (A − 3I ) v2 = 0 (3.7.10)
→ → → →
If we can, therefore, find a v that solves (A − 3I ) v = 0⃗ and such that
2
2
2 (A − 3I ) v2 = v1 , then we are done. This is just a
bunch of linear equations to solve and we are by now very good at that.
→ →
We notice that in this simple case (A − 3I )
2
is just the zero matrix (exercise). Hence, any vector v2 solves 2
(A − 3I ) v2 = 0
⃗
.
→ →
We just have to make sure that (A − 3I ) v 2 = v1 . Write
0 1 a 1
[ ][ ] = [ ] (3.7.11)
0 0 b 0
→ 0
By inspection we see that letting α = 0 (α could be anything in fact) and b = 1 does the job. Hence we can take v2 = [ ] . Our
1
′
general solution to x⃗ = Ax⃗ is
3t 3t
1 0 1 c1 e + c2 t e
3t 3t
x⃗ = c1 [ ]e + c2 ([ ]+[ ] t)e = [ ]
3t
0 1 0 c2 e
→′
Let us check that we really do have the solution. First x1 = c1 3 e
3t 3t
+ c2 e 3 c2 t e
3t
= 3 x1 + x2 . Good. Now
→′
x2 = 3 c2 e
3t
= 3 x2 . Good.
′
Note that the system x⃗ = Ax⃗ has a simpler solution since A is a so-called upper triangular matrix, that is every entry below the
diagonal is zero. In particular, the equation for x does not depend on x . Mind you, not every defective matrix is triangular.
2 1
above.
→
Let us describe the general algorithm. Suppose that λ is an eigenvalue of multiplicity 2, defect 1. First find an eigenvector v1 of λ.
→
Then, find a vector v2 such that
→
2 ⃗
(A − λI ) v2 = 0 (3.7.12)
→ →
(A − λI ) v2 = v1
⃗ → → (
( x2 ) = ( v2 + v1 t)e λt)
This machinery can also be generalized to higher multiplicities and higher defects. We will not go over this method in detail, but let us
just sketch the ideas. Suppose that A has an eigenvalue λ of multiplicity m. We find vectors such that
k ⃗ ⃗ k−1 ⃗
(A − λI ) ( v) = ( 0) but (A − λI ) v⃗ ≠ 0 (3.7.14)
Such vectors are called generalized eigenvectors. For every eigenvector v⃗1 we find a chain of generalized eigenvectors v⃗2 through
vecv such that:
k
→
⃗
(A − λI ) v1 = 0, (3.7.15)
→ →
(A − λI ) v2 = v1 ,
⋮
→ →
(A − λI ) vk = vk−1 .
→ → → λt
x2 = ( v2 + v1 t)e (3.7.17)
⋮ (3.7.18)
2 k−2 k−1
→ → t t t λt
⃗
xk = ( vk + vk−1 ⃗
t + vk−2 ⃗
+ ⋯ + v2 ⃗
+ v1 )e ) (3.7.19)
2 (k − 2)! (k − 1)!
Recall that k! = 1 ⋅ 2 ⋅ 3 ⋯ (k − 1) ⋅ k is the factorial. We proceed to find chains until we form m linearly independent solutions (
m is the multiplicity). You may need to find several chains for every eigenvalue.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
as usual. Now suppose that this was one equation (P is a number or a 1 × 1 matrix). Then the solution to this would be
Pt
x⃗ = e . (3.8.2)
It turns out the same computation works for matrices when we define e Pt
properly. First let us write down the Taylor series for e for some number a. at
2 3 4 ∞ k
(at) (at) (at) (at)
at
e = 1 + at + + + +⋯ = ∑ (3.8.3)
2 6 24 k!
k=0
Maybe we can try the same trick with matrices. Suppose that for an n × n matrix A we define the matrix exponential as
1 1 1
A 2 3 k
e = I+A+ A + A +⋯+ A +⋯ (3.8.5)
2 6 k!
Let us not worry about convergence. The series really does always converge. We usually write Pt as tP by convention when P is a matrix. With this
small change and by the exact same calculation as above we have that
d tP tP
(e ) = Pe . (3.8.6)
dt
Now P and hence e is an n × n matrix. What we are looking for is a vector. We note that in the
tP
1 ×1 case we would at this point multiply by an
arbitrary constant to get the general solution. In the matrix case we multiply by a column vector c ⃗.
Theorem 3.8.1. Let P be an n × n matrix. Then the general solution to x⃗ is
′
= P x⃗
tP
x⃗ = e c ,⃗ (3.8.7)
Hence e is the fundamental matrix solution of the homogeneous system. If we find a way to compute the matrix exponential, we will have another
tP
′
method of solving constant coefficient homogeneous systems. It also makes it easy to solve for initial conditions. To solve x⃗ = Ax⃗ , x⃗(0) = b ⃗ we take
the solution
tA ⃗
x⃗ = e b (3.8.9)
AB = BA , that is, if A and B commute, then e . We will find this fact useful. Let us restate this as a theorem to make a point.
A+B A B
= e e
k
k
a 0
D = [ ] (3.8.10)
k
0 b
and
2 3 a
1 1 1 0 a 0 1 a 0 1 a 0 e 0
D 2 3
e = I+D+ D + D +⋯ = [ ]+[ ]+ [ ]+ [ ]+⋯ = [ ] (3.8.11)
2 3 b
2 6 0 1 0 b 2 0 b 6 0 b 0 e
5 4
This makes exponentials of certain other matrices easy to compute. Notice for example that the matrix A = [ ] can be written as 3I + B where
−1 1
2 4 0 0
B = [ ] . Notice that 2
B = [ ] . So B
k
= 0 for all k ≥ 2 . Therefore, e
B
= I+B . Suppose we actually want to compute e
tB
. The
−1 −2 0 0
2
matrices 3tI and tB commute (exercise: check this) and e tB
= I + tB , since (tB) = t B
2 2
= 0 . We write
3t
tA 3tI+tB 3tI tB
e 0
e = e = e e = [ ] (I + tB) (3.8.13)
3t
0 e
3t 3t 3t
e 0 1 + 2t 4t (1 + 2t) e 4te
= [ ][ ] = [ ]
3t 3t 3t
0 e −t 1 − 2t −te (1 − 2t) e
So we have found the fundamental matrix solution for the system x⃗ = Ax⃗ . Note that this matrix has a repeated eigenvalue with a defect; there is only
′
one eigenvector for the eigenvalue 3. So we have found a perhaps easier way to handle this case. In fact, if a matrix A is 2 × 2 and has an eigenvalue λ
of multiplicity 2, then either A is diagonal, or A = λI + B where B = 0 . This is a good exercise. 2
Exercise 3.8.1:
Suppose that A is 2 × 2 and λ is the only eigenvalue. Then show that (A − λI) = 0 . Then we can write A = λI + B , where B = 0 . Hint:
2 2
First write down what does it mean for the eigenvalue to be of multiplicity 2. You will get an equation for the entries. Now compute the square of B.
Matrices B such that B = 0 for some K are called nilpotent. Computation of the matrix exponential for nilpotent matrices is easy by just writing down
k
This can be seen by writing down the Taylor series. First note that
2
−1 −1 −1 −1 2 −1
(BAB ) = BAB BAB = BAIAB = BA B (3.8.15)
k −1
BAB
−1
−1
1 −1 2 1 −1 3
e = I + BAB + (BAB ) + (BAB ) +⋯ (3.8.16)
2 6
1 1
−1 −1 2 −1 3 −1
= BB + BAB + BA B + BA B +⋯
2 6
1 2
1 3 −1
= B (I + A + A + A + ⋯) B
2 6
A −1
= Be B .
Given a square matrix A , we can sometimes write A = EDE , where D is diagonal and E invertible. This procedure is called diagonalization. If we
−1
can do that, the computation of the exponential becomes easy. Adding t into the mix we see that we can then easily compute the exponential
tA tD −1
e = Ee E . (3.8.17)
To diagonalize A we will need n linearly independent eigenvectors of A . Otherwise this method of computing the exponential does not work and we
need to be trickier, but we will not get into such details. We let E be the matrix with the eigenvectors as columns. Let λ , ⋯ , λ be the eigenvalues 1 n
and let v ⃗ , ⋯ , v ⃗ be the eigenvectors, then E = [ v ⃗ v ⃗ ⋯ v ⃗ ] . Let D be the diagonal matrix with the eigenvalues on the main diagonal. That is
1 n 1 2 n
λ1 0 ⋯ 0
⎡ ⎤
⎢ 0 λ2 ⋯ 0 ⎥
⎢ ⎥
D = ⎢ ⎥ (3.8.18)
⎢ ⎥
⎢ ⋮ ⋮ ⋱ ⋮ ⎥
⎣ ⎦
0 0 ⋯ λ
We compute
= [ Av1
⃗ ⃗
Av2 ⋯ ⃗ ]
Av3
= [ λ1 v1
⃗ ⃗
λ2 v2 ⋯ ⃗ ]
λn vn
= [ v1
⃗ ⃗
v2 ⋯ ⃗ ]D
vn
= ED.
The columns of E are linearly independent as these are linearly independent eigenvectors of A . Hence E is invertible. Since AE = ED , we right
multiply by E and we get
−1
−1
A = EDE . (3.8.20)
⎣ λn t ⎦
0 0 ⋯ e
The formula (3.8.21), therefore, gives the formula for computing the fundamental matrix solution for the system , in the case where we
tA ′
e x⃗ = Ax⃗
to apply Euler’s formula to simplify the result. If simplified properly the final matrix will not have any complex numbers in it.
Example 3.8.1:
Compute the fundamental matrix solution using the matrix exponentials for the system
′
x 1 2 x
[ ] = [ ][ ]. (3.8.22)
y 2 1 y
Then compute the particular solution for the initial conditions x(0) = 4 and y(0) = 2 .
1 2 1
Let A be the coefficient matrix [ ] . We first compute (exercise) that the eigenvalues are 3 and -1 and corresponding eigenvectors are [ ] and
2 1 1
1
[ ]. Hence we write
−1
3t −1
tA
1 1 e 0 1 1
e = [ ][ ][ ] (3.8.23)
−t
1 −1 0 e 1 −1
3t
1 1 e 0 −1 −1 −1
= [ ][ ] [ ] (3.8.24)
−t
1 −1 0 e 2 −1 1
3t −t
−1 e e −1 −1
= [ ][ ] (3.8.25)
3t −t
2 e −e −1 1
3t −t 3t −t
−1 −e −e −e +e
= [ ] (3.8.26)
3t −t 3t −t
2 −e +e −e −e
3t −t 3t −t
e +e e −e
2 2
= [ 3t −t 3t −t
] (3.8.27)
e −e e +e
2 2
The initial conditions are x(0) = 4 and y(0) = 2 . Hence, by the property that e
0A
= I we find that the particular solution we are looking for is
4
e
tA
b
⃗
where b is [
⃗
] . Then the particular solution we are looking for is
2
3t −t 3t −t
e +e e −e
3t −t 3t −t 3t −t
x ⎡ ⎤ 4 2e + 2e +e −e 3e +e
2 2
[ ] = [ ] = [ ] = [ ] (3.8.28)
3t −t 3t −t
e −e e +e 3t −t 3t −t 3t −t
y ⎣ ⎦ 2 2e − 2e +e +e 3e −e
2 2
fundamental matrix solution of a system of ODEs is not unique. The exponential is the fundamental matrix solution with the property that for t = 0 we
get the identity matrix. So we must find the right fundamental matrix solution. Let X be any fundamental matrix solution to x⃗ = Ax⃗ . Then we claim
′
tA −1
e = X(t)[X(0)] . (3.8.29)
matrix and we still get a fundamental matrix solution. All we are doing is changing what the arbitrary constants are in the general solution
x⃗(t) = X(t)c ⃗ .
3.8.5 APPROXIMATIONS
If you think about it, the computation of any fundamental matrix solution X using the eigenvalue method is just as difficult as the computation of e . tA
So perhaps we did not gain much by this new tool. However, the Taylor series expansion actually gives us a very easy way to approximate solutions,
which the eigenvalue method did not.
The simplest thing we can do is to just compute the series up to a certain number of terms. There are better ways to approximate the exponential1. In
many cases however, few terms of the Taylor series give a reasonable approximation for the exponential and may suffice for the application. For
example
1 2
Compute the first 4 terms of the series for the matrix . A = [ ]
2 1
5 13 7 5 2 13 3 2 7 3
2 2 1 +t+ t + t 2t + 2 t + t
t 1 2 2 6 3 2 6 3
tA 2 2 3
e ≈ I + tA + A = I+t[ ]+t [ ] +t [ ] = [ ] (3.8.30)
5 7 13 2 7 3 5 2 13 3
2 2 1 2 2t + 2 t + t 1 +t+ t + t
2 3 6 3 2 6
Just like the scalar version of the Taylor series approximation, the approximation will be better for small t and worse for larger t. For larger t, we will
generally have to compute more terms. Let us see how we stack up against the real solution with t = 0.1 . The approximate solution is approximately
(rounded to 8 decimal places)
2 3
0.1 0.1 1.12716667 0.22233333
0.1A 3
e ≈ I + 0.1A + + A = [ ] (3.8.31)
2 6 0.22233333 1.12716667
And plugging t = 0.1 into the real solution (rounded to 8 decimal places) we get
0.1A
1.12734811 0.22251069
e = [ ] (3.8.32)
0.22251069 1.12734811
Not bad at all! Although if we take the same approximation for t = 1 we get
1 2
1 3
6.66666667 6.33333333
I+A+ A + A = [ ] (3.8.33)
2 6 6.33333333 6.66666667
A
10.22670818 9.85882874
e = [ ] (3.8.34)
9.85882874 10.22670818
So the approximation is not very good once we get up to t = 1 . To get a good approximation at t = 1 (say up to 2 decimal places) we would need to
go up to the 11 power (exercise).
th
1
C. Moler and C.F. Van Loan, Nineteen Dubious Ways to Compute the Exponential of a Matrix, Twenty-Five Years Later, SIAM Review 45 (1), 2003,
3–49
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
where A is a constant matrix. The first method we will look at is the integrating factor method. For simplicity we rewrite the equation
as
′
⃗
x⃗ (t) + P x⃗(t) = f (t), (3.9.2)
We notice that P e tP tP
= e P . This fact follows by writing down the series definition of e , tP
tP
1 2
Pe = P (I + I + tP + (tP ) + ⋯) (3.9.4)
2
1 1
2 2 3 2 tP
= P + tP + t P + ⋯ = (I + I + tP + (tP ) + ⋯) P = P e (3.9.5)
2 2
dx
(e
tP
) = Pe
tP
. Hence,
d
tP tP ⃗
(e x⃗(t)) = e f (t). (3.9.6)
dt
We can now integrate. That is, we integrate each component of the vector separately
tP tP ⃗
e x⃗(t) = ∫ e f (t)dt + c .⃗ (3.9.7)
−1
Recall from Exercise 3.8.7 that (e tP
) = e
−tP
. Therefore, we obtain
−tP tP ⃗ −tP
x⃗(t) = e ∫ e f (t)dt + e c .⃗ (3.9.8)
Perhaps it is better understood as a definite integral. In this case it will be easy to also solve for the initial conditions as well. Suppose
we have the equation with initial conditions
′
⃗ ⃗
x⃗ (t) + P x⃗(t) = f (t), x⃗(0) = b. (3.9.9)
Example 3.9.1:
Suppose that we have the system
′
x + 3 x1 − x2 = 0,
2
5 −3
We have previously computed e tP
for P = [ ] . We immediately have e −tP
, simply by negating t.
3 −1
2t 2t −2t −2t
tP
(1 + 3t) e −3te −tP
(1 − 3t) e 3te
e = [ ], e = [ ]. (3.9.14)
2t 2t −2t −2t
3te (1 − 3t) e −3te (1 + 3t) e
t 3s
(1 + 3s) e
= ∫ [ ] ds
3s
0 3se
3t
te
= [ 3t ].
(3t−1) e +1
Then
t
−tP sP ⃗ −tP ⃗
x⃗(t) = e ∫ e f (s)ds + e b
0
3t
−2t −2t te −2t −2t
(1 − 3t)e 3te (1 − 3t)e 3te 1
= [ ][ 3t ] +[ ][ ]
−2t −2t (3t−1) e +1 −2t −2t
−3te (1 + 3t)e −3te (1 + 3t)e 0
3
−2t −2t
te (1 − 3t)e
= [ t ] +[ ]
−e 1 −2t −2t
+( + t) e −3te
3 3
−2t
(1 − 2t)e
= [ t ].
−e 1 −2t
+( − 2t) e
3 3
Similarly (exercise) x ′
2
+ 3 x1 − x2 = 0 . The initial conditions are also satisfied as well (exercise).
For systems, the integrating factor method only works if P does not depend on t, that is, P is constant. The problem is that in general
d
∫ P (t)dt ∫ P (t)dt
[e ] ≠ P (t)e , (3.9.17)
dt
EIGENVECTOR DECOMPOSITION
For the next method, we note that eigenvectors of a matrix give the directions in which the matrix acts like a scalar. If we solve our
system along these directions these solutions would be simpler as we can treat the matrix as a scalar. We can put those solutions
together to get the general solution.
Take the equation
′ ⃗
x⃗ (t) = Ax⃗(t) + f (t) (3.9.18)
ξn we have our solution x⃗. Let us decompose f ⃗ in terms of the eigenvectors as well. Write
→ → →
⃗
f (t) = v1 g1 (t) + v2 g2 t + ⋯ + vn gn (t) (3.9.20)
That is, we wish to find g1 through gn that satisfy (3.9.20). We note that since all the eigenvectors are independent, the matrix
→ → →
E = [ v
1 v2 ⋯ vn ] is invertible. We see that (3.9.20) can be written as f ⃗ = E g ⃗ , where the components of g are
⃗ the functions
⃗
g1 through g . Then g ⃗ = E
n
−1
f . Hence it is always possible to find g ⃗ when there are n linearly independent eigenvectors.
We plug (3.9.19) into (3.9.18), and note that Av ⃗ k
⃗
= λk vk .
′ → → →
′ ′ ′
x⃗ = v1 ξ + v2 ξ + ⋯ + vn ξn (3.9.21)
1 2
→ → → → → →
= A ( v1 ξ1 + v2 ξ2 + ⋯ + vn ξn ) + v1 g1 + v2 g2 + ⋯ + vn gn
→ → → → → →
= A v1 ξ1 + A v2 ξ2 + ⋯ + Avn ξn + v1 g1 + v2 g2 + ⋯ + vn gn
→ → → → → →
= v1 λ1 ξ1 + v2 λ2 ξ2 + ⋯ + vn λn ξn + v1 g1 + v2 g2 + ⋯ + vn gn
→ → →
= v1 (λ1 ξ1 + g1 ) + v2 (λ2 ξ2 + g2 ) + ⋯ + vn (λn ξn + gn ) .
′
ξ = λ1 ξ1 + g1 , (3.9.22)
1
′
ξ = λ2 ξ2 + g2 , (3.9.23)
2
⋮ (3.9.24)
′
ξn = λn ξn + gn . (3.9.25)
Each one of these equations is independent of the others. They are all linear first order equations and can easily be solved by the
standard integrating factor method for single equations. That is, for example for the k equation we write th
′
ξ (t) − λk ξk (t) = gk (t).
k
λk t −λk t λk t
ξk (t) = e ∫ e gk (t)dt + Ck e . (3.9.27)
Again, as always, it is perhaps better to write these integrals as definite integrals. Suppose that we have an initial condition x⃗(0) = b ⃗ .
→ →
We take c ⃗ = E −1
b
⃗
and note b ⃗ = v 1 a1 + ⋯ + vn an , just like before. Then if we write
t
λk (t) −λk s λk t
ξk (t) = e ∫ e gk (s)dt + ak e , (3.9.28)
0
Example 3.9.2:
3
t
1 3 2e 16
Let A = [ ] . Solve λ⃗ = Aλ⃗ + f ⃗ where f (t)
⃗
= [ ] for x⃗(0) = [ −5
] .
3 1 2t
16
1 1
The eigenvalues of A are −2 and 4 and corresponding eigenvectors are [ ] and [ ] respectively. This calculation is left as an
−1 1
exercise. We write down the matrix E of the eigenvectors and compute its inverse (using the inverse formula for 2 × 2 matrices)
1 1 −1
1 1 −1
E = [ ], E = [ ]. (3.9.29)
−1 1 2 1 1
t t t
g1 −1
2e 1 1 −1 2e e −t
[ ] = E [ ] = [ ][ ] = [ ]. (3.9.30)
t
g2 2t 2 1 1 2t e +t
So g 1
t
= e −t and g 2 = e +t
t
.
3
1 1
We further want to write x⃗(0) in terms of the eigenvectors. That is, we wish to write x⃗(0) = [
16
−5
] = [ ] a1 + [ ] a2 .
−1 1
16
Hence
3 1
a1 −1 16 4
[ ] = E [ ] = [ ]. (3.9.31)
−5 −1
a2
16 16
−1
So a 1 =
1
4
and a 2 =
16
. We plug our x⃗ into the equation and get that
1 1 1 1 1 1
′ ′
[ ]ξ +[ ]ξ = A[ ] ξ1 + A [ ] ξ2 + [ ] g1 + [ ] g2 (3.9.32)
1 2
−1 1 −1 1 −1 1
1 1 1 t
1 t
= [ ] (−2 ξ1 ) + [ ] 4 ξ2 + [ ] (e − t) + [ ] (e − t).
−1 1 −1 1
4
,
−1
ξ
′
2
= 4 ξ2 + e + t,
t
where ξ 2 (0) = a2 =
16
.
We solve with integrating factor. Computation of the integral is left as an exercise to the student. Note that we will need integration
by parts.
t
−2t 2t t −2t e t 1 −2t
ξ1 = e ∫ e (e − t) dt + C1 e = − + + C1 e .
3 2 4
4
, then 1
4
=
1
3
+
1
4
+ C1 and hence C 1 =
−1
3
. Similarly
t
4t −4t t 4t
e t 1 4t
ξ2 = e ∫ e (e + t) dt + C2 e = − − − + C2 e . (3.9.33)
3 4 16
As ξ 2 (0) =
16
1
we have that −1
16
=
−1
3
−
16
1
+ C2 and hence C 2 =
1
3
. The solution is
4t −2t
e −e 3−12t
t −2t 4t t +
1 e −e 1 − 2t 1 e −e 4t + 1 ⎡ ⎤
3 16
x⃗(t) = [ ]( + ) +[ ]( − ) = −2t 4t t
. (3.9.34)
3 4 3 16 e +e +2 e 4t−5
−1 1 ⎣ + ⎦
3 16
4t −2t −2t 4t t
e −e 3−12t e +e +2 e 4t−5
That is, x 1 =
3
+
16
and x 2 =
3
+
16
.
Exercise 3.9.1:
Check that x1 and x2 solve the problem. Check both that they satisfy the differential equation and that they satisfy the initial
conditions.
UNDETERMINED COEFFICIENTS
We also have the method of undetermined coefficients for systems. The only difference here is that we will have to take unknown
vectors rather than just numbers. Same caveats apply to undetermined coefficients for systems as for single equations. This method
does not always work. Furthermore if the right hand side is complicated, we will have to solve for lots of variables. Each element of an
unknown vector is an unknown number. So in system of 3 equations if we have say 4 unknown vectors (this would not be uncommon),
then we already have 12 unknown numbers that we need to solve for. The method can turn into a lot of tedious work. As this method is
essentially the same as it is for single equations, let us just do an example.
Example 3.9.3:
Note that we can solve this system in an easier way (can you see how?), but for the purposes of the example, let us use the
eigenvalue method plus undetermined coefficients.
1 0
The eigenvalues of A are −1 and 1 and corresponding eigenvectors are [ ] and [ ] respectively. Hence our complementary
1 1
solution is
1 −t
0 t
x⃗c = α1 [ ]e + α2 [ ]e , (3.9.35)
1 1
Here we find the crux of the difference for systems. We try both terms a⃗e
t
and ⃗
bt e
t
in the solution, not just the term ⃗
bt e
t
.
Therefore, we try
t ⃗ t ⃗
x⃗ = a⃗e + bt e + c t
⃗ +d. (3.9.37)
a1 b1 c1 d1
Thus we have 8 unknowns. We write a⃗ = [ ⃗
],b = [ ] , c⃗ = [ ], and d ⃗ = [ ]. We plug x⃗ into the equation. First let
a2 b2 c2 d2
′
us compute x⃗ .
⃗
′ a⃗1 + b1 b1 c1
⃗ ⃗ t t t t
x⃗ = (a⃗ + b)e + bt e + c ⃗ = [ ] e +[ ] te + [ ]. (3.9.38)
⃗ b2 c2
a⃗2 + b2
⃗ t ⃗ t ⃗ ⃗
Ax⃗ + f = Aa⃗e + Abt e + Ac t
⃗ + Ad + f = (3.9.39)
⃗ ⃗
−a⃗1 t
−b1 t
⃗
−c 1 −d 1 1 t
0
= [ ]e +[ ] te + [ ]t+[ ] +[ ]e +[ ] t.
−2 a⃗1 + a⃗2 ⃗ ⃗
−2 b1 + b2
⃗ + c2
−2 c 1 ⃗
−2 d
⃗
+d
⃗ 0 1
1 2
⃗
a⃗2 + b2 = −2 a⃗1 + a⃗2 ,
⃗ ⃗
b1 = −b1 ,
⃗ ⃗ ⃗
b2 = −2 b1 + b2 ,
⃗ ,
0 = −c 1
⃗ + c2
0 = −2 c 1 ⃗ + 1,
⃗ = −d ⃗
c1 1,
⃗ = −2 d ⃗ ⃗
c2 1 +d 2.
We could write the 8 × 9 augmented matrix and start row reduction, but it is easier to just solve the equations in an ad hoc manner.
Immediately we see that b = 0, c = 0, d = 0. Plugging these back in, we get that c = −1 and d = −1 . The remaining
1 1 1 2 2
a2 + b2 = −2 a1 + a2 .
That is, x1 =
1
2
t t
e , x2 = −t e − t − 1 . We would add this to the complementary solution to get the general solution of the
problem. Notice also that both a⃗e and t ⃗
bt e
t
were really needed.
Exercise 3.9.2:
Check that x and x solve the problem. Also try setting
1 2 a2 = 1 and again check these solutions. What is the difference between
the two solutions we can obtain in this way?
As you can see, other than the handling of conflicts, undetermined coefficients works exactly the same as it did for single equations.
However, the computations can get out of hand pretty quickly for systems. The equation we had done was very simple.
3.9.2 FIRST ORDER VARIABLE COEFFICIENT
Just as for a single equation, there is the method of variation of parameters. In fact for constant coefficient systems, this is essentially
the same thing as the integrating factor method we discussed earlier. However, this method will work for any linear system, even if it is
not constant coefficient, provided we can somehow solve the associated homogeneous problem.
Suppose we have the equation
′ ⃗
x⃗ = A(t)x⃗ + f (t). (3.9.43)
′
Further, suppose we have solved the associated homogeneous equation x⃗ = A(t)x⃗ and found the fundamental matrix solution X(t).
The general solution to the associated homogeneous equation is X(t)c ⃗ for a constant vector c ⃗. Just like for variation of parameters for
single equation we try the solution to the nonhomogeneous equation of the form
where u⃗(t) is a vector valued function instead of a constant. Now we substitute into (3.9.43) to obtain
′ ′ ′
⃗
x⃗p (t) = X (t)u⃗(t) + X(t)u⃗ (t) = A(t)X(t)u⃗(t) + f (t). (3.9.45)
′ ′
Hence X(t)u⃗ (t) = f (t)
⃗
. If we compute [X(t)] , then u⃗ (t) = [X(t)] −1 −1 ⃗
f (t) . We integrate to obtain u⃗ and we have the particular
solution x⃗ = X(t)u⃗(t) . Let us write this as a formula
p
−1 ⃗
x⃗p = X(t) ∫ [X(t)] f (t)dt. (3.9.47)
Example 3.9.4:
Find a particular solution to
′ 1 t −1 t 2
x⃗ = [ ] x⃗ + [ ] (t + 1). (3.9.48)
2
t +1 1 t 1
t −1 t −1
Here A = 2
1
[ ] is most definitely not constant. Perhaps by a lucky guess, we find that X = [ ] solves
t +1
1 t 1 t
′
X (t) = A(t)X(t) . Once we know the complementary solution we can easily find a solution to (3.9.48). First we find
−1
1 1 t
[X(t)] = [ ]. (3.9.49)
2
t +1 −t 1
1 −t 1 1 t t 2
= [ ]∫ [ ][ ] (t + 1)dt
2
t 1 t +1 −t 1 1
1 −t 2t
= [ ]∫ [ ] dt
2
t 1 −t +1
2
1 −t t
= [ ][ ]
1 3
t 1 − t +t
3
1 4
t
3
= [ ].
2 3
t +t
3
Adding the complementary solution we have that the general solution to (3.9.48).
1 4 1 4
1 −t c1 t c1 − c2 t + t
3 3
x⃗ = [ ][ ]+[ ] = [ ]. (3.9.51)
2 3 2 3
t 1 c2 t +t c2 + (c1 + 1)t + t +
3 3
Exercise 3.9.3:
Check that x 1 =
1
3
4
t and x
2 =
2
3
3
t +t really solve (3.9.48).
In the variation of parameters, just like in the integrating factor method we can obtain the general solution by adding in constants of
integration. That is, we will add X(t)c ⃗ for a vector of arbitrary constants. But that is precisely the complementary solution.
And again g ⃗ = E −1
F
⃗
.
Now we plug in and doing the same thing as before we obtain
′′
′′
x⃗ ⃗ ξ
= v1 ⃗ ξ ′′ + ⋯ vn
+ v2
′′
⃗ ξn (3.9.57)
1 2
⃗ ξ1 + v2
= A(v1 ⃗ ξ2 + ⋯ vn
⃗ ξn ) + v1
⃗ g1 + v2
⃗ g2 + ⋯ + vn
⃗ gn
⃗ ξ1 + Av2
= A v1 ⃗ ξ2 + ⋯ Avn
⃗ ξn + v1
⃗ g1 + v2
⃗ g2 + ⋯ + vn
⃗ gn
⃗ λ1 ξ1 + v2
= v1 ⃗ λ2 ξ2 + ⋯ vn
⃗ λn ξn + v1
⃗ g1 + v2
⃗ g2 + ⋯ + vn
⃗ gn
⃗ (λ1 ξ1 + g1 ) + v2
= v1 ⃗ (λ2 ξ2 + g2 ) + ⋯ + vn
⃗ (λn ξn + gn ).
′′
ξ = λ2 ξ2 + g2 ,
2
⋮
′′
ξn = λn ξn + gn .
Each one of these equations is independent of the others. We solve each equation using the methods of chapter 2. We write
x⃗(t) = v ⃗ ξ (t) + ⋯ + v ⃗ ξ (t) , and we are done; we have a particular solution. If we have found the general solution for ξ
1 1 n n 1
through ξ , then again x⃗(t) = v ⃗ ξ (t) + ⋯ + v ⃗ ξ (t) is the general solution (and not just a particular solution).
2 1 1 n n
Example 3.9.5:
Let us do the example from § 3.6 using this method. The equation is
′′ −3 1 0
x⃗ = [ ] x⃗ + [ ] cos(3t). (3.9.59)
2 −2 2
1 1 1 1 1 1
The eigenvalues were −1 and −4 , with eigenvectors [ ] and [ ] . Therefore E = [ ] and E
−1
=
1
3
[ ] .
2 −1 2 −1 2 −1
Therefore,
2
g1 1 1 1 0 cos(3t)
−1 ⃗ 3
[ ] = E F (t) = [ ][ ] = [ ]. (3.9.60)
−2
g2 3 2 −1 2 cos(3t) cos(3t)
3
So after the whole song and dance of plugging in, the equations we get are
2
′′
ξ = −ξ1 + cos(3t), (3.9.61)
1
3
2
′′
ξ = −4 ξ2 − cos(3t).
2
3
For each equation we use the method of undetermined coefficients. We try C1 cos(3t) for the first equation and C2 cos(3t) for
the second equation. We plug in to get
2
−9 C1 cos(3t) = −C1 cos(3t) + cos(3t), (3.9.62)
3
2
−9 C2 cos(3t) = −4 C2 cos(3t) − cos(3t).
3
−1
We solve each of these equations separately. We get −9 C1 = −C1 +
2
3
and −9 C 2 = −4 C2 −
2
3
. And hence C1 =
12
and
C2 =
2
12
. So our particular solution is
1
1 −1 1 2 20
x⃗ = [ ]( cos(3t)) + [ ]( cos(3t)) = [ ] cos(3t). (3.9.63)
−3
2 12 −1 15
10
CONTRIBUTORS
9 −2 −6
⎡ ⎤
Exercise 3.2.3: Compute determinant of ⎢ −8 3 6 ⎥ .
⎣ ⎦
10 −2 −6
1 2 3 1
⎡ ⎤
⎢4 0 5 0⎥
Exercise 3.2.4: Compute determinant of ⎢ ⎥ . Hint: Expand along the proper row or column to make the calculations
⎢6 0 7 0⎥
⎣ ⎦
8 0 10 1
simpler.
1 2 3
⎡ ⎤
Exercise 3.2.5: Compute inverse of ⎢ 1 1 1⎥ .
⎣ ⎦
0 1 0
1 2 3
⎡ ⎤
Exercise 3.2.6: For which h is ⎢ 4 5 6 ⎥ not invertible? Is there only one such h? Are there several? Infinitely many?
⎣ ⎦
7 8 h
h 1 1
⎡ ⎤
Exercise 3.2.7: For which h is ⎢ 0 h 0 ⎥ not invertible? Find all such h.
⎣ ⎦
1 1 h
9 −2 −6 1
⎡ ⎤ ⎡ ⎤
Exercise 3.2.8: Solve ⎢ −8 3 6 ⎥ x⃗ = ⎢ 2 ⎥ .
⎣ ⎦ ⎣ ⎦
10 −2 −6 3
5 3 7 2
⎡ ⎤ ⎡ ⎤
Exercise 3.2.9: Solve ⎢ 8 4 4 ⎥ x⃗ = ⎢ 0 ⎥ .
⎣ ⎦ ⎣ ⎦
6 3 3 0
3 2 3 0 2
⎡ ⎤ ⎡ ⎤
⎢3 3 3 3⎥ ⎢0⎥
Exercise 3.2.10: Solve ⎢ ⎥ x⃗ = ⎢ ⎥ .
⎢0 2 4 2 ⎥ ⎢4⎥
⎣ ⎦ ⎣ ⎦
2 3 4 3 1
1 t
Exercise 3.2.102: Find t such that [ ] is not invertible.
−1 2
1 1 10
Exercise 3.2.103: Solve [ ] x⃗ = [ ] .
1 −1 20
a 0 0
⎡ ⎤
a 0
Exercise 3.2.104: Suppose a, b, c are nonzero numbers. Let M = [ ],N = ⎢0 b 0⎥ . a) Compute M
−1
. b) Compute
0 b ⎣ ⎦
0 0 c
N
−1
.
1 1 1
⎡ ⎤ ⎡ ⎤ ⎡ ⎤
Exercise 3.3.4: Verify that ⎢ 1 ⎥ e and ⎢ −1 ⎥ e and ⎢ −1 ⎥ e
t t 2t
are linearly independent. Hint: You must be a bit more tricky than
⎣ ⎦ ⎣ ⎦ ⎣ ⎦
0 1 1
2t t
e e
Exercise 3.3.101: Are [ t
] and [ 2t
] linearly independent? Justify.
e e
t −t
cosh(t) e e
Exercise 3.3.102: Are [ ] [ , ] and [ ] linearly independent? Justify.
1 1 1
Exercise 3.4.6: a) Find the general solution of x = 2 x , x = 3 x using the eigenvalue method (first write the system in the form
′
1 1
′
2 2
′
x⃗ = Ax⃗ ). b) Solve the system by solving each equation separately and verify you get the same general solution.
⎣ ⎦
10 −2 −6
a b c
⎡ ⎤
Exercise 3.4.11: Let a, b, c, d, e, f be numbers. Find the eigenvalues of ⎢ 0 d e ⎥.
⎣ ⎦
0 0 f
1 0 3
⎡ ⎤
′
Exercise 3.4.101: a) Compute eigenvalues and eigenvectors of A = ⎢ −1 0 1⎥ . b) Solve the system x⃗ = Ax⃗ .
⎣ ⎦
2 0 2
1 1 ′
Exercise 3.4.102: a) Compute eigenvalues and eigenvectors of A = [ ]. b) Solve the system x⃗ = Ax⃗ .
−1 0
Exercise 3.5.101: Describe the behavior of the following systems without solving:
a. x ′
= x + y, y
′
= x −y
b. x ′
1
= x1 + x2 , x
′
2
= 2 x2
c. x ′
1
= −2 x2 , x
′
2
= 2 x1
d. x ′
= x + 3y, y
′
= −2x − 4y
e. x ′
= x − 4y, y
′
= −4x + y
Exercise 3.5.102: Suppose that x⃗ = Ax⃗ where A is a 2 × 2 matrix with eigenvalues 2 ± i . Describe the behavior.
′
x 0 1 x
Exercise 3.5.103: Take [ ] = [ ][ ] . Draw the vector field and describe the behavior. Is it one of the behaviours that we
y 0 0 y
′′ −3 1 0
x⃗ = [ ] x⃗ + [ ] cos(2t). (3.E.1)
2 −2 2
Exercise 3.6.4 (challenging): Let us take the example in Figure 3.12 with the same parameters as before: m = 2, k = 4, and 1 1
k = 2, except for m , which is unknown. Suppose that there is a force cos(5t) acting on the first mass. Find an m such that there
2 2 2
exists a particular solution where the first mass does not move.
Note: This idea is called dynamic damping. In practice there will be a small amount of damping and so any transient solution will
disappear and after long enough time, the first mass will always come to a stop.
Exercise 3.6.5: Let us take the Example 3.6.2, but that at time of impact, cart 2 is moving to the left at the speed of 3 m/s. a) Find the
behavior of the system after linkup. b) Will the second car hit the wall, or will it be moving away from the wall as time goes on? c) At
what speed would the first car have to be traveling for the system to essentially stay in place after linkup?
Exercise 3.6.6: Let us take the example in Figure 3.12 with parameters m = m = 1, k = k = 1 . Does there exist a set of initial
1 2 1 2
conditions for which the first cart moves but the second cart does not? If so, find those conditions. If not, argue why not.
Exercise 3.6.102: Suppose there are three carts of equal mass m and connected by two springs of constant k (and no connections to
walls). Set up the system and find its general solution.
Exercise 3.6.103: Suppose a cart of mass 2 kg is attached by a spring of constant k = 1 to a cart of mass 3 kg, which is attached to the
wall by a spring also of constant k = 1 . Suppose that the initial position of the first cart is 1 meter in the positive direction from the
rest position, and the second mass starts at the rest position. The masses are not moving and are let go. Find the position of the second
mass as a function of time.
5 −4 4
⎡ ⎤
Exercise 3.7.3: Let A = ⎢ 0 3 0 ⎥.
⎣ ⎦
−2 4 −1
a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the general solution of λ = Ax⃗ .
2 1 0
⎡ ⎤
Exercise 3.7.4: Let A = ⎢0 2 0⎥ . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the
⎣ ⎦
0 0 2
general solution of x⃗ = Ax⃗ in two different ways and verify you get the same answer.
0 1 2
⎡ ⎤
Exercise 3.7.5: Let A = ⎢ −1 −2 −2 ⎥ . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find
⎣ ⎦
−4 4 7
Exercise 3.7.101: Let A = ⎢ 1 1 1⎥ . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find the
⎣ ⎦
1 1 1
Exercise 3.7.103: Let A = ⎢ −1 −1 9⎥ . a) What are the eigenvalues? b) What is/are the defect(s) of the eigenvalue(s)? c) Find
⎣ ⎦
0 −1 5
1
suppose that [ ] is the eigenvector. Find A and show that there is only one solution.
0
1 2
Exercise 3.8.5: Compute the matrix exponential e for A = [ A
] .
0 2
Exercise 3.8.6 (challenging): Suppose AB = BA . Show that under this assumption, e A+B
= e
A
e
B
.
Exercise 3.8.7: Use Exercise 3.8.6 to show that (e A
)
−1
= e
−A
. In particular this means that e is invertible even if A is not.
A
1 0
Exercise 3.8.8: Suppose A is a matrix with eigenvalues -1, 1, and corresponding eigenvectors [ ] [ , ] . a) Find matrix A with these
1 1
2
properties. b) Find the fundamental matrix solution to x⃗ ′
= Ax⃗ . c) Solve the system in with initial conditions x⃗(0) = [ ] .
3
Exercise 3.8.9: Suppose that A is an n × n matrix with a repeated eigenvalue λ of multiplicity n. Suppose that there are n linearly
independent eigenvectors. Show that the matrix is diagonal, in particular A = λI . Hint: Use diagonalization and the fact that the
identity matrix commutes with every other matrix.
−1 −1 ′ 1
Exercise 3.8.10: Let A = [ ] . a) Find e . b) Solve x⃗
tA
= Ax⃗ , x⃗(0) = [ ] .
1 −3 −2
1 2
Exercise 3.8.11: Let A = [ ] . Approximate e tA
by expanding the power series up to the third order.
3 4
1 −2
Exercise 3.8.101: Compute e tA
where A = [ ] .
−2 1
1 −3 2
⎡ ⎤
Exercise 3.8.102: Compute e tA
where A = ⎢ −2 1 2⎥ .
⎣ ⎦
−1 −3 4
3 −1 1
Exercise 3.8.103: a) Compute e tA
where A = [ ] . b) Solve x⃗ ′
= Ax⃗ for x⃗(0) = [ ] .
1 1 2
2 3
Exercise 3.8.104: Compute the first 3 terms (up to the second degree) of the Taylor expansion of e tA
where A = [ ] (Write as a
2 2
a) Check that
t sin t t cos t
x⃗c = c1 [ ] + c2 [ ] (3.E.4)
−t cos t t sin t
1 1/8/2020
4.1: BOUNDARY VALUE PROBLEMS
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, (4.1.1)
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 ′′
has two arbitrary constants present. It is, therefore, natural (but wrong) to believe that requiring two conditions guarantees a unique
solution.
Example 4.1.1:
Take λ = 1, a = 0, b = π . That is,
′′
x + x = 0, x(0) = 0, x(π) = 0. (4.1.2)
Then x = sin t 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 = A cos t + 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. (4.1.3)
– –
Then the general solution is x = A cos(√2t) + B sin(√2t) . Letting x(0) = 0 still forces A = 0 . We apply the second
– –
condition to find 0 = x(π) = B sin(√2t) . As
sin(√2t) ≠ 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.
′′ ′ ′
x + λx = 0, x (a) = 0, x (b) = 0, (4.1.5)
and
′′ ′ ′
x + λx = 0, x(a) = x(b), x (a) = x (b), (4.1.6)
A number λ is called an eigenvalue of (4.1.4) (resp. (4.1.5) or (4.1.6)) if and only if there exists a nonzero (not identically zero)
solution to (4.1.4) (resp. (4.1.5) or (4.1.6)) 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
2
differential operators, then we are doing the same exact thing. For example, let . We are looking for nonzero functions
d
L = − 2
f
dt
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. (4.1.7)
− −
x = A cos(√λ t) + B sin(√λ t). (4.1.8)
− −
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 k for all integers 2
k ≥ 1 . The corresponding eigenfunctions can be taken as x = sin(kt) . Just like for eigenvectors, we get all the multiples of an
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) + B sinh(√−λ t). (4.1.10)
−−
−
Letting x(0) = 0 implies that A = 0 (recall cosh 0 = 1 and sinh 0 = 0 ). So our solution must be and
x = B sinh(√−λ t)
satisfy x(π) = 0 . This is only possible if B is zero. Why? Because sinh ξ is only zero when ξ = 0 . You should plot sinh to see
t −t
e −e
this fact. We can also see this from the definition of sinh. We get 0 = sinh t = 2
. Hence e
t
= e
−t
, which implies t = −t
Example 4.1.4:
Let us compute the eigenvalues and eigenfunctions of
′′ ′ ′
x + λx = 0, x (0) = 0, x (π) = 0. (4.1.12)
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 = A cos(√λ t) + B sin(√λ t) . So
′′
′ − − − −
x = −A√λ sin(√λ t) + B√λ cos(√λ t). (4.1.13)
′ − −
0 = x (π) = −A√λ sin(√λ π). (4.1.14)
− −
Again A cannot be zero if λ is to be an eigenvalue, and is only zero if
sin(√λ π) for a positive integer k. Hence the
√λ = k
positive eigenvalues are again k for all integers k ≥ 1 . And the corresponding eigenfunctions can be taken as x = cos(kt) .
2
Now suppose that λ = 0 . In this case the equation is x = 0 and the general solution is x = At + B so x = A . The condition
′′ ′
x (0) = 0 implies that A = 0 . Now x (π) = 0 also simply implies A = 0 . This means that B could be anything (let us take it to
′ ′
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
2
λk = k with an eigenf unction xk = cos(kt) f or all integers k ≥ 1, (4.1.16)
The following problem is the one that leads to the general Fourier series.
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 as before, 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 = A cos(√λt) + B sin(√λt) . Now
− − − −
A cos(−√λ π) + B sin(−√λ π) = A cos(√λ π) + B sin(√λ π). (4.1.19)
−
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 .
−
Hence, √λ is an integer and the eigenvalues are yet again λ = k for an integer k ≥ 1 . In this case, however, 2
x = A cos(kt) + B sin(kt) is an eigenfunction for any A and any B . So we have two linearly independent eigenfunctions
sin(kt) and cos(kt) . Remember that for a matrix we could also have had two eigenvectors corresponding to a single eigenvalue if
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 x (t) and x (t) are two eigenfunctions of the problem (4.1.4), (4.1.5) or (4.1.6) for two different
1 2
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 x1 = 0 and x + λ2 x2 = 0. (4.1.23)
1 2
′′ ′′
(λ1 − λ2 )x1 x2 = x x1 − x2 x . (4.1.24)
2 1
′′ ′′
(λ1 − λ2 ) ∫ x1 x2 dt = ∫ x x1 − x2 x dt (4.1.25)
2 1
a a
b
d
′ ′
= ∫ (x x1 − x2 x )dt
2 1
a
dt
′ ′ b
= [ x x1 − x2 x ] = 0.
2 1 t=a
Exercise 4.1.1:
(easy). Finish the theorem (check the last equality in the proof) for the cases (4.1.5) and (4.1.6).
We have seen previously that sin(nt) was an eigenfunction for the problem x ′′
+ λx = 0, x(0) = 0, x(π) = 0 . Hence we have
the integral
π
Similarly
π
and
π
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 ω. 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 giving 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
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.
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
2 2
ρω 2
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.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
One way to solve (4.2.1) is to decompose f(t) as a sum of cosines (and sines) and then solve many problems of the form (4.2.2). We
then use the principle of superposition, to sum up all the solutions we got to get a solution to (4.2.1).
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)
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 sin(t) are 2π−periodic. So are cos(kt) and sin(kt) 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. We assumed that f(−L) = f(L) . We
could have also started with f defined only on the half-open interval (−L, L] and then define f(−L) = f(L) .
Example 4.2.1:
Define f(t) = 1 − t 2
on [−1, 1]. Now extend periodically to a 2-periodic function. See Figure 4.2.
PIC
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 [ , ] . Take the π− periodic extension and sketch its graph. How does it compare to the graph of
2 2
cos t ?
word orthogonal means that if v ⃗ and w⃗ are two distinct (and not multiples of each other) eigenvectors of A , then ⟨v,⃗ w⃗⟩ = 0 . In this
T
case the inner product ⟨v,⃗ w⃗⟩ is the dot product, which can be computed as v ⃗ w⃗.
To decompose a vector v ⃗ in terms of mutually orthogonal vectors w⃗ and w⃗ we write 1 2
v ⃗ = a1 w⃗ 1 + a2 w⃗ 2 . (4.2.3)
Therefore,
⟨v,⃗ w⃗ 1 ⟩
a1 = . (4.2.5)
⟨w⃗ 1 , w⃗ 1 ⟩
Similarly
⟨v⃗, w⃗ 2 ⟩
a2 = . (4.2.6)
⟨w⃗ 2 , w⃗ 2 ⟩
⟨v,⃗ w⃗ 2 ⟩ 2 +3 5
a2 = = = .
⟨w⃗ 2 , w⃗ 2 ⟩ 1 +1 2
Hence
2 −1 1 5 1
[ ] = [ ]+ [ ]. (4.2.8)
3 2 −1 2 1
We have previously computed that the eigenfunctions are 1, cos(kt), sin(kt) . That is, we will want to find a representation of a
2π− periodic function f(t) as
∞
a0
f(t) = + ∑ an cos(nt) + bn sin(nt). (4.2.10)
2
n=1
a0
This series is called the Fourier series2 or the trigonometric series for f(t) . We write the coefficient of the eigenfunction 1 as for
2
convenience. We could also think of 1 = cos(0t) , so that we only need to look at cos(kt) and sin(kt) .
As for matrices we 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 a we want to compute ⟨f(t), cos(nt)⟩ . We define the inner product as
n
With this definition of the inner product, we have seen in the previous section that the eigenfunctions cos(kt) (including the constant
eigenfunction), and sin(kt) are orthogonal in the sense that
⟨cos(mt), cos(nt)⟩ = 0 f or m ≠ n, (4.2.12)
⟨sin(mt), sin(nt)⟩ = 0 f or m ≠ n,
By elementary calculus for n = 1, 2, 3, … . we have ⟨cos(nt), cos(nt)⟩ = π and ⟨sin(nt), sin(nt)⟩ = π . For the constant we get
that ⟨1, 1⟩ = 2π . The coefficients are given by
π
⟨f(t), cos(nt)⟩ 1
an = = ∫ f(t) cos(nt)dt, (4.2.13)
⟨cos(nt), cos(nt)⟩ π −π
π
⟨f(t), sin(nt)⟩ 1
bn = = ∫ f(t) sin(nt)dt.
⟨sin(nt), sin(nt)⟩ π −π
Compare these expressions with the finite-dimensional example. For a we get a similar formula 0
π
⟨f(t), 1⟩ 1
a0 = 2 ∫ f(t)dt. (4.2.14)
⟨1, 1⟩ π −π
Let us check the formulas using the orthogonality properties. Suppose for a moment that
∞
a0
= ⟨1, cos(mt)⟩ + ∑ an ⟨cos(nt), cos(mt)⟩ + bn ⟨sin(nt), sin(mt)⟩
2
n=1
= am ⟨cos(mt), cos(mt)⟩ .
⟨f (t),cos(mt)⟩
And hence a m = .
⟨cos(mt),cos(mt)⟩
Exercise 4.2.2:
Carry out the calculation for a and b .
0 m
Example 4.2.3:
Take the function
f(t) = t (4.2.17)
for t in (−π, π] . Extend f(t) periodically and write it as a Fourier series. This function is called the sawtooth.
π
1
a0 = ∫ tdt = 0. (4.2.18)
π −π
We will often use the result from calculus that says 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 functions t, sin t , or (importantly for us) t cos(nt)
are all odd functions. Thus
π
1
an = ∫ t cos(nt)dt = 0. (4.2.19)
π −π
Let us move to b . Another useful fact from calculus is that the integral of an even function over a symmetric interval is twice the
n
integral of the same function over half the interval. Recall an even function is a function φ(t) such that φ(−t) = φ(t) . For
example t sin(nt) is even.
π
2
= ∫ t sin(nt)dt
π 0
π π
2 −t cos(nt) 1
= ([ ] + ∫ cos(nt)dt)
π n n 0
t=0
2 −π cos(nπ)
= ( + 0)
π n
n+1
−2 cos(nπ) 2(−1)
= = .
n n
n
1 if n even,
cos(nπ) = (−1 ) = { (4.2.21)
−1 if n odd.
Let us write out the first 3 harmonics of the series for f(t) .
2
2 sin(t) − sin(2t) + sin(3t) + ⋯ (4.2.23)
3
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) = { (4.2.24)
π 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
π π
1 1
a0 = ∫ f(t)dt = ∫ πdt = π. (4.2.25)
π −π
π 0
Next,
π π
1 1
an = ∫ f(t) cos(nt)dt = ∫ π cos(nt)dt = 0. (4.2.26)
π −π
π 0
And finally
π
1
= ∫ π sin(nt)dt
π 0
π
− cos(nt)
= [ ]
n
t=0
n 2
1 − cos(πn) 1 − (−1) if n is odd,
n
= = = {
n n 0 if n is even.
Let us write out the first 3 harmonics of the series for f(t) .
π 2
+ 2 sin(t) + sin(3t) + ⋯ (4.2.29)
2 3
The plot of these first three and also of the first 20 terms of the series 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. For example, if f(t) is the square wave function, the equation
∞
π 2
f(t) = +∑ sin((2k − 1)t). (4.2.30)
2 2k − 1
k=1
is only an equality for such t where f(t) is continuous. That is, we do not get an equality for t = −π, 0, π 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
∞
π 2 π
+∑ sin((2k − 1)t) = . (4.2.31)
2 2k − 1 2
k=1
⎧ 0 if − π < t < 0,
⎪
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 does get smaller,
however, the more terms in the series we take.
PIC
CONTRIBUTORS
L
g(s) = f ( s) (4.3.1)
π
is 2π-periodic. We want to also rescale all our sines and cosines. We want to write
∞
a0 nπ nπ
f(t) = + ∑ an cos( t) + bn sin( t). (4.3.2)
2 L L
n=1
We compute a and b as before. After we write down the integrals we change variables from s back to t.
n n
π L
1 1
a0 = ∫ g(s)ds = ∫ f(t)dt, (4.3.4)
π −π
L −L
π L
1 1 nπ
an = ∫ g(s) cos(ns)ds = ∫ f(t) cos( t)dt,
π −π
L −L
L
π L
1 1 nπ
bn = ∫ g(s) sin(ns)ds = ∫ f(t) sin( t)dt.
π −π
L −L
L
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
extended periodically. The plot of the periodic extension is given in Figure 4.8. Compute the Fourier series of f(t) .
PIC
= 2∫ t cos(nπt)dt
0
1 1
t 1
= 2[ sin(nπt)] −2 ∫ sin(nπt)dt
nπ 0
nπ
t=0
n ⎧ 0 if n is even,
1 1
2((−1 ) − 1)
= 0+ [cos(nπt)] = = ⎨ −4
2 2 t=0 2 2
n π n π ⎩ if n is odd.
2 2
n π
a0 = ∫ |t|dt = 1. (4.3.7)
−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 b . Here, we notice that |t| sin(nπt) is odd and, therefore,
n
Let us explicitly write down the first few terms of the series up to the 3 rd
harmonic.
1 4 4
− cos(πt) − cos(3πt) − ⋯ (4.3.10)
2 2
2 π 9π
The plot of these few terms and also a plot up to the 20 harmonic is given in Figure 4.9. You should notice how close the graph is
th
to the real function. You should also notice that there is no “Gibbs phenomenon” present as there are no discontinuities.
PIC PIC
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). (4.3.11)
t↑c t↓c
If you are unfamiliar with this notation, lim f(t) means we are taking a limit of f(t) as t approaches c from below (i.e. t < c ) and
t↑c
limt↓c f(t) means we are taking a limit of f(t) as t approaches c from above (i.e. t > c ). For example, for the square wave function
0 if −π < t ≤ 0,
f(t) = { (4.3.12)
π if 0 < t ≤ π,
interval, such that f(t) is continuous on the intervals (t , t ), (t , t ), … , (t , t ) . Also suppose that all the one sided limits exist,
0 1 1 2 k−1 k
that is, all of f(t +), f(t −), f(t +), f(t −), f(t +), … , f(t −)
0 1 1 2 2 exist and are finite. Then we say f(t) is piecewise
k
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.3.12) is piecewise smooth on [−π, π] or any other interval. In such a case we simply say that the
function is piecewise smooth.
Example 4.3.3:
The function f(t) = |t| is piecewise smooth.
Example 4.3.4:
1
The function f(t) = is not piecewise smooth on [−1, 1] (or any other interval containing zero). In fact, it is not even piecewise
t
continuous.
Example 4.3.5:
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.
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) + bn sin( t). (4.3.14)
2 L L
n=1
Otherwise
∞
f(t−) + f(t+) a0 nπ nπ
= + ∑ an cos( t) + bn sin( t). (4.3.15)
2 2 L L
n=1
f(t−) + f(t+)
If we happen to have that f(t) = at all the discontinuities, the Fourier series converges to f(t) everywhere. We can
2
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 to the discussion of the Gibbs phenomenon in the 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) = + ∑ an cos( t) + bn sin( t) (4.3.16)
2 L L
n=1
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) = + ∑ an cos( t) + bn sin( t) (4.3.18)
2 L L
n=1
is a piecewise smooth function. Then the antiderivative is obtained by antidifferentiating term by term and so
∞
a0 t an L nπ −bn L nπ
F (t) = +C+∑ sin( t) + cos( t), (4.3.19)
2 nπ L nπ L
n=1
where F ′
(t) = f(t) and C is an arbitrary constant.
a0 t
Note that the series for F (t) is no longer a Fourier series as it contains the term. The antiderivative of a periodic function need no
2
longer be periodic and so we should not expect a Fourier series.
Example 4.3.6:
Take the function
(t + 1)t if −1 < t ≤ 0,
f(t) = { (4.3.20)
(1 − t)t if 0 < t ≤ 1,
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
1 0 1
1 0 1
n ⎧ 8
4(1 − (−1 ) ) if n is odd,
= ⎨ π 3 n3
3 3 ⎩
π n
0 if n is even.
This series converges very fast. If you plot up to the third harmonic, that is the function
8 8
sin(πt) + sin(3πt), (4.3.23)
3
π 27π 3
8
it is almost indistinguishable from the plot of f(t) in Figure 4.10. In fact, the coefficient 3
is already just 0.0096
27π
(approximately). The reason for this behavior is the n term in the denominator. The coefficients b in this case go to zero as fast as
3
n
3
goes to zero.
n
For functions constructed piecewise from polynomials as above, it is generally true that if you have one derivative, the Fourier
1
coefficients will go to zero approximately like 3
. If you have only a continuous function, then the Fourier coefficients will go to
n
1 1
zero as 2
. If you have discontinuities, then the Fourier coefficients will go to zero approximately as . For more general
n n
functions the story is somewhat more complicated but the same idea holds, the more derivatives you have, the faster the coefficients
1
go to zero. Similar reasoning works in reverse. If the coefficients go to zero like you always obtain a continuous function. If
n2
1
they go to zero like you obtain an everywhere differentiable function.
n3
To justify this behavior, take for example the function defined by the Fourier series
∞
1
f(t) = ∑ sin(nt). (4.3.24)
3
n
n=1
1
Therefore, the coefficients now go down like 2
, which means that we have a continuous function. The derivative of ′
f (t) is
n
defined at most points, but there are points where f (t) is not differentiable. It has corners, but no jumps. If we differentiate again
′
(where we can) we find that the function f (t), now fails to be continuous (has jumps)
′′
∞
′′
−1
f (t) = ∑ sin(nt). (4.3.26)
n
n=1
This function is similar to the sawtooth. If we tried to differentiate the series again we would obtain
∞
∑ − cos(nt), (4.3.27)
n=1
Exercise 4.3.2:
Use a computer to plot the series we obtained for 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?
′′
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
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) and g(t) are both odd, then f(t) + g(t) is odd. Similarly for even functions. On the other hand, if f(t) is odd and g(t)
even, then we cannot say anything about the sum f(t) + g(t) . In fact, the Fourier series of any function is a sum of an odd (the
sine terms) and an even (the cosine terms) function.
In this section we consider 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 on the range [0, L] and it would be convenient to
have an odd (resp. even) function. If the function is odd (resp. even), all the cosine (resp. sine) terms will disappear. What we will
do is take the odd (resp. even) extension of the function to [−L, L] and then extend periodically to a 2L-periodic function.
Take a function f(t) defined on [0, L]. On (−L, L] define the functions
def f(t) if 0 ≤ t ≤ L,
Fodd (t) = { (4.4.1)
−f(−t) if −L < t < 0,
def f(t) if 0 ≤ t ≤ L,
Feven (t) = {
f(−t) if −L < t < 0.
Exercise 4.4.2:
Check that F o dd (t) is odd and that F
ev en (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) .
That is, there are no cosine terms in the Fourier series of an odd function. The integral is zero because f(t) cos ( t) is an odd
nπ
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.
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 ( t) is the product of two odd functions and hence is even.
nπ
L L
1 nπ 2 nπ
bn = ∫ f(t) sin ( t) dt = ∫ f(t) sin ( t) dt. (4.4.3)
L −L
L L 0
L
Similarly, if f(t) is an even 2L-periodic function. For the same exact reasons as above, we find that b n = 0 and
L
2 nπ
an = ∫ f(t) cos ( t) dt. (4.4.5)
L 0
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 [0, L]. Therefore, we can compute the Fourier series of the odd (or even) extension of a function 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π
Fo dd (t) = ∑ bn sin ( t), (4.4.8)
L
n=1
where
L
2 nπ
bn = ∫ f(t) sin ( t) dt. (4.4.9)
L 0
L
where
L
2 nπ
an = ∫ f(t) cos ( t) dt. (4.4.11)
L 0
L
n=1
bn sin ( t) is called the sine series of f(t) and the series +∑
∞
n=1
an cos ( t) is called the cosine
L 2 L
series of f(t) . We often do not actually care what happens outside of [0, L] . In this case, we pick whichever series fits our problem
better.
L
and following the procedure of § 4.2. This point of view is useful, as we commonly use a specific series that arose because our
underlying question led to a certain eigenvalue problem. If the eigenvalue 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.
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, gotten the same formulas by defining the inner product
L
and following the procedure of ch. 4.2. This point of view is useful, as we commonly use a specific series that arose because our
underlying question led to a certain eigenvalue problem. If the eigenvalue 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 f(t) = t for 0 ≤ t ≤ π . 2
We want to write
∞
a0
f(t) = + ∑ an cos(nt), (4.4.14)
2
n=1
where
π 2
2 2π
2
a0 = ∫ t dt = , (4.4.15)
π 0
3
and
π π π
2 2
2 2
1 4
a0 = ∫ t cos(nt)dt = [t sin(nt)] − ∫ t sin(nt)dt (4.4.16)
π 0 π n nπ 0
0
π n
4 4 4(−1)
π
[t cos(nt)] + ∫ cos(nt)dt = .
2 0 2 2
n π n π 0 n
Note that we have “detected” the continuity of the extension since the coefficients decay as 1
2
n
. That is, the even extension of t
2
has no jump discontinuities. It does have corners, since the derivative, which is an odd function and a sine series, has jumps; it has a
Fourier series whose coefficients decay only as . 1
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
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 .
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 exists a unique solution. Note that the eigenfunctions of this
eigenvalue problem are the functions sin ( t) . Therefore, to find the solution, we first find the Fourier sine series for f(t) . We write
nπ
x also as a sine series, but with unknown coefficients. We substitute the series for x into the equation and solve for the unknown
coefficients. If we have the Neumann boundary conditions x (0) = 0 and x (L) = 0 , we do the same procedure using the cosine
′ ′
series.
Let us see how this method works on examples.
Example 4.4.3:
Take the boundary value problem for 0 < t < 1 ,
′′
x (t) + 2x(t) = f(t), (4.4.19)
where f(t) = t on 0 < t < 1 , and satisfying the Dirichlet boundary conditions x(0) = 0 and x(1) = 0 . We write f(t) as a
sine series
∞
n=1
where
1 n+1
2(−1)
cn = 2 ∫ t sin (nπt) dt = . (4.4.21)
0
nπ
We write x(t) as
∞
n=1
We plug in to obtain
∞ ∞
′′ 2 2
x (t) + 2x(t) = ∑ −bn n π sin(nπt) + 2 ∑ bn sin(nπt) (4.4.23)
n=1 n=1
2 2
= ∑ bn (2 − n π ) sin(nπt)
n=1
∞ n+1
2(−1)
= f(t) = ∑ sin(nπt).
nπ
n=1
Therefore,
n+1
2(−1)
2 2
bn (2 − n π ) = . (4.4.24)
nπ
or
n+1
2(−1)
bn = . (4.4.25)
2 2
nπ(2 − n π )
Example 4.4.4:
Similarly we handle the Neumann conditions. Take the boundary value problem for 0 < t < 1 ,
′′
x (t) + 2x(t) = f(t), (4.4.27)
∞
c0
f(t) = + ∑ cn cos (nπt), (4.4.28)
2
n=1
where
1
c0 = 2 ∫ t dt = 1 (4.4.29)
0
and
1 n −4
2((−1 ) − 1) if n odd,
2 2
π n
cn = 2 ∫ t cos(nπt)dt = = { (4.4.30)
2 2
0 π n 0 if n even.
We plug in to obtain
∞ ∞
′′ 2 2
x (t) + 2x(t) = ∑ [−an n π cos(nπt)] + a0 + 2 ∑ [ an cos(nπt)] (4.4.32)
n=1 n=1
2 2
= a0 + ∑ an (2 − n π ) cos(nπt)
n=1
∞
1 −4
= f(t) = +∑ cos(nπt).
2 2
2 π n
n=1
n odd
Therefore, a = 1
2
and a
n = 0 for n even (n ≥ 2 ) and for n odd we have
−4
2 2
an (2 − n π ) = , (4.4.33)
2 2
π n
or
−4
an = . (4.4.34)
2 2 2 2
n π (2 − n π )
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
The general solution consists of the complementary solution x , which solves the associated homogeneous equation m x + cx + kx = 0 ,
c
′′ ′
and a particular solution of Equation 4.5.1 we call x . For c > 0 , the complementary solution x will decay as time goes by. Therefore, we
p c
are mostly interested in a particular solution x that does not decay and is periodic with the same period as F (t) . We call this particular
p
solution the steady periodic solution and we write it as x as before. What will be new in this section is that we consider an arbitrary forcing
sp
−−
−
k
where ω0 = √ . Any solution to ′′
m x (t) + kx(t) = F (t) is of the form A cos(ω0 t) + B sin(ω0 t) + xsp . The steady periodic
m
Example 4.5.1
Suppose that k = 2 , and m = 1 . The units are again the mks units (meters-kilograms-seconds). There is a jetpack strapped to the mass,
which fires with a force of 1 newton for 1 second and then is off for 1 second, and so on. We want to find the steady periodic solution.
Solution
The equation is, therefore,
′′
x + 2x = F (t), (4.5.6)
We compute
1 1
c0 = ∫ F (t)dt = ∫ dt = 1,
−1 0
dn = ∫ F (t) sin(nπt)dt
−1
= ∫ sin(nπt)dt
0
1
− cos(nπt)
[ ]
nπ
t=0
2
n ⎧
1 − (−1) if n odd,
= = ⎨ πn
πn ⎩
0 if n even.
So
∞
1 2
F (t) = +∑ sin(nπt). (4.5.10)
2 πn
n=1
n od d
We want to try
∞
a0
x(t) = + ∑ an cos(nπt) + bn sin(nπt). (4.5.11)
2
n=1
∞
a0
x(t) = + ∑ bn sin(nπt). (4.5.12)
2
n=1
n od d
′′ 2 2
x + 2x = ∑ [−bn n π sin(nπt)] + a0 + 2 ∑ [ bn sin(nπt)] (4.5.13)
n=1 n=1
n od d n od d
∞
2 2
= a0 + ∑ bn (2 − n π ) sin(nπt)
n=1
n od d
∞
1 2
= F (t) = +∑ sin(nπt).
2 πn
n=1
n od d
1
So a 0 = ,b
n = 0 for even n, and for odd n we get
2
2
bn = . (4.5.14)
2 2
πn(2 − n π )
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
4.5.2 RESONANCE
When we expand F (t) and find that some of its terms coincide with the complementary solution to m x + 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
Nπ
where ω 0 = for some positive integer N . In this case we have to modify our guess and try
L
∞
a0 Nπ Nπ nπ nπ
x(t) = + t ( aN cos( t) + bN sin( t)) + ∑ an cos( t) + bn sin( t). (4.5.18)
2 L L L L
n=1
n≠N
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
Nπ Nπ
terms t ( aN cos( t) + bN sin( t)) will eventually dominate and lead to wild oscillations. As before, this behavior is called
L L
Example 4.5.2
Find the steady periodic solution to the equation
′′ 2
2x + 18 π x = F (t), (4.5.19)
where
−1 if −1 < t < 0,
F (t) = { (4.5.20)
1 if 0 < t < 1,
Example 4.5.3
Compute the Fourier series of F to verify the above equation.
The solution must look like
x(t) = c1 cos(3πt) + c2 sin(3πt) + xp (t) (4.5.22)
We note that if we just tried a Fourier series with sin(nπt) as usual, we would get duplication when n = 3 . Therefore, we pull out that
term and multiply by t. We also have to add a cosine term to get everything right. That is, we must try
∞
n=1
n od d
n≠3
′′ 2 2 2 2
xp (t) = −6 a3 π sin(3πt) − 9 π a3 t cos(3πt) + 6 b3 π cos(3πt) − 9 π b3 t sin(3πt) + ∑(−n π bn ) sin(nπt). (4.5.24)
n=1
n od d
n≠3
If we simplify we obtain
∞
′′ 2 2 2 2
2 xp + 18 π x = −12 a3 π sin(3πt) + 12 b3 π cos(3πt) + ∑(−2 n π bn + 18 π bn ) sin(nπt. ) (4.5.25)
n=1
n od d
n≠3
′′ 2 ∑∞ 2 2 2 2xp + 18π x = -12a 3πsin(3πt) + 12b3π cos(3 πt) + (- 2n π bn + 18π bn)sin(nπt). nn= o1dd n⇔3
This series has to equal to the series for F (t) . We equate the coefficients and solve for a and b . 3 n
4/(3π) −1
a3 = = , (4.5.26)
2
−12π 9π
b3 = 0,
4 2
bn = = f or n odd and n ≠ 3.
2 2 2 3 2
nπ(18 π − 2n π ) π n(9 − n )
That is,
∞
−1 2
xp (t) = t cos(3πt) + ∑ sin(nπt. ) (4.5.27)
2 3 2
9π π n(9 − n )
n=1
n od d
n≠3
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.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
where k > 0 is a constant (the thermal conductivity of the material). 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 at a fixed t the graph of 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 instead of t
∂u
, and we will write u
xx instead
∂t
2
of ∂ u
2
. With this notation the heat equation becomes
∂x
ut = kuxx . (4.6.2)
For the heat equation, we must also have some boundary conditions. We assume that the ends of the wire are either exposed and
touching some body of constant heat, or the ends are insulated. For example, if the ends of the wire are kept at temperature 0, then we
must have the conditions
u(0, t) = 0 and u(L, t) = 0. (4.6.3)
If, on the other hand, the ends are also insulated we get the conditions
In other words, heat is not flowing in nor out of the wire at the ends. 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, suppose that we know the initial temperature distribution at time t = 0 . That is,
u(x, 0) = f(x), (4.6.5)
for some known function f(x) . This initial condition is not a homogeneous side condition.
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 and u are solutions that satisfy u(0, t) = 0 and
1 2
u L, t) = 0 , and c , c
( are constants, then u = c u + c u is still a solution that satisfies u(0, t) = 0 andu L, t) = 0 .
1 2 1 1 2 2 (
Similarly for the side conditions u (0, t) = 0 and u (L, t) = 0 . In general, superposition preserves all homogeneous side
x x
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
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 of the form 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, u(L, t) = 0, and u(x, 0) = f(x). (4.6.7)
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). (4.6.8)
We rewrite as
′ ′′
T (t) X (x)
= . (4.6.9)
kT (t) X(x)
This equation must 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. Hence, 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)
= −λ = . (4.6.10)
kT (t) X(x)
In other words
′′
X (x) + λX(x) = 0, (4.6.11)
′
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
′′
2 2
λn =
n π
2
, for integers n ≥ 1 , where eigenfunctions are sin( nπ
L
x) . Hence, let us pick the solutions
L
nπ
Xn (x) = sin( x). (4.6.12)
L
2 2
n π
′
Tn (t) + kTn (t) = 0. (4.6.13)
2
L
∞
nπ
f(x) = ∑ bn sin( x). (4.6.16)
L
n=1
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
∞ ∞ 2 2
nπ −n π
kt
u(x, t) = ∑ bn un (x, t) = ∑ bn sin( x)e L
2
. (4.6.17)
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 T n (0) = 1 and so
∞ ∞
nπ
u(x, 0) = ∑ bn un (x, 0) = ∑ bn sin( x) = f(x). (4.6.18)
L
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
u(0, t) = u(1, t) = 0,
We write f(x) = 50x(1 − x) for 0 < x < 1 as a sine series. That is, f(x) = ∑ ∞
n=1
bn sin(nπx) , where
1 n
200 200(−1) 0 if n even,
bn = 2 ∫ 50x(1 − x) sin(nπx)dx = − = { 400
(4.6.20)
3 3 3 3
0 π n π n 3 3
if n odd.
π n
PIC
The solution u(x, t), plotted in Figure 4.15 for 0 ≤ t ≤ 100 , is given by the series:
∞
400 −n π
2 2
0.003t
u(x, t) = ∑ sin(nπx)e . (4.6.21)
π 3 n3
n=1
n od d
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
∞
400 2 2
−n π 0.003t
u(0.5, t) = ∑ sin(nπ0.5)e . (4.6.22)
3 3
π n
n=1
n od d
For n = 3 and higher (remember n is only odd), 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. Hence
400 2
−π 0.003t
u(0.5, t) ≈ e . (4.6.23)
3
π
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).
After t = 5 or so it would be hard to tell the difference between the first term of the series for u(x, t) and the real solution u(x, t).
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.
Let us get 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 on the graph that if we use the approximation by the first term we will
be close enough. We solve
400 −π
2
0.003t
6.25 = e . (4.6.24)
3
π
That is,
3
6.25π
ln
400
t = ≈ 24.5. (4.6.25)
−π 2 0.003
than any 1
for any power p. In other words, the Fourier series has infinitely many derivatives everywhere. Thus even if the
P
n
function f(x) has jumps and corners, then for a fixed t > 0 , the solution u(x, t) as a function of x is as smooth as we want it to
be.
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, (4.6.27)
′
T (t) + λkT (t) = 0.
At this point the story changes slightly. The boundary condition u (0, t) = 0 implies X (0)T (t) = 0 . Hence X (0) = 0 . Similarly,
x
′ ′
u (L, t) = 0 implies X (L) = 0 . We are looking for nontrivial solutions X of the eigenvalue problem X + λX = 0,
′ ′′
x
2 2
X (0) = 0, X (L) = 0, . We have previously found that the only eigenvalues are λ = , for integers n ≥ 0 , where
′ ′ n π
n 2
L
L
)X (we include the constant eigenfunction). Hence, let us pick solutions
nπ
Xn (x) = cos( x) and X0 (x) = 1. (4.6.28)
L
2 2
n π
′
Tn (t) + kTn (t) = 0. (4.6.29)
2
L
For n ≥ 1 , as before,
2 2
−n π
kt
Tn (t) = e L
2
. (4.6.30)
For n = 0 , we have T ′
0
(t) = 0 and hence T 0 (t) = 1 . Our building-block solutions will be
2 2
−n π
nπ kt
un (x, t) = Xn (x)Tn (t) = cos( x)e L
2
, (4.6.31)
L
u0 (x, t) = 1. (4.6.32)
∞
a0 nπ
f(x) = + ∑ an cos( x). (4.6.33)
2 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
∞ ∞ 2 2
−n π
a0 a0 nπ kt
u(x, t) = + ∑ an un (x, t) = + ∑ an cos( x)e L
2
. (4.6.34)
2 2 L
n=1 n=1
Example 4.6.2:
Let us try the same equation as before, but for insulated ends. We are solving the following PDE problem
ut = 0.003 uxx , (4.6.35)
ux (0, t) = ux (1, t) = 0,
For this problem, we must find the cosine series of u(x, 0). For 0 < x < 1 we have
∞
25 −200
50x(1 − x) = +∑( ) cos(nπx). (4.6.36)
2 2
3 π n
n=2
n even
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 −n π
2 2
0.003t
u(x, t) = +∑( ) cos(nπx)e . (4.6.37)
3 π 2 n2
n=2
n even
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 ≈ 8.33 along the entire length of the wire.
25
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
for some constant a > 0 . Assume that the ends of the string are fixed in place:
Note that we have two conditions along the x axis as there are two derivatives in the x direction.
There are also two derivatives along the t direction and hence we need two further conditions here. We need to know the initial
position and the initial velocity of the string. That is,
y(x, 0) = f(x) and yt (x, 0) = g(x). (4.7.3)
w(0, t) = w(L, t) = 0,
and
2
ztt = a zxx , (4.7.5)
z(0, t) = z(L, t) = 0,
The principle of superposition implies that y = w+z solves the wave equation and furthermore
y(x, 0) = w(x, 0) + z(x, 0) = f(x) and y (x, 0) = w
t t (x, 0) + zt (x, 0) = g(x) . Hence, y is a solution to
2
ytt = a yxx , (4.7.6)
y(0, t) = y(L, t) = 0,
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 y (x, 0) = 0 . Therefore, we will be able to use the idea of separation of variables to find many building-block
t
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.7.4). We try a solution of the form w(x, t) = X(x)T (t) again. We plug into the wave equation to obtain
′′ 2 ′′
X(x)T (t) = a X (x)T (t). (4.7.7)
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)
= −λ = . (4.7.9)
a2 T (t) X(x)
′′ 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
2 2
n π
nontrivial solutions for the first equation are when λ = λ n = and they are
2
L
nπ
Xn (x) = sin( x). (4.7.11)
L
nπa nπa
Tn (t) = A cos( t) + B sin( t). (4.7.12)
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 is
L
convenient to pick B = (you will see why in a moment) and hence
nπa
L nπa
Tn (t) = sin( t). (4.7.13)
nπa L
We differentiate in x, that is
∂wn nπ nπa
(x, t) = sin( x) cos( t). (4.7.15)
∂t L L
Hence,
∂wn nπ
(x, 0) = sin( x). (4.7.16)
∂t L
Using superposition we can just write down the solution to (4.7.4) as a series
∞ ∞
L nπ nπa
w(x, t) = ∑ bn wn (x, t) = ∑ bn sin( x) sin( t). (4.7.18)
nπa L L
n=1 n=1
Exercise 4.7.1:
Check that w(x, 0) = 0 and w t (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
′′ 2
T (t) + λ a T (t) = 0.
2 2
n π
and the conditions X(0) = 0 , X(L) = 0 . So again λ = λ n =
2
and
L
nπ
Xn (x) = sin( x). (4.7.20)
L
Exercise 4.7.2:
Fill in the details in the derivation of the solution of (4.11). Check that the solution satisfies all the side conditions.
Putting these two solutions together, let us state the result as a theorem.
Theorem 4.7.1. Take the equation
2
ytt = a yxx , (4.7.25)
y(0, t) = y(L, t) = 0,
where
∞
nπ
f(x) = ∑ cn sin( x), (4.7.26)
L
n=1
and
∞
nπ
g(x) = ∑ bn sin( x). (4.7.27)
L
n=1
Then the solution y(x, t) can be written as a sum of the solutions of (4.7.4) and (4.7.5). In other words,
∞
L nπ nπa nπ nπa
y(x, t) = ∑ bn sin( x) sin( t) + cn sin( x) cos( t) (4.7.28)
nπa L L L L
n=1
∞
nπ L nπa nπa
= ∑ sin( x) [bn sin( t) + cn cos( t)] .
L nπa L L
n=1
Example 4.7.1
Let us try a simple example of a plucked string. Suppose that a string of length 2 is plucked in the middle such that it has the initial
shape given in Figure 4.19. That is
The string starts at rest (g(x) = 0 ). Suppose that a = 1 in the wave equation for simplicity.
nπ
Note that sin( ) is the sequence 1, 0, −1, 0, 1, 0, −1, … for n = 1, 2, 3, 4, …. Therefore,
2
∞ m+1
0.8(−1) (2m − 1)π (2m − 1)π
= ∑ sin( x) cos( t)
2 2
(2m − 1) π 2 2
n=1
PIC
A plot for 0 < t < 3 is given in Figure 4.20. Notice that unlike the heat equation, the solution does not become “smoother,” the “sharp
edges” remain. We will see the reason for this behavior in the next section where we derive the solution to the wave equation in a
different way. Make sure you understand what the plot, such as the one in the figure, is telling you. For each fixed t, you can think of
the function y(x, t) as just a function of x. This function gives you the shape of the string at time t.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
∂ ∂ξ ∂ ∂η ∂ ∂ ∂
= + = + , (4.8.3)
∂x ∂x ∂ξ ∂x ∂η ∂ξ ∂η
∂ ∂ξ ∂ ∂η ∂ ∂ ∂
= + = −a +a .
∂t ∂t ∂ξ ∂t ∂η ∂ξ ∂η
We compute
2 2 2 2
∂ y ∂ ∂ ∂y ∂y ∂ y ∂ y ∂ y
yxx = = ( + )( + ) = +2 + , (4.8.4)
2 2 2
∂x ∂ξ ∂η ∂ξ ∂η ∂ξ ∂ξ∂η ∂η
2 2 2 2
∂ y ∂ ∂ ∂y ∂y ∂ y ∂ y ∂ y
2 2 2
ytt = = (−a +a ) (−a +a ) = a − 2a +a .
2 2 2
∂ ∂ξ ∂η ∂ξ ∂η ∂ξ ∂ξ∂η ∂η
2 2
∂ y ∂ y
In the above computations, we used the fact from calculus that ∂ξ∂η
=
∂η∂ξ
. We plug what we got into the wave equation,
2
2 2
∂ y 2
0 = a yxx − ytt = 4 a = 4 a yξη . (4.8.5)
∂ξ∂η
Therefore, the wave equation (4.8.1) transforms into y = 0 . It is easy to find the general solution to this equation by integrating
ξη
twice. Keeping ξ constant, we integrate with respect to η first4 and notice that the constant of integration depends on ξ ; for each ξ we
might get a different constant of integration. We get y = C(ξ) . Next, we integrate with respect to ξ and notice that the constant of
ξ
integration must depend on η. Thus, y = ∫ C(ξ)dξ + B(η) . The solution must, therefore, be of the following form for some
functions A(ξ) and B(η) :
y = A(ξ) + B(η) = A(x − at) + B(x + at). (4.8.6)
The solution is a superposition of two functions (waves) travelling at speed a in opposite directions. The coordinates ξ and η are called
the characteristic coordinates, and a similar technique can be applied to more complicated hyperbolic PDE.
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
F (x − at) + F (x + at) 1
= + ∫ G(s)ds.
2 2a x−at
So far so good. Assume for simplicity F is differentiable. By the fundamental theorem of calculus we have
−a ′
1 a ′
1
yt (x, t) = F (x − at) + G(x − at) + F (x + at) + G(x + at). (4.8.10)
2 2 2 2
So
−a ′
1 a ′
1
yt (x, 0) = F (x) + G(x) + F (x) + G(x) = G(x). (4.8.11)
2 2 2 2
x
Yay! We’re smoking now. OK, now the boundary conditions. Note that F (x) and G(x) are odd. Also ∫ 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
−at at
1 1 1 1
y(0, t) = F (−at) − ∫ G(s)ds + F (at) + ∫ G(s)ds (4.8.12)
2 2a 0
2 2a 0
at at
−1 1 1 1
= F (at) − ∫ G(s)ds + F (at) + ∫ G(s)ds = 0.
2 2a 0
2 2a 0
L −at
1 1 1
= F (−L − at) − ∫ G(s)ds − ∫ G(s)ds +
2 2a 0
2a 0
L at
1 1 1
+ F (L + at) + ∫ G(s)ds + ∫ G(s)ds
2 2a 0 2a 0
at at
−1 1 1 1
= F (L + at) − ∫ G(s)ds + F (L + at) + ∫ G(s)ds = 0.
2 2a 0
2 2a 0
Example 4.8.1:
D’Alembert says that the solution is a superposition of two functions (waves) moving in the opposite direction at “speed” a. To get
an idea of how it works, let us work out an example. Consider the simpler setup
ytt = yxx , (4.8.14)
y(0, t) = y(1, t) = 0,
y(x, 0) = f(x),
yt (x, 0) = 0.
⎧ 0 if 0 ≤ x < 0.45,
⎪
⎪
⎪
⎪
20(x − 0.45) if 0 ≤ x < 0.45,
f(x) = ⎨ (4.8.15)
⎪ 20(0.55 − x) if 0.45 ≤ x < 0.55
⎪
⎪
⎩
⎪
0 if 0.55 ≤ x ≤ 1.
The graph of this impulse is the top left plot in Figure 4.21.
Let F (x) be the odd periodic extension of f(x) . Then from (4.8.8) we know that the solution is given as
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
= −0.5 . As you can see the d’Alembert solution is much easier to actually compute and to plot than the
−1+0
y(0.1, 0.6) =
2
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 .
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)
. (4.8.18)
2
By superposition we get a solution for the general side conditions (4.8.2) (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) = + . (4.8.21)
2 2a
Do note the minus sign before the H , and the a in the second denominator.
Exercise 4.8.1:
Check that the new formula (4.8.21) satisfies the side conditions (4.8.2).
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.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
3
Named after the French mathematician Jean le Rond d’Alembert (1717 – 1783).
4We can just as well integrate with ξ first, if we wish.
but such that u = 0 for all x and t. Hence, we are looking for a function of x alone that satisfies
t 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 at one end (say where x = 0 ) and T on the other end (at
1 2
x = L where L is the length of the wire). Then our steady state solution is
T2 − T1
u(x) = x + T1 . (4.9.2)
L
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 space variables is
ut = k(uxx + uyy ), (4.9.3)
2 2
∂ ∂
or more commonly written as u t = kΔu or u
t
2
= k∇ u . Here the Δ and ∇ symbols mean
2
2
+ . We will use Δ from now
∂x ∂y 2
on. The reason for using such a notation is that you can define Δ to be the right thing for any number of space dimensions and then the
heat equation is always u = kΔu . The operator Δ is called the Laplacian.
t
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 Equation 4.9.3 that does not depend on t, or in other words u = 0 . Hence we are looking for a function u(x, y)
t
such that
Δu = uxx + uyy = 0. (4.9.4)
This equation is called the Laplace equation (aamed after the French mathematician Pierre-Simon, marquis de Laplace). 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 x − y 2 2
and xy are harmonic. However, if you remember your multi-variable calculus we note that if u is positive, u is concave up in the x
xx
direction, then u must be negative and u must be concave down in the y direction. Therefore, a harmonic function can never have
yy
any “hilltop” or “valley” on the graph. This observation is consistent with our intuitive idea of steady state heat distribution; the hottest
or coldest spot will not be inside.
Commonly the Laplace equation is part of a so-called Dirichlet problem ( named after the German mathematician Johann Peter Gustav
Lejeune Dirichlet). That is, we have a 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 consider a rectangular region. Also for simplicity we 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, we 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.9.5)
The method we 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.9.9)). We notice that superposition still works for 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 u into the equation to get
′′ ′′
X Y + XY = 0. (4.9.10)
The left hand side only depends on x and the right hand side only depends on y . Therefore, there is some constant λ such that
′′ ′′
−X Y
λ = = . And we get two equations
X Y
′′
X + λX = 0, (4.9.12)
′′
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
2 2
n π
have already seen that we have a nontrivial solution if and only if λ = λ n =
2
and the solution is a multiple of
w
nπ
Xn (x) = sin( x). (4.9.13)
w
For these given λ , the general solution for Y (one for each n) is
n
nπ nπ
Yn (y) = An cosh( y) + Bn sinh( y). (4.9.14)
w w
We only have one condition on Y and hence we can pick one of A or B to be something convenient. It will be useful to have
n n n
nπh
− cosh( )
w
Bn = . (4.9.15)
nπh
sinh( )
w
Observe that
nπ
un (x, 0) = Xn (x)Yn (0) = sin( x). (4.9.17)
w
Suppose
∞
nπx
f(x) = ∑ bn sin( ). (4.9.18)
w
n=1
As u satisfies \Equation ??? – ??? ) and any linear combination (finite or infinite) of u must also satisfy (4.9.5)–(4.9.8), we see that
n n
u must satisfy Equations ??? –??? . By plugging in y = 0 it is easy to see that u satisfies (4.9.9) 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) = ∑ sin(nx). (4.9.20)
n
n=1
n od d
Therefore the solution u(x, y) , see Figure 4.22, to the corresponding Dirichlet problem is given as
∞
4 sinh(n(π − y))
u(x, y) = ∑ sin(nx) ( ). (4.9.21)
n sinh(nπ)
n=1
n od d
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.
A different way to visualize solutions of the Laplace equation is to take a wire and bend it so that it corresponds to the graph of the
temperature above the boundary of your region. Cut a rubber sheet in the shape of your region—a square in our case—and stretch it
fixing the edges of the sheet to the wire. The rubber sheet is a good approximation of the graph of the solution to the Laplace
equation with the given boundary data.
Recall that the polar coordinates for the (x, y) -plane are (r, θ) :
x = r cos θ, y = r sin θ, (4.10.1)
where r ≥ 0 and −π < θ < π . So (x, y) is distance r from the origin at angle θ.
Now that we know our coordinates, let us give the problem we wish to solve. We have a circular region of radius 1, and we are
interested in the Dirichlet problem for the Laplace equation for this region. Let u(r, θ) denote the temperature at the point (r, θ) in
polar coordinates. We have the problem:
Δu = 0, f or r < 1, (4.10.2)
The first issue we face is that we do not know what the Laplacian is in polar coordinates. Normally we would find u and u in terms
xx yy
of the derivatives in r and θ. We would need to solve for r and θ in terms of and y. While this is certainly possible, it happens to
be more convenient to work in reverse. Let us instead compute derivatives in r and θ in terms of derivatives in x and y and then solve.
The computations are easier this way. First
xr = cos θ, xθ = −r sin θ, yr = sin θ, yθ = r cos θ. (4.10.3)
2 2
urr = cos(θ)(uxx xr + uxy yr ) + sin(θ)(uyx xr + uyy yr ) = cos (θ)uxx + 2 cos(θ) sin(θ)uxy + sin (θ)uyy .
Similarly for the θ derivative. Note that we have to use product rule for the second derivative.
uθ = ux xθ + uy yθ = −r sin(θ)ux + r cos(θ)uy , (4.10.5)
2 2 2 2 2
= −r cos(θ)ux − r sin(θ)uy + r sin (θ)uxx − r 2 sin(θ) cos(θ)uxy + r cos (θ)uyy .
r
2
uθθ to get rid of those pesky 2
r . If we add urr and use the fact that
2 2
cos (θ) + sin (θ) = 1 , we get
r
ur . Adding it we obtain the Laplacian in polar coordinates:
1 1
uθθ + ur + urr = uxx + uyy = Δu. (4.10.7)
2
r r
Notice that the Laplacian in polar coordinates no longer has constant coefficients.
Let us put R on one side and Θ on the other and conclude that both sides must be constant.
1 ′′
1 ′ ′′
RΘ = −( R + R ) Θ. (4.10.9)
2
r r
′′ ′ 2 ′′
Θ rR + r R
= − + −λ.
Θ R
2 ′′ ′
r R + rR − λR = 0.
Let us first focus on Θ . We know that u(r, θ) ought to be 2π-periodic in θ, that is, u(r, θ) = u(r, θ + 2π) . Therefore, the solution to
Θ + λΘ = 0 must be 2π-periodic. We conclude that λ = n for a nonnegative integer n = 0, 1, 2, 3, . . . . The equation becomes
′′ 2
Θ + n Θ = 0 . When n = 0 the equation is just Θ = 0 , so we have the general solution Aθ + B . As Θ is periodic, A = 0 . For
′′ 2 ′′
This equation has appeared in exercises before—we solved it in Exercise 2.1.6 and Exercise 2.1.7. The idea is to try a solution r and if s
that does not work out try a solution of the form r ln r . When n = 0 we obtain
s
0 0
R0 = Ar + Br ln r = A + B ln r, (4.10.14)
The function u(r, θ) must be finite at the origin, that is, when r = 0 . Therefore, B = 0 in both cases. Let us set A = 1 in both cases
as well, the constants in Θ will pick up the slack so we do not lose anything. Therefore let
n
n
R0 = 1, and Rn = r . (4.10.16)
Therefore, the solution to (4.1.2) is to expand g(θ) , which is a 2π-periodic function as a Fourier series, and then the nthcoordinate is
multiplied by r . In other words, to compute a and b from the formula we can, as usual, compute
n n n
−π −π
1 1
an = ∫ g(θ) cos(nθ)dθ, and bn = ∫ g(θ) sin(nθ)dθ. (4.10.20)
π π
π π
Example 4.10.1:
Suppose we wish to solve
The solution is
10
u(r, θ) = r cos(10θ). (4.10.22)
See the plot in Figure 4.23. The thing to notice in this example is that the effect of a high frequency is mostly felt at the boundary. In
the middle of the disc, the solution is very close to zero. That is because r rather small when r is close to 0.
10
Figure 4.23: The solution of the Dirichlet problem in the disc with cos(10θ) as boundary data.
Example 4.10.2:
Let us solve a more difficult problem. Suppose we have a long rod with circular cross section of radius 1 and we wish to solve the
steady state heat problem. If the rod is long enough we simply need to solve the Laplace equation in two dimensions. Let us put the
center of the rod at the origin and we have exactly the region we are currently studying—a circle of radius 1. For the boundary
conditions, suppose in Cartesian coordinates x and y , the temperature is fixed at 0 when y < 0 and at 2y when y > 0 .
We set the problem up. As y = r sin(θ) , then on the circle of radius 1 we have 2y = 2 sin(θ) . So
Δu = 0, 0 ≤ r < 1, − π < θ ≤ π, (4.10.23)
2 sin(θ) if 0 ≤ θ ≤ π,
u(1, θ) = { .
0 if − π < θ < 0.
We must now compute the Fourier series for the boundary condition. By now the reader has plentiful experience in computing
Fourier series and so we simply state that
∞
2 −4
u(1, θ) = + sin(θ) + ∑ cos(2nθ). (4.10.24)
2
π π(4 n − 1)
n=1
Exercise 4.10.1:
Compute the series for u(1, θ) and verify that it really is what we have just claimed. Hint: Be careful, make sure not to divide by
zero.
We now simply write the solution (see Figure 4.24 ) by multiplying by r in the right places.
n
PIC
Figure 4.24: The solution of the Dirichlet problem with boundary data 0 for y < 0 and 2y for y > 0 .
While the integral will generally not be solvable analytically, it can be evaluated numerically. In fact, unless the boundary data is given
as a Fourier series already, it will be much easier to numerically evaluate this formula as there is only one integral to evaluate.
The formula also has theoretical applications. For instance, as P (r, θ, α) will have infinitely many derivatives, then via differentiating
under the integral we find that the solution u(r, θ) has infinitely many derivatives, at least when inside the circle, r < 1 . By infinitely
many derivatives what you should think of is that u(r, θ) has “no corners” and all of its partial derivatives exist too and also have “no
corners”.
We will compute the formula for P (r, θ, α) from the series solution, and this idea can be applied anytime you have a convenient series
solution where the coefficients are obtained via integration. Hence you can apply this reasoning to obtain such integral kernels for other
equations, such as the heat equation. The computation is long and tedious, but not overly difficult. Since the ideas are often applied in
similar contexts, it is good to understand how this computation works.
What we do is start with the series solution and replace the coefficients with the integrals that compute them. Then we try to write
everything as a single integral. We must use a different dummy variable for the integration and hence we use α instead of θ.
∞
a0 n n
u(r, θ) = + ∑ an r cos(nθ) + bn r sin(nθ) (4.10.27)
2
n=1
π
1
= ∫ g(α)dα
2π −π
∞ π π
1 n
1 n
+∑( ∫ g(α) cos(nα)dα) r cos(nθ) + ( ∫ g(α) sin(nα)dα) r sin(nθ)
π −π π −π
n=1
π ∞
1
n n
= ∫ (g(α) + 2 ∑ g(α) cos(nα)r cos(nθ) + g(α) sin(nα)r sin(nθ)) dα
2π −π
n=1
π ∞
1 n
= ∫ (1 + 2 ∑ r (cos(nα) cos(nθ) + sin(nα) sin(nθ))) g(α)dα
2π −π
n=1
OK, so we have what we wanted, the expression in the parentheses is the Poisson kernel, P (r, θ, α) . However, we can do a lot better. It
is still given as a series, and we would really like to have a nice simple expression for it. We must work a little harder. The trick is to
rewrite everything in terms of complex exponentials. Let us work just on the kernel.
∞
n
P (r, θ, α) = 1 + 2 ∑ r (cos(nα) cos(nθ) + sin(nα) sin(nθ)) (4.10.28)
n=1
∞
n
= 1 +2 ∑r cos(n(θ − α))
n=1
∞
n in(θ−α) −in(θ−α)
1 + 2 ∑ r (e +e )
n=1
∞ ∞
i(θ−α) n −i(θ−α) n
1 + ∑(re ) + ∑(re ) .
n=1 n=1
In the above expression we recognize the geometric series. That is, recall from calculus that as long as |z| < 1 , then
Note that n starts at 1 and that is why we have the z in the numerator. It is the standard geometric series multiplied by z. Let us continue
with the computation.
∞ ∞
i(θ−α) n −i(θ−α) n
P (r, θ, α) = 1 + ∑(re ) + ∑(re ) (4.10.30)
n=1 n=1
i(θ−α) −i(θ−α)
re re
= 1+ +
i(θ−α) −i(θ−α)
1 − re 1 − re
2
1 −r
=
1 − rei(θ−α) − re−i(θ−α) + r2
2
1 −r
= .
2
1 − 2r cos(θ − α) + r
Now that’s a formula we can live with. The solution to the Dirichlet problem using the Poisson kernel is
π 2
1 1 −r
u(r, θ) = ∫ g(α)dα. (4.10.31)
2
2π −π 1 − 2r cos(θ − α) + r
Sometimes the formula for the Poisson kernel is given together with the constant , in which case we should of course not leave it in
1
2π
front of the integral. Also, often the limits of the integral are given as 0 to 2π; everything inside is 2π-periodic in α, so this does not
change the integral.
Let us not leave the Poisson kernel without explaining its geometric meaning. Let s be the distance from (r, θ) to (1, α) . You may
recall from calculus that this distance s in polar coordinates is given precisely by the square root of 1 − 2r cos(θ − α) + r . That is, 2
One final note we make about the formula is to note that it is really a weighted average of the boundary values. First let us look at what
happens at the origin, that is when r = 0 .
u(0, 0) = (4.10.33)
π 2
1 −0
frac12π ∫ g(α)dα
2
−π 1 − 2(0) cos(θ − α) + 0
π
1
= ∫ g(α)dα.
2π −π
So u(0, 0) is precisely the average value of g(θ) and therefore the average value of u on the boundary. This is a general feature of
harmonic functions, the value at some point p is equal to the average of the values on a circle centered at p.
What the formula says is that the value of the solution at any point in the circle is a weighted average of the boundary data g(θ) . The
kernel is bigger when (r, θ) is closer to (1, α) . Therefore when computing u(r, θ) we give more weight to the values g(α) when
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Exercise 4.1.104: Consider x + λx = 0 and x(0) = 0, x(1) = 0 . Why does it not have any eigenvalues? Why does any first order
′
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 |t| . Extend periodically and compute the Fourier series of f(t) .
3
−1 if − π < t ≤ 0,
f(t) = { (4.E.1)
1 if 0 < t ≤ π.
Exercise 4.2.8: Suppose f(t) is defined on [−π, π] as t . Extend periodically and compute the Fourier series of f(t) .
2
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) = + ∑ an cos(nt) + bn sin(nt). (4.E.2)
2
n=1
imt
f(t) = ∑ cm e . (4.E.3)
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 + ∑ cm e + c−m e . (4.E.4)
m=1
Exercise 4.2.101: Suppose f(t) is defined on [−π, π] as f(t) = sin(t) . Extend periodically and compute the Fourier series.
Exercise 4.2.102: Suppose f(t) is defined on (−π, π] as f(t) = sin(πt) . Extend periodically and compute the Fourier series.
Exercise 4.2.103: Suppose f(t) is defined on (−π, π] as f(t) = sin 2
(t) . Extend periodically and compute the Fourier series.
Exercise 4.2.104: Suppose f(t) is defined on (−π, π] as f(t) = t . Extend periodically and compute the Fourier series.
4
extended periodically. a) Compute the Fourier series for f(t) . b) Write out the series explicitly up to the 3 rd
harmonic.
Exercise 4.3.4. Let
−t if −1 < t ≤ 0,
f(t) = { (4.E.6)
2
t if 0 < t ≤ 1,
extended periodically. a) Compute the Fourier series for f(t) . b) Write out the series explicitly up to the 3 rd
harmonic.
Exercise 4.3.5. Let
−t
⎧
⎪
⎪ if −10 < t ≤ 0,
10
f(t) = ⎨ (4.E.7)
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 3 rd
harmonic.
1
Exercise 4.3.6. Let f(t) = ∑
∞
n=1
cos(nt) . Is f(t) continuous and differentiable everywhere? Find the derivative (if it exists
3
n
everywhere) or justify why f(t) is not differentiable everywhere.
n
∞
(−1)
Exercise 4.3.7. Let f(t) = ∑ n=1
sin(nt) . Is f(t) differentiable everywhere? Find the derivative (if it exists everywhere) or
n
justify why f(t) is not differentiable everywhere.
Exercise 4.3.8. Let
⎧ 0 if − 2 < t ≤ 0,
⎪
extended periodically. a) Compute the Fourier series for f(t) . b) Write out the series explicitly up to the 3 rd
harmonic.
Exercise 4.3.9. Let
t
f(t) = e for − 1 < t ≤ 1 (4.E.9)
extended periodically. a) Compute the Fourier series for f(t) . b) Write out the series explicitly up to the 3 rd
harmonic. c) What does
the series converge to at t = 1 .
Exercise 4.3.10. Let
2
f(t) = t for − 1 < t ≤ 1 (4.E.10)
extended periodically. a) Compute the Fourier series for f(t) . b) By plugging in t = 0 , evaluate
n
(−1) 1 1 1 1 1
∑
∞
n=1
= 1− + −⋯. c) Now evaluate ∑ ∞
n=1
= 1+ + +⋯. .
2 2
n 4 9 n 4 9
extended periodically. a) Compute the Fourier series for f(t) . b) Write out the series explicitly up to the 3 rd
harmonic.
Exercise 4.3.103. Let
∞
1 1
f(t) = +∑ sin(nπt). (4.E.13)
2 n(n2 + 1)
n=1
Compute f ′
(t) .
Exercise 4.3.104. Let
∞
1 1
f(t) = +∑ cos(nt). (4.E.14)
3
2 n )
n=1
π π
extended periodically. a) Compute the Fourier series for f(t) . b) Plug in t = to find a series representation for . c) Using the first
2 4
π
4 terms of the result from part b) approximate .
4
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 .
Exercise 4.4.9: Consider
′′
x (t) + 9x(t) = f(t), (4.E.17)
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 .
′ ′
where f(t) = ∑ ∞
n=1
bn sin(nπt) . Write the solution x(t) as a Fourier series, where the coefficients are given in terms of b . n
3
on 0 ≤ t < 3 . a) Find the Fourier series of the even periodic extension. b) Find the Fourier series of
the odd periodic extension.
Exercise 4.4.102: Let f(t) = cos(2t) on 0 ≤ t < π . a) Find the Fourier series of the even periodic extension. b) Find the Fourier
series of the odd periodic extension.
∞
Exercise 4.4.104: Let f(t) = ∑ . Solve x for the Dirichlet conditions x(0) = 0 and x(π) = 0 .
1 ′′
n=1 2
sin(nt) − x = f(t)
n
∞
Exercise 4.4.105 (challenging): Let f(t) = t + ∑n=1
1
2
n sin(nt) . Solve ′′
x + πx = f(t) for the Dirichlet conditions x(0) = 0
2
+ ∑n=1
1
2
cos(nπt) . Find the steady periodic solution to x
′′
+ 2x = F (t) . Express your solution
n
as a Fourier series.
∞
Exercise 4.5.3: Let F (t) = ∑ n=1
1
3
n
sin(nπt) . 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=1
1
n
2
cos(nπ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 series.
Exercise 4.5.6: Let F (t) = t for −1 < t < 1 and extended periodically. Find the steady periodic solution to x
′′ 2
+ π x = F (t) .
Express your solution as a series.
–
Exercise 4.5.101: Let F (t) = sin(2πt) + 0.1 cos(10πt) . Find the steady periodic solution to x
′′
+ √2x = F (t) . Express your
solution as a Fourier series.
Exercise 4.5.102: Let F (t) = ∑ ∞
n=1
e
−n
cos(2nt) . Find the steady periodic solution to x ′′
+ 3x = F (t) . Express your solution as
a Fourier series.
–
Exercise 4.5.103: Let F (t) = |t| for −1 ≤ t ≤ 1 extended periodically. Find the steady periodic solution to x
′′
+ √3x = F (t) .
Express your solution as a series.
Exercise 4.5.104: Let F (t) = |t| for −1 ≤ t ≤ 1 extended periodically. Find the steady periodic solution to x
′′ 2
+ π x = F (t) .
Express your solution as a series.
u(0, t) = u(1, t) = 0,
ux (0, t) = ux (π, t) = 0,
ux (0, t) = ux (π, t) = 0,
10x
u(x, 0) = f or 0 < x < π.
π
Hint: Use the fact that u(x, t) = 100x is a solution satisfying u t = uxx , u(0, t) = 0, u(1, t) = 100 . Then usesuperposition.
Exercise 4.6.8: Use separation variables to find a nontrivial solution to u xx + 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,
Exercise 4.6.10 (challenging): Suppose that the wire is circular and insulated, so there are no ends. You can think of this as simply
connecting the two ends and making sure the solution matches up at the ends. That is, find a series solution of
ut = kuxx ,
u(0, t) = u(π, t) = 0,
ux (0, t) = ux (π, t) = 0,
y(0, t) = y(1, t) = 0,
1
y(x, 0) = sin(3πx) + sin(6πx) f or 0 < x < 1,
4
y(0, t) = y(1, t) = 0,
1
y(x, 0) = sin(3πx) + sin(6πx) f or 0 < x < 1,
4
Exercise 4.7.5: Derive the solution for a general plucked string of length L, where we raise the string some distance b at the midpoint
and let go, and for any constant a (in the equation y = a y ).
tt
2
xx
Exercise 4.7.6: Imagine that a stringed musical instrument falls on the floor. Suppose that the length of the string is 1 and a = 1 .
When the musical instrument hits the ground the string was in rest position and hence y(x, 0) = 0 . However, the string was moving at
some velocity at impact (t = 0 )), say y (x, 0) = −1 . Find the solution y(x, t) for the shape of the string at time t.
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
y(0, t) = y(1, t) = 0,
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) .
y(0, t) = y(π, t) = 0,
y(0, t) = y(2, t) = 0,
y(0, t) = y(π, t) = 0,
Exercise 4.8.3: Using the d’Alembert solution solve ytt = 2 yxx , 0 < x < 1, t > 0, y(0, t) = y(1, t) = 0, y(x, 0) = sin (πx)
5
,
and y (x, 0) = sin (πx) .
t
3
Exercise 4.8.4: Take y = 4 y , 0 < x < π, t > 0, y(0, t) = y(π, t) = 0, y(x, 0) = x(π − x) , and y (x, 0) = 0 . a) Solve
tt xx t
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 y = a y , 0 < x < π, t > 0, y(0, t) = y(π, t) = 0, y(x, 0) = f(x)
tt
2
xx , and
y (x, 0) = 0 , using the Fourier series solution of the wave equation, by applying an appropriate trigonometric identity.
t
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 y = y (for all x on the real line and t ≥ 0 ), y(x, 0) = f(x) , and y (x, 0), where
tt xx t
⎧ 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 .
D’Alembert solution find the solution at a) t = 0.1 , b) t = 1/2 , c) t = 1 . You may have to split your answer up by cases.
that F (0) = 0, F (1) = 2, F (2) = 3, F (3) = 1 . Using the D’Alembert solution find a) y(1, 1) , b) y(4, 3) , c) y(3, 9) .
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(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,
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) = sin x, u(x, π) = π, u(0, y) = y, u(π, y) = y.
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,
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,
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(0, y) = 0, u(1, y) = 0.
Exercise 4.9.101: Let R be the region described by 0 < x < 1 and 0 < y < 1 . Solve the problem
∞
Δu = 0, u(x, 0) = ∑ sin(nπx), u(x, 1) = 0, u(0, y) = 0, u(1, y) = 0.
n=1
Exercise 4.9.102: Let R be the region described by 0 < x < 1 and 0 < y < 2 . Solve the problem
Δu = 0, u(x, 0) = 0.1 sin(πx), u(x, 2) = 0, u(0, y) = 0, u(1, y) = 0.
2
c) g(θ) = 2 cos(θ + 1) d) g(θ) = sin (θ)
Exercise 4.10.4: Using the Poisson kernel, give the solution to Δu = 0 , where u(1, θ) is zero for θ outside the interval [−π/4, π/4]
and u(1, θ) is 1 for θ on the interval [−π/4, π/4].
Exercise 4.10.5: a) Draw a graph for the Poisson kernel as a function of α when r = 1/2 and θ = 0 . b) Describe what happens to the
graph when you make r bigger (as it approaches 1). c) Knowing that the solution u(r, θ) is the weighted average of g(θ) with Poisson
kernel as the weight, explain what your answer to part b means.
Exercise 4.10.6: Take the function g(θ) to be the function xy = cos(θ) sin(θ) on the boundary. Use the series solution to find a
solution to the Dirichlet problem Δu = 0, u(1, θ) = g(θ) . Now convert the solution to Cartesian coordinates x and y . Is this
solution surprising? Hint: use your trig identities.
Exercise 4.10.7: Carry out the computation we needed in the separation of variables and solve 2
r R
′′ ′ 2
+ rR − n R = 0 , for
n = 0, 1, 2, 3, . . . .
Exercise 4.10.8 (challenging): Derive the series solution to the Dirichlet problem if the region is a circle of radius ρ rather than 1. That
is, solve Δu = 0, u(ρ, θ) = g(θ) .
Exercise 4.10.101: Using series solve Δu = 0, u(1, θ) = 1 + ∑ .
∞ 1
sin(nθ)
n=1 n
2
Exercise 4.10.102: Using the series solution find the solution to Δu = 0, u(1, θ) = 1 − cos(θ) . Express the solution in Cartesian
coordinates (that is, using x and y ).
Exercise 4.10.103: a) Try and guess a solution to Δu = −1, u(1, θ) = 0 . Hint: try a solution that only depends on r. Also first, don’t
worry about the boundary condition. b) Now solve Δu = −1, u(1, θ) = sin(2θ) using superposition.
Exercise 4.10.104 (challenging): Derive the Poisson kernel solution if the region is a circle of radius ρ rather than 1. That is, solve
Δu = 0, u(ρ, θ) = g(θ) .
1 1/8/2020
5.1: STURM-LIOUVILLE PROBLEMS
5.1.1 BOUNDARY VALUE PROBLEMS
We have encountered several different eigenvalue problems such as:
′′
X (x) + λX(x) = 0 (5.1.1)
′ ′
X (0) = 0 X (L) = 0 (Neumann) or,
′
X (0) = 0 X(L) = 0 (Mixed) or,
′
X(0) = 0 X (L) = 0 (Mixed), . . .
For example for the insulated wire, Dirichlet conditions correspond to applying a zero temperature at the ends, Neumann means
insulating the ends, etc…. Other types of endpoint conditions also arise naturally, such as the Robin boundary conditions
′ ′
hX(0) − X (0) = 0 hX(L) + X (L) = 0, (5.1.2)
for some constant h. These conditions come up when the ends are immersed in some medium.
Boundary problems came up in the study of the heat equation u = ku when we were trying to solve the equation by the method of
t xx
separation of variables. In the computation we encountered a certain eigenvalue problem and found the eigenfunctions X (x). We n
then found the eigenfunction decomposition of the initial temperature f(x) = u(x, 0) in terms of the eigenfunctions
∞
n=1
Once we had this decomposition and found suitable T (t) such that n Tn (0) = 1 and Tn (t)X(x) were solutions, the solution to the
original problem including the initial condition could be written as
∞
n=1
We will try to solve more general problems using this method. First, we will study second order linear equations of the form
d dy
(p(x) ) − q(x)y + λr(x)y = 0. (5.1.5)
dx dx
x
to obtain
2 2
1 n d dy n
2 ′′ ′ 2 2 ′′ ′
(x y + x y + (λ x − n )y) = x y + y + (λx − )y= (x )− y + λxy = 0. (5.1.7)
x x dx dx x
′
α1 y(a) − α2 y (a) = 0,
′
β1 y(b) + β2 y (b) = 0.
In particular, we seek λs that allow for nontrivial solutions. The λs that admit nontrivial solutions are called the eigenvalues and the
corresponding nontrivial solutions are called eigenfunctions. The constants α and α should not be both zero, same for β and β .
1 2 1 2
such that
lim λn = +∞ (5.1.10)
n→∞
and such that to each λ there is (up to a constant multiple) a single eigenfunction y
n n (x) .
Moreover, if q(x) ≥ 0 and α 1 , α2 , β1 , β2 ≥ 0 , then λ n ≥ 0 for all n.
Problems satisfying the hypothesis of the theorem are called regular Sturm-Liouville problems and we will only consider such
problems here. That is, a regular problem is one where p(x), p (x), q(x) and r(x) are continuous, p(x) > 0 , r(x) > 0 , q(x) ≥ 0 ,
′
and α , α , β , β ≥ 0 . Note: Be careful about the signs. Also be careful about the inequalities for r and p, they must be strict for all
1 2 1 2
x!
When zero is an eigenvalue, we usually start labeling the eigenvalues at 0 rather than at 1 for convenience.
Example 5.1.2:
The problem y
′′
+ λy, 0 < x < L, y(0) = 0 , and y(L) = 0 is a regular Sturm-Liouville problem.
2 2
p(x) = 1, q(x) = 0, r(x) = 1 , and we have p(x)1 > 0 and r(x)1 > 0 . The eigenvalues are λn =
n π
2
and eigenfunctions
L
L
x) . All eigenvalues are nonnegative as predicted by the theorem.
Exercise 5.1.1:
Find eigenvalues and eigenfunctions for
′′ ′ ′
y + λy = 0, y (0) = 0, y (1) = 0. (5.1.11)
Identify the p, q, r, αj , βj . Can you use the theorem to make the search for eigenvalues easier? (Hint: Consider the condition
′
−y (0) = 0 )
Example 5.1.3:
Find eigenvalues and eigenfunctions of the problem
′′
y + λy = 0, 0 < x < 1, (5.1.12)
′ ′
hy(0) − y (0) = 0, y (1) = 0, h > 0.
Exercise 5.1.2:
Identify p, q, r, α j, βj in the example above.
First note that λ ≥ 0 by Theorem 5.1.1. Therefore, the general solution (without boundary conditions) is
− −
y(x) = A cos(√λ x) + B sin(√λ x) if λ > 0, (5.1.13)
y(x) = Ax + B if λ = 0. (5.1.14)
Let us see if λ = 0 is an eigenvalue: We must satisfy 0 = hB − A and A = 0 , hence B = 0 (as h > 0 ), therefore, 0 is not an
eigenvalue (no nonzero solution, so no eigenfunction).
Now let us try h > 0 . We plug in the boundary conditions.
−
0 = hA − √λ B, (5.1.15)
− − − −
0 = −A√λ sin(√λ ) + B√λ cos(√λ ).
− − − −
If A = 0 , then B = 0 and vice-versa, hence both are nonzero. So B = hA
, and 0 = −A√λ sin(√λ) + hA
√λ cos(√λ ) . As
√λ √λ
A ≠ 0 we get
− − −
0 = −√λ sin(√λ ) + h cos(√λ ), (5.1.16)
or
Now use a computer to nd λ . There are tables available, though using a computer or a graphing calculator is far more convenient
n
nowadays. Easiest method is to plot the functions and tan(x) and see for which they intersect. There is an innite number of
h
x
−− −−
intersections. Denote by √λ1 the rst intersection, by √λ the second intersection, etc…. For example, when h = 1 , we get that
2
−− −−
√λ1 ≈ 0.86, √λ2 ≈ 3.43, . . . . That is y ≈ 0.74, y ≈ 11.73, . . . , …. A plot for
1 2 h = 1 is given in Figure 5.1. The
appropriate eigenfunction (let A = 1 for convenience, then B = ) is h
√λ
−− h −−
yn (x) = cos(√λn x) + −− sin(√λn x). (5.1.18)
√λn
PIC
x
and tan x .
5.1.2 ORTHOGONALITY
We have seen the notion of orthogonality before. For example, we have shown that sin(nx) are orthogonal for distinct n on [0, π].
For general Sturm-Liouville problems we will need a more general setup. Let r(x) be a weight function(any function, though
generally we will assume it is positive) on [a, b]. Two functions f(x) , g(x) are said to be orthogonal with respect to the weight
function r(x) when
b
∫ f(x)g(x)r(x)dx = 0. (5.1.20)
a
and then say f and g are orthogonal whenever ⟨f, g⟩ = 0 . The results and concepts are again analogous to nite dimensional linear
algebra.
The idea of the given inner product is that those x where r(x) is greater have more weight. Nontrivial (nonconstant) r(x) arise
naturally, for example from a change of variables. Hence, you could think of a change of variables such that dξ = r(x)dx .
We have the following orthogonality property of eigenfunctions of a regular Sturm-Liouville problem.
Theorem 5.1.2. Suppose we have a regular Sturm-Liouville problem
d dy
(p(x) ) − q(x)y + λr(x)y = 0, (5.1.22)
dx dx
′
α1 y(a) − α2 y (a) = 0,
′
β1 y(b) + β2 y (b) = 0.
Let y and y be two distinct eigenfunctions for two distinct eigenvalues λ and λ . Then
j k j k
that is, y and y are orthogonal with respect to the weight function r.
j k
Proof is very similar to the analogous theorem from § 4.1. It can also be found in many books including, for example, Edwards and
Penney [EP].
′
α1 y(a) − α2 y (a) = 0,
′
β1 y(b) + β2 y (b) = 0,
′
α1 y(a) − α2 y (a) = 0,
′
β1 y(b) + β2 y (b) = 0,
n=1
where y (x) the eigenfunctions. We wish to nd out if we can represent any function f(x) in this way, and if so, we wish to calculate
n
(and of course we would want to know if the sum converges). OK, so imagine we could write f(x) as (5.1.24). We will assume
convergence and the ability to integrate the series term by term. Because of orthogonality we have
b
∞ b
= ∑ cn ∫ yn (x)ym (x)r(x)dx
n=1 a
Hence,
b
⟨f, ym ⟩ ∫ f(x)ym (x)r(x)dx
a
cm = = . (5.1.28)
b
⟨ym , ym ⟩ ∫
2
(ym (x)) r(x)dx
a
Note that ym are known up to a constant multiple, so we could have picked a scalar multiple of an eigenfunction such that
− −−−−− −
⟨ym , ym ⟩ = 1 (if we had an arbitrary eigenfunction y~ , divide it by √⟨y~ , y~ ⟩). When ⟨y , y ⟩ = 1 we have the simpler form
m m m m m
cm = ⟨f, ym ⟩ as we did for the Fourier series. The following theorem holds more generally, but the statement given is enough for our
purposes.
Theorem 5.1.4. Suppose f is a piecewise smooth continuous function on . If y , y , … are the eigenfunctions of a regular Sturm-
1 2
Liouville problem, then there exist real constants c , c , … given by (5.1.26) such that (5.1.24) converges and holds for a < x < b .
1 2
Example 5.1.4:
Take the simple Sturm-Liouville problem
′′
π
y + λy = 0, 0 < x < , (5.1.29)
2
π
′
y(0) = 0, y ( ) = 0.
2
− −π
Plugging in the boundary conditions we get 0 = y(0) = A and ′
0 = y (π/2) = √λ B cos(√λ )
2
. B cannot be zero and hence
− − −−π
= 0) . This means that √λ must be an odd integral multiple of , i.e. (2n − 1) . Hence
π π π π
cos(√λ = √λn
2 2 2 2 2
2
λn = (2n − 1 ) . (5.1.31)
Finally we compute
π
2 π
2
∫ (sin((2n − 1)x)) dx = . (5.1.33)
0
4
n=1
where
π
2
⟨f, yn ⟩ ∫ sin((2n − 1)x)dx 4
0
cn = = π
= ∫ f(x) sin((2n − 1)x)dx. (5.1.35)
⟨yn , yn ⟩ 2 2
π
∫ (sin((2n − 1)x)) dx
0
Note that the series converges to an odd 2π-periodic (not π -periodic!) extension of f(x) .
Exercise 5.1.3
In the above example, the function is dened on 0 < x < π/2 , yet the series converges to an odd 2π-periodic extension of f(x) .
Find out how is the extension dened for π/2 < x < π .
1
Named after the French mathematicians Jacques Charles François Sturm (1803–1855) and Joseph Liouville (1809–1882).
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
We note that we want T + λa T = 0 . Let us assume that λ > 0 . We can argue that we expect vibration and not exponential growth
′′ 4
nor decay in the t direction (there is no friction in our model for instance). Similarly λ = 0 will not occur.
Exercise 5.2.1:
Try to justify λ > 0 just from the equations.
Write ω = λ , so that we do not need to write the fourth root all the time. For
4
X we get the equation X
(4) 4
−ω X = 0 . The
general solution is
ωx −ωx
X(x) = Ae + Be + C sin(ωx) + D cos(ωx). (5.2.4)
Now 0 = X(0)A + B + D, 0 = X ′′ 2
(0) = ω (A + B − D) . Hence, D = 0 and A + B = 0 , or B = −A . So we have
ωx −ωx
X(x) = Ae − Ae + C sin(ωx). (5.2.5)
Also 0 = X(1) = A(e − e ) + C sin ω , and 0 = X (1) = Aω (e − e ) − Cω sin ω . This means that C sin ω = 0
ω −ω ′′ 2 ω −ω 2
and A(e − e ) = 2A sinh ω = 0 . If ω > 0 , then ω ≠ 0 and so A = 0 . This means that C ≠ 0 otherwise λ is not an
ω −ω
eigenvalue. Also ω must be an integer multiple of π. Hence ω = nπ and n ≥ 1 (as ω > 0 ). We can take C = 1 . So the
eigenvalues are λ = n π and the eigenfunctions are sin(nπx).
n
4 4
Now T + n π a T = 0 . The general solution is T (t) = A sin(n π a t) + B cos(n π a t) . But T (0) = 0 and hence we
′′ 4 4 4 2 2 2 2 2 2 ′
must have A = 0 and we can take B = 1 to make T (0) = 1 for convenience. So our solutions are T (t) = cos(n π a t) . n
2 2 2
As the eigenfunctions are just sines again, we can decompose the function f(x) on 0 < x < 1 using the sine series. We nd
numbers b such that for 0 < x < 1 we have
n
n=1
2 2 2
y(x, t) = ∑ bn Xn (x)Tn (t) = ∑ bn sin(nπx) cos(n π a t). (5.2.7)
n=1 n=1
The point is that X T is a solution that satises all the homogeneous conditions (that is, all conditions except the initial position).
n n
∞ ∞ ∞
frequency π a , so we get a nice musical note. The exact frequencies and their amplitude are what we call the timbre of the note.
2 2
The timbre of a beam is different than for a vibrating string where we get “more” of the lower frequencies since we get all integer
multiples, 1, 2, 3, 4, 5, …. For a steel beam we get only the square multiples 1, 4, 9, 16, 25, …. That is why when you hit a steel
beam you hear a very pure sound. The sound of a xylophone or vibraphone is, therefore, very different from a guitar or piano.
Example 5.2.1:
x(x−1)
Let us assume that f(x) = 10
. On 0 < x < 1 we have (you know how to do this by now)
∞
4
f(x) = ∑ sin(nπx). (5.2.9)
3 3
5π n
n=1
n od d
Hence, the solution to (5.2.2) with the given initial position f(x) is
∞
4 2 2 2
y(x, t) = ∑ sin(nπx) cos(n π a t). (5.2.10)
3 3
5π n
n=1
n od d
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
y(0, t) = 0, y(L, t) = 0,
where A and B were determined by the initial conditions. The natural frequencies of the system are the (circular) frequencies
n n
nπa
for integers n ≥ 1 .
But these are free vibrations. What if there is an external force acting on the string. Let us assume say air vibrations (noise), for
example a second string. Or perhaps a jet engine. For simplicity, assume nice pure sound and assume the force is uniform at every
position on the string. Let us say F (t) = F cos(ωt) as force per unit mass. Then our wave equation becomes (remember force is
0
That is, the string is initially at rest. First we nd a particular solution y of (5.3.3) that satises y(0, t) = y(L, t) = 0 . We dene the
p
functions f and g as
∂yp
f(x) = −yp (x, 0), g(x) = − (x, 0). (5.3.5)
∂t
We then nd solution y of (5.3.1). If we add the two solutions, we nd that y = y
c c + yp solves (5.3.3) with the initial conditions.
Exercise 5.3.1:
Check that y = y c + yp solves (5.3.3) and the side conditions (5.3.4).
So the big issue here is to nd the particular solution y . We look at the equation and we make an educated guess
p
We plug in to get
2 2 ′′
−ω X cos(ωt) = a X cos(ωt), (5.3.7)
or −ωX = a X + F
2 ′′
after canceling the cosine. We know how to nd a general solution to this equation (it is a
0
F0 ωL ωL F0
0 = X(L) = cos( ) + B sin( )− . (5.3.10)
2 2
ω a a ω
a
) is not zero we can solve for B to get
ωL
−F0 (cos( ) − 1)
a
B = . (5.3.11)
2 ωL
−ω sin( )
a
Therefore,
ωL
F0 ω cos( )−1 ω
a
X(x) = (cos( x) − sin( x) − 1) . (5.3.12)
2 ωL
ω a sin( ) a
a
ωL
F0 ω cos( )−1 ω
a
yp (x, t) = (cos( x) − sin( x) − 1) cos(ωt). (5.3.13)
2 ωL
ω a sin( ) a
a
Exercise 5.3.2:
Check that y works.
p
a
) = 0 . What this means is that ω is equal to one of the natural
frequencies of the system, i.e. a multiple of . We notice that if is not equal to a multiple of the base frequency, but is very
πa
ω
L
close, then the coefficient in (5.3.11) seems to become very large. But let us not jump to conclusions just yet. When
nπa
B ω =
L
a
) = 1 and hence we really get that B = 0 . So resonance occurs only when both cos(
ωL
a
) = −1 and
. That is when ω = for odd n.
ωL nπa
sin( ) = 0
a L
We could again solve for the resonance solution if we wanted to, but it is, in the right sense, the limit of the solutions as ω gets close
to a resonance frequency. In real life, pure resonance never occurs anyway.
The above calculation explains why a string will begin to vibrate if the identical string is plucked close by. In the absence of friction
this vibration would get louder and louder as time goes on. On the other hand, you are unlikely to get large vibration if the forcing
frequency is not close to a resonance frequency even if you have a jet engine running close to the string. That is, the amplitude will
not keep increasing unless you tune to just the right frequency.
Similar resonance phenomena occur when you break a wine glass using human voice (yes this is possible, but not easy2) if you
happen to hit just the right frequency. Remember a glass has much purer sound, i.e. it is more like a vibraphone, so there are far
fewer resonance frequencies to hit.
When the forcing function is more complicated, you decompose it in terms of the Fourier series and apply the above result. You
may also need to solve the above problem if the forcing function is a sine rather than a cosine, but if you think about it, the solution
is almost the same.
Example 5.3.1:
Let us do the computation for specic values. Suppose F 0 = 1 and ω = 1 and L = 1 and a = 1 . Then
cos(1) − 1
yp (x, t) = (cos(x) − sin(x) − 1) cos(t). (5.3.14)
sin(1)
cos(1)−1
Write B = sin(1)
for simplicity.
Then plug in t = 0 to get
f(x) = −yp (x, 0) = − cos x + B sin x + 1, (5.3.15)
∂y
and after differentiating in t we see that g(x) = − P
∂t
(x, 0) = 0 .
Hence to nd y we need to solve the problem
c
y(0, t) = 0, y(1, t) = 0,
yt (x, 0) = 0.
Note that the formula that we use to dene y(x, 0) is not odd, hence it is not a simple matter of plugging in to apply the
D’Alembert formula directly! You must dene F to be the odd, 2-periodic extension of y(x, 0) . Then our solution would look like
F (x + t) + F (x − t) cos(1) − 1
y(x, t) = + (cos(x) − sin(x) − 1) cos(t). (5.3.17)
2 sin(1)
PIC
It is not hard to compute specific values for an odd extension of a function and hence (5.3.17) is a wonderful solution to the problem.
For example it is very easy to have a computer do it, unlike a series solution. A plot is given in Figure 5.4
where T is the yearly mean temperature, and t = 0 is midsummer (you can put negative sign above to make it midwinter if you
0
wish). A gives the typical variation for the year. That is, the hottest temperature is T + A and the coldest is T − A . For
0 0 0 0 0
simplicity, we will assume that T = 0 . The frequency ω is picked depending on the units of t, such that when t = 1 , then ωt = 2π .
0
We will employ the complex exponential here to make calculations simpler. Suppose we have a complex valued function
iωt
h(x, t) = X(x)e . (5.3.21)
We will look for an h such that Reh = u . To nd an h, whose real part satises (5.3.20), we look for an h such that
iωt
ht = khxx, h(0, t) = A0 e . (5.3.22)
Exercise 5.3.3:
Suppose h satises (5.3.22). Use Euler’s formula for the complex exponential to check that u = Reh satises (5.3.20).
Hence,
′′
kX − iωX = 0, (5.3.24)
or
′′ 2
X − α X = 0, (5.3.25)
−− −−
where α = ±√ iω
. Note that ±√i = ± 1=i
so you could simplify to α = ±(1 + i)√ ω
. Hence the general solution is
k √2 2k
ω ω
−(1+i) √ x (1+i) √ x
2k 2k
X(x) = Ae + Be . (5.3.26)
We assume that an X(x) that solves the problem must be bounded as x → ∞ since u(x, t) should be bounded (we are not
worrying about the earth core!). If you use Euler’s formula to expand the complex exponentials, you will note that the second term
will be unbounded (if B ≠ 0 ), while the rst term is always bounded. Hence B = 0 .
Exercise 5.3.4:
ω ω
(1+i) √ x −(1+i) √ x
Use Euler’s formula to show that e 2k
is unbounded as x → ∞ , while e 2k
is bounded as x → ∞ .
Furthermore, X(0) = A since h(0, t) = A
0 0e
iωt
. Thus A = A . This means that
0
ω ω ω ω
−(1+i) √ x −(1+i) √ x+iωt −√ x i(ωt−√ x)
2k iωt 2k 2k 2k
h(x, t) = A0 e e = A0 e = A0 e e . (5.3.27)
We will need to get the real part of h, so we apply Euler’s formula to get
ω
−−−− −−−−
−√ x ω ω
2k
h(x, t) = A0 e (cos(ωt − √ x) + i sin(ωt − √ x)) . (5.3.28)
2k 2k
Then nally
ω
−−
−
−√ x ω
2k
u(x, t) = Reh(x, t) = A0 e cos(ωt − √ x). (5.3.29)
2k
Yay!
−−
Notice the phase is different at different depths. At depth the phase is delayed by x√
ω
2k
. For example in cgs units (centimeters-
grams-seconds) we have k = 0.005 (typical value for soil), ω = second2sπin-ayear = 31,525π7,341 ≈ 1.99 × 10−7. Then if we compute where the
−−
phase shift x √ we nd the depth in centimeters where the seasons are reversed. That is, we get the depth at which summer is
ω
= π
2k
the coldest and winter is the warmest. We get approximately 700 centimeters, which is approximately 23 feet below ground.
Be careful not to jump to conclusions. The temperature swings decay rapidly as you dig deeper. The amplitude of the temperature
ω
−√ x
swings is A e0 . This function decays very quickly as x (the depth) grows. Let us again take typical parameters as above. We
2k
will also assume that our surface temperature swing is ±15 Celsius, that is, A = 15 . Then the maximum temperature variation at
∘
0
You need not dig very deep to get an effective “refrigerator,” with nearly constant temperature. That is why wines are kept in a cellar;
you need consistent temperature. The temperature differential could also be used for energy. A home could be heated or cooled by
taking advantage of the above fact. Even without the earth core you could heat a home in the winter and cool it in the summer. The
earth core makes the temperature higher the deeper you dig, although you need to dig somewhat deep to feel a difference. We did not
take that into account above.
2Mythbusters, episode 31, Discovery Channel, originally aired may 18th 2005.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Exercise 5.1.5: Expand the function f(x) = x on 0 ≤ x ≤ 1 using the eigenfunctions of the system
′′ ′
y + λy = 0, y (0) = 0, y(1) = 0. (5.E.2)
Exercise 5.1.6: Suppose that you had a Sturm-Liouville problem on the interval [0, 1] and came up with y n (x) = sin(γnx) , where
γ > 0 is some constant. Decompose f(x) = x, 0 < x < 1 , in terms of these eigenfunctions.
This problem is not a Sturm-Liouville problem, but the idea is the same.
Exercise 5.1.8 (more challenging): Find eigenvalues and eigenfunctions for
d x ′ x
(e y ) + λ e y = 0, y(0) = 0, y(1) = 0. (5.E.4)
dx
Hint: First write the system as a constant coefficient system to nd general solutions. Do note that Theorem 5.1.1 guarantees λ ≥ 0 .
Exercise 5.1.101: Find eigenvalues and eigenfunctions of
′′
y + λy = 0, y(−1) = 0, y(1) = 0. (5.E.5)
Exercise 5.1.102: Put the following problems into the standard form for Sturm-Liouville problems, that is, nd
p(x), q(x), r(x), α , α β , β , , and decide if the problems are regular or not.
1 , 1 1
a) x y
′′
+ λy = 0 for 0 < x < 1, y(0) = 0, y(1) = 0,
b) (1 + x )y
2 ′′ ′
+ 2x y + (λ − x )y = 0
2
for −1 < x < 1, y(−1) = 0, y(1) + y ′
(1) = 0
the initial shape of the beam is the graph of x(5 − x) , and the initial velocity is uniformly equal to 2 (same for each x) in the positive
y direction. Set up the equation together with the boundary and initial conditions. Just set up, do not solve.
Exercise 5.2.3: Suppose you have a beam of length 5 with one end free and one end xed (the xed end is at x = 5 ). Let u be the
longitudinal deviation of the beam at position x on the beam (0 < x < 5) . You know that the constants are such that this satises the
−(x−5)
equation u = 4 u . Suppose you know that the initial displacement of the beam is
tt xx , and the initial velocity is x−5
50 100
in the
positive u direction. Set up the equation together with the boundary and initial conditions. Just set up, do not solve.
Exercise 5.2.4: Suppose the beam is L units long, everything else kept the same as in (5.2.2). What is the equation and the series
solution?
Exercise 5.2.5: Suppose you have
4
a yxxxx + ytt = 0 (0 < x < 1, t > 0), (5.E.6)
That is, you have also an initial velocity. Find a series solution. Hint: Use the same idea as we did for the wave equation.
Exercise 5.2.101: Suppose you have a beam of length 1 with hinged ends. Let y be the transverse deviation of the beam at position x
on the beam (0 < x < 1 ). You know that the constants are such that this satises the equation y + 4 y = 0 . Suppose you know tt xxxx
know that the initial shape of the beam is the graph of sin(πx) , and the initial velocity is uniformly equal to x(10 − x) . Set up the
equation together with the boundary and initial conditions. Just set up, do not solve.
Exercise 5.3.6: Take the forced vibrating string. Suppose that L = 1, a = 1 . Suppose that the forcing function is the square wave that
is 1 on the interval 0 < x < 1 and −1 on the interval −1 < x < 0 . Find the particular solution. Hint: You may want to use result of
Exercise 5.3.5.
Exercise 5.3.7: The units are cgs (centimeters-grams-seconds). For k = 0.005, ω = 1.991 × 10 −7
, A0 = 20 . Find the depth at
which the temperature variation is half (±10 degrees) of what it is on the surface.
Exercise 5.3.8: Derive the solution for underground temperature oscillation without assuming that T 0 = 0 .
Exercise 5.3.101: Take the forced vibrating string. Suppose that L = 1, a = 1 . Suppose that the forcing function is a sawtooth, that is
|x| −
1
2
on −1 < x < 1 extended periodically. Find the particular solution.
Exercise 5.3.102: The units are cgs (centimeters-grams-seconds). For k = 0.01, ω = 1.991 × 10
−7
, A0 = 25 . Find the depth at
which the summer is again the hottest point.
6.3: CONVOLUTION
The Laplace transformation of a product is not the product of the transforms. Instead, we introduce the convolution of two functions
of t to generate another function of t.
1 1/8/2020
6.1: THE LAPLACE TRANSFORM
In this chapter we will discuss the Laplace transform. The Laplace transform turns out to be a very efficient method to solve certain
ODE problems. In particular, the transform can take a differential equation and turn it into an algebraic equation. If the algebraic
equation can be solved, applying the inverse transform gives us our desired solution. The Laplace transform also has applications in the
analysis of electrical circuits, NMR spectroscopy, signal processing, and elsewhere. Finally, understanding the Laplace transform will
also help with understanding the related Fourier transform, which, however, requires more understanding of complex numbers.
We can think of t as time and f(t) as incoming signal. The Laplace transform will convert the equation from a differential equation in
time to an algebraic (no derivatives) equation, where the new independent variable s is the frequency.
We can think of the Laplace transform as a black box that eats functions and spits out functions in a new variable. We write
L{f(t)} = F (s) for the Laplace transform of f(t) . It is common to write lower case letters for functions in the time domain and
upper case letters for functions in the frequency domain. We use the same letter to denote that one function is the Laplace transform of
the other. For example F (s) is the Laplace transform of f(t) . Let us define the transform.
∞
def −st
L{f(t)} = F (s) = ∫ e f(t) dt. (6.1.2)
0
We note that we are only considering t ≥ 0 in the transform. Of course, if we think of t as time there is no problem, we are generally
interested in finding out what will happen in the future (Laplace transform is one place where it is safe to ignore the past). Let us
compute some simple transforms.
Example 6.1.1
Suppose f(t) = 1 , then
∞ −st ∞ −st h −sh
e e e 1 1
−st
L{1} = ∫ e dt = [ ] = lim [ ] = lim ( − ) = . (6.1.3)
0
−s h→∞ −s h→∞ −s −s s
t=0 t=0
The limit (the improper integral) only exists if s > 0 . So L{1} is only defined for s > 0 .
Example 6.1.2
Suppose f(t) = e −at
) , then
∞
∞ ∞ −(s+a)t
e 1
−at −st −at −(s+a)t
L{ e } = ∫ e e dt = ∫ e dt = [ ] = . (6.1.4)
0 0 −s(s + a) s+a
t=0
Example 6.1.3
Suppose f(t) = t , then using integration by parts
∞
−st
L{t} = ∫ e tdt (6.1.5)
0
−st ∞
∞
−te 1
−st
= [ ] + inf e dt
s s 0
t=0
−st ∞
1 e
= 0+ [ ]
s −s
t=0
1
= .
s2
Let us find the Laplace transform of u(t − a) , where a ≥ 0 is some constant. That is, the function that is 0 for t < a and 1 for
t ≥ a.
−as
∞ ∞ −st e
−st −st
e
L{u(t − a)} = ∫ e u(t − a)dt = ∫ e dt = [ ] , (6.1.7)
0 a
−s
t=a
By applying similar procedures we can compute the transforms of many elementary functions. Many basic transforms are listed in
Table 6.1.
Table 6.1: Some Laplace transforms (C, ω , and a are constants).
f(t) {f(t)}
C C
t 1
t
2 2
3
s
t
3 6
4
s
n
t n!
s +1
s
e
−at 1
s+a
ω
sin(ωt)
2 2
s +ω
s
cos(ωt)
2 2
s +ω
ω
sinh(ωt)
2 2
s −ω
s
cosh(ωt)
2 2
s −ω
−as
u(t − a) e
Exercise 6.1.1
Verify all the entries in Table 6.1.
Since the transform is defined by an integral. We can use the linearity properties of the integral. For example, suppose C is a
constant, then
∞ ∞
−st −st
L{f(t)} = ∫ e Cf(t) dt = C ∫ e f(t) dt = CL{f(t)}. (6.1.8)
o 0
So we can “pull out” a constant out of the transform. Similarly we have linearity. Since linearity is very important we state it as a
theorem.
and in particular
L{Cf(t)} = CL{f(t)}. (6.1.10)
Exercise 6.1.2
It must also be noted that not all functions have a Laplace transform. For example, the function 1/t does not have a Laplace transform
2
as the integral diverges for all s. Similarly, tan t or e do not have Laplace transforms.
t
ct
|f(t)| ≤ M e , (6.1.12)
for some constants M and c , for sufficiently large t (say for all t > t for some t ). The simplest way to check this condition is to try
o o
and compute
f(t)
lim (6.1.13)
t→∞ ct
e
If the limit exists and is finite (usually zero), then f(t) is of exponential order.
Exercise 6.1.3
Use L'Hopital's rule from calculus to show that a polynomial is of exponential order. Hint: Note that a sum of two exponential order
functions is also of exponential order. Then show that t is of exponential order for any n.
n
For an exponential order function we have existence and uniqueness of the Laplace transform.
Let s > c , or in other words (c − s) < 0 . By the comparison theorem from calculus, the improper integral dening L{f(t)}
exists if the following integral exists
∞
∞ ∞ (c−s)t
e M
−st ct (c−s)t
∫ e (M e )dt = M ∫ e dt = M [ ] = . (6.1.14)
0 0
c −s c −s
t=0
The transform also exists for some other functions that are not of exponential order, but that will not be relevant to us. Before dealing
with uniqueness, let us note that for exponential order functions we obtain that their Laplace transform decays at infinity:
lim F (s) = 0 (6.1.15)
s→∞
Both theorems hold for piecewise continuous functions as well. Recall that piecewise continuous means that the function is continuous
except perhaps at a discrete set of points where it has jump discontinuities like the Heaviside function. Uniqueness however does not
“see” values at the discontinuities. So we can only conclude that F (s) = G(s) outside of discontinuities. For example, the unit step
function is sometimes defined using u(0) = 1/2 . This new step function, however, has the exact same Laplace transform as the one
we defined earlier where u(0) = 1 .
There is an integral formula for the inverse, but it is not as simple as the transform itself—it requires complex numbers and path
integrals. For us it will suffice to compute the inverse using Table 6.1.
Example 6.1.5
1
Find the inverse Laplace transform of F (s) =
s+1
Solution
We look at the table to find
1
−1 −t
L { } = e (6.1.17)
s+1
As the Laplace transform is linear, the inverse Laplace transform is also linear. That is,
−1 −1 −1
L {AF (s) + BG(s)} = AL {F (s)} + BL {G(s)} (6.1.18)
Example 6.1.6
Find the inverse Laplace transform of
2
s +s+1
F (s) = . (6.1.19)
s3 + s
Solution
First we use the method of partial fractions to write F in a form where we can use Table 6.1. We factor the denominator as
s(s + 1) and write
2
2
s +s+1 A Bs + C
= + (6.1.20)
3 2
s +s s s +1
Putting the right hand side over a common denominator and equating the numerators we get
A(s
2
+ 1) + s(Bs + C) = s
2
+s+1 . Expanding and equating coefficients we obtain A + B = 1 , C = 1 , A = 1 and thus
B = 0 . In other words,
2
s +s+1 1 1
F (s) = = + (6.1.21)
3 2
s +s s s +1
Exercise 6.1.4
Derive the first shifting property from the definition of the Laplace transform.
The shifting property can be used, for example, when the denominator is a more complicated quadratic that may come up in the
method of partial fractions. We complete the square and write such quadratics as (s + a) + b and then use the shifting property. 2
Example 6.1.7
Solution
First we complete the square to make the denominator (s + 2 ) 2
+4 . Next we find
1 1
L{ } = sin(2t). (6.1.25)
2
s +4 2
1 1 1 −2t
L{ } = L{ } = e sin(2t). (6.1.26)
2 2
s + 4s + 8 (s + 2 ) +4 2
In general, we want to be able to apply the Laplace transform to rational functions, that is functions of the form
F (s)
(6.1.27)
G(s)
where F (s) and G(s) are polynomials. Since normally, for the functions that we are considering, the Laplace transform goes to zero
as s → ∞ , it is not hard to see that the degree of F (s) must be smaller than that of G(s) . Such rational functions are called proper
rational functions and we can always apply the method of partial fractions. Of course this means we need to be able to factor the
denominator into linear and quadratic terms, which involves finding the roots of the denominator,
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
1. Just like the Laplace equation and the Laplacian, the Laplace transform is also named after Pierre-Simon, marquis de Laplace (1749
– 1827).
2. The function is named after the English mathematician, engineer, and physicist Oliver Heaviside (1850–1925). Only by coincidence
is the function “heavy” on “one side.”
∞ ∞
′ −st ′ −st ∞ −st
L{ g (t)} = ∫ e g (t)dt = [ e g(t)] −∫ (−s)e g(t)dt = −g(0) + sL{g(t)}. (6.2.1)
t=0
0 0
We repeat this procedure for higher derivatives. The results are listed in Table 6.2. The procedure also works for piecewise smooth
functions, that is functions that are piecewise continuous with a piecewise continuous derivative. The fact that the function is of
exponential order is used to show that the limits appearing above exist. We will not worry much about this fact.
Table 6.2: Laplace transforms of derivatives (G(s) = L{g(t)} as usual).
f(t) L{f(t)} = F (s)
′
g (t) sG(s) − g(0)
′′ 2 ′
g (t) s G(s) − sg(0) − g (0)
′′′ 3 2 ′ ′′
g (t) s G(s) − s g(0) − sg (0) − g (0)
Example 6.2.1:
Take the equation
′′ ′
x (t) + x(t) = cos(2t), x(0) = 0, x (0) = 1. (6.2.2)
We will take the Laplace transform of both sides. By X(s) we will, as usual, denote the Laplace transform of x(t).
′′
L{ x (t) + x(t)} = L{cos(2t)}, (6.2.3)
s
2 ′
s X(x) − sx(0) + x (0) + X(s) + .
2
s +4
We plug in the initial conditions now—this makes the computations more streamlined—to obtain
2
s
s X(s) − 1 + X(s) = . (6.2.4)
2
s +4
The procedure for linear constant coefficient equations is as follows. We take an ordinary differential equation in the time variable t.
We apply the Laplace transform to transform the equation into an algebraic (non differential) equation in the frequency domain. All the
x(t), x (t) , x (t), and so on, will be converted to X(s), sX(s) − x(0) , s X(s) − sx(0) − x (0) , and so on. We solve the
′ ′′ 2 ′
equation for X(s). Then taking the inverse transform, if possible, we find x(t).
It should be noted that since not every function has a Laplace transform, not every equation can be solved in this manner. Also if the
equation is not a linear constant coefficient ODE, then by applying the Laplace transform we may not obtain an algebraic equation.
PIC
f(t) is a “signal” and you started receiving the signal sin t at time t = π . The function f(t) should then be defined as
0 if t < π,
f(t) = { (6.2.9)
sin t if t ≥ π.
Similarly the step function that is 1 on the interval [1, 2) and zero everywhere else can be written as
u(t − 1) − u(t − 2). (6.2.11)
The Heaviside function is useful to define functions defined piecewise. If you want to define f(t) such that f(t) = t when t is in
[0, 1], f(t) = −t + 2 when t is in [1, 2) and f(t) = 0 otherwise, you can use the expression
Hence it is useful to know how the Heaviside function interacts with the Laplace transform. We have already seen that
−as
e
L{u(t − a)} = . (6.2.13)
2
SHIFTING PROPERTY
This can be generalized into a shifting property or second shifting property.
−as
L{f(t − a)u(t − a)} = e L{f(t)}. (6.2.14)
Example 6.2.2:
Suppose that the forcing function is not periodic. For example, suppose that we had a mass-spring system
′′ ′
x (t) + x(t) = f(t), x(0) = 0, x (0) = 0, (6.2.15)
where f(t) = 1 if 1 ≤ t < 5 and zero otherwise. We could imagine a mass-spring system, where a rocket is fired for 4 seconds
starting at t = 1 . Or perhaps an RLC circuit, where the voltage is raised at a constant rate for 4 seconds starting at t = 1 , and then
held steady again starting at t = 5 .
We can write f(t) = u(t − 1) − u(t − 5) . We transform the equation and we plug in the initial conditions as before to obtain
−s −5s
2
e e
s X(s) + X(s) = − . (6.2.16)
s s
−1
1
L { } = 1 − cos t. (6.2.18)
2
s(s + 1)
Similarly
−5s
−1
e −1 −5s
L { } = L {e L{1 − cos t}} = (1 − cos(t − 5))u(t − 5). (6.2.20)
2
s(s + 1)
PIC
where L is a linear constant coefficient differential operator. Then f(t) is usually thought of as input of the system and x(t) is thought
of as the output of the system. For example, for a mass-spring system the input is the forcing function and output is the behavior of the
mass. We would like to have an convenient way to study the behavior of the system for different inputs.
Let us suppose that all the initial conditions are zero and take the Laplace transform of the equation, we obtain the equation
A(s)X(s) = F (s). (6.2.23)
X(s)
Solving for the ratio we obtain the so-called transfer function H (s) = 1
.
F (s) A(s)
X(s)
H (s) = (6.2.24)
F (s)
In other words, X(s) = H (s)F (s) . We obtain an algebraic dependence of the output of the system based on the input. We can now
easily study the steady state behavior of the system given different inputs by simply multiplying by the transfer function.
Example 6.2.3:
Given x ′′ 2
+ ω x = f(t)
0
, let us nd the transfer function (assuming the initial conditions are zero).
First, we take the Laplace transform of the equation.
2 2
s X(s) + ω X(s) = F (s). (6.2.25)
0
X(s)
Now we solve for the transfer function F (s)
.
X(s) 1
H (s) = = . (6.2.26)
2 2
F (s) s +ω
0
Let us see how to use the transfer function. Suppose we have the constant input f(t) = 1 . Hence F (s) = , and
1
1 1
X(s) = H (s)F (s) = . (6.2.27)
2 2
s +ω s
0
It is sometimes useful (e.g. for computing the inverse transform) to write this as
t
−1
1
∫ f(τ ) dτ = L { F (s)} . (6.2.30)
0
s
Example 6.2.4:
1
To compute L we could proceed by applying this integration rule.
−1
{ }
2
s(s + 1)
t t
1 1 1
−1 −1
L { } = ∫ L { } = ∫ sin τ dτ = 1 − cos t. (6.2.31)
2 s2 + 1 0 s
2
+1 0
Example 6.2.5:
An equation containing an integral of the unknown function is called an integral equation. For example, take
t
2 τ
t = ∫ e x(τ ) dτ (6.2.32)
0
where we wish to solve for x(t). We apply the Laplace transform and the shifting property to get
2 1 1
t
= L{ e x(t)} = X(s − 1), (6.2.33)
3
s s s
or
2
X(s) = . (6.2.35)
(s + 1)2
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
t
def
(f ∗ g)(t) = ∫ f(τ )g(t − τ )dτ . (6.3.1)
0
Example 6.3.1
Take f(t) = e and g(t) = t for t ≥ 0 . Then
t
t
τ t
(f ∗ g)(t) = ∫ e (t − τ )dτ = e − t − 1. (6.3.2)
0
Example 6.3.2
Take f(t) = sin(ωt) and g(t) = cos(ωt) for t ≥ 0 . Then
t
Hence,
t
1
(f ∗ g)(t) = ∫ (sin(ωt) − sin(ωt − 2ωτ ))dτ (6.3.5)
0
2
t
1 1
= [ τ sin(ωt) + cos(2ωτ − ωt)] (6.3.6)
2 4ω
τ=0
1
= t sin(ωt). (6.3.7)
2
The formula holds only for t ≥ 0 . We assumed that f and g are zero (or simply not dened) for negative t.
The convolution has many properties that make it behave like a product. Let c be a constant and f , g, and h be functions then
f ∗ g = g∗ f (6.3.8)
(c f) ∗ g = f ∗ (c g) = c (f ∗ g) (6.3.9)
(f ∗ g) ∗ h = f ∗ (g ∗ h) (6.3.10)
The most interesting property for us, and the main result of this section is the following theorem.
Theorem 6.3.1:
Let f(t) and g(t) be of exponential type, then
t
In other words, the Laplace transform of a convolution is the product of the Laplace transforms. The simplest way to use this result is
in reverse.
Example 6.3.3
Suppose we have the function of s dened by
−1
1 −1
1
−t
L { } = e and L { } = t. (6.3.13)
2
s+1 s
Therefore,
t
−1
1 1
−(t−τ) −t
L { } = ∫ τe dτ = e + t − 1. (6.3.14)
s + 1 s2 0
SOLVING ODES
The next example demonstrates the full power of the convolution and the Laplace transform. We can give the solution to the forced
oscillation problem for any forcing function as a definite integral.
Example 6.3.4
Find the solution to
′′ 2 ′
x + ω x = f(t), x(0) = 0, x (0) = 0, (6.3.15)
0
or in other words
1
X(s) = F (s) . (6.3.17)
2 2
s +ω
0
We know
1 sin(ω0 t)
−1
L { } = . (6.3.18)
2 2
s +ω ω0
0
Therefore,
t
sin(ω0 (t − τ ))
x(t) = ∫ f(τ ) dτ , (6.3.19)
0 ω0
Let us notice one more feature of this example. We can now see how Laplace transform handles resonance. Suppose that
f(t) = cos(ω t) . Then
0
t t
sin(ω0 τ ) 1
x(t) = ∫ cos(ω0 (t − τ ))dτ = ∫ sin(ω0 τ ) cos(ω0 (t − τ ))dτ . (6.3.21)
0
ω0 ω0 0
We have computed the convolution of sine and cosine in Example 6.3.2. Hence
1 1 1
x(t) = ( )( t sin(ω0 t)) = sin(ω0 t). (6.3.22)
ω0 2 2ω0
Note the t in front of the sine. The solution, therefore, grows without bound as t gets large, meaning we get resonance.
where f(t) and g(t) are known functions and x(t) is an unknown we wish to solve for. To find x(t), we apply the Laplace transform
to the equation to obtain
X(s) = F (s) + G(s)X(s), (6.3.24)
where X(s), F (s) , and G(s) are the Laplace transforms of x(t), f(t) , and g(t), respectively. We find
F (s)
X(s) = . (6.3.25)
1 − G(s)
To find x(t) we now need to find the inverse Laplace transform of X(s).
Example 6.3.5
Solve
t
−t
x(t) = e +∫ sinh(t − τ )x(τ ) dτ (6.3.26)
0
or
1
s+1 s−1 s 1
X(s) = = = − . (6.3.28)
2 2 2
1 s −2 s −2 s −2
1−
2
s −1
3
For those that have seen convolution dened before, you may have seen it dened as ∫ ∞ (f ∗g)(t) = −∞f(τ)g(t− τ)dτ. This denition agrees
with (6.2) if you dene and to be zero for . When discussing the Laplace transform the denition we gave is sufficient.
Convolution does occur in many other applications, however, where you may have to use the more general denition with innities.
4Named for the Italian mathematician Vito Volterra (1860–1940).
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
⎧ 0
⎪
if t < a,
Notice that φ(t) = M (u(t − a) − u(t − b)) , where u(t) is the unit step function (see Figure 6.3 for a graph).
PIC
1
For simplicity we let a = 0 and it is convenient to set M = to have
b
∫ φ(t) dt = 1 (6.4.3)
0
That is, to have the pulse have “unit mass.” For such a pulse we compute
−bs
u(t) − u(t − b) 1 −e
L{φ(t)} = L { } = . (6.4.4)
b bs
We generally want b to be very small. That is, we wish to have the pulse be very short and very tall. By letting b go to zero we arrive at
the concept of the Dirac delta function.
The formula should hold if we integrate over any interval that contains 0, not just (−∞, ∞) . So δ(t) is a “function” with all its
“mass” at the single point t = 0 . In other words, for any interval [c, d]
d
1 if the interval [c, d] contains 0, i. e. c ≤ 0 ≤ d,
∫ δ(t) = { (6.4.6)
c 0 otherwise.
Unfortunately there is no such function in the classical sense. You could informally think that δ(t) is zero for t ≠ 0 and somehow
infinite at t = 0 . A good way to think about δ(t) is as a limit of short pulses whose integral is 1. For example, suppose that we have a
1 u(t) − u(t − b)
square pulse φ(t) as above with a = 0 , M = , that is φ(t) = .
b b
Compute
∞ ∞ b
u(t) − u(t − b) 1
∫ φ(t)f(t) dt = ∫ f(t) dt = ∫ f(t) dt. (6.4.7)
−∞ −∞
b b 0
If f(t) is continuous at t = 0 , then for very small b, the function f(t) is approximately equal to f(0) on the interval . We
[0, b)
Therefore,
∞ b
1
lim ∫ φ(t)f(t) dt = lim ∫ f(t) dt = f(0) (6.4.9)
b→0
−∞
b→0 b 0
Let us therefore accept δ(t) as an object that is possible to integrate. We often want to shift δ to another point, for example δ(t − a) .
In that case we have
∞
Note that δ(a − t) is the same object as δ(t − a) . In other words, the convolution of δ(t) with f(t) is again f(t) ,
t
In particular,
L{δ(t)} = 1. (6.4.13)
Remark 6.4.1: Notice that the Laplace transform of δ(t − a) looks like the Laplace transform of the derivative of the Heaviside
function u(t − a) , if we could differentiate the Heaviside function. First notice
−as
e
L{δ(t − a)} = . (6.4.14)
s
To obtain what the Laplace transform of the derivative would be we multiply by s, to obtain e −as
, which is the Laplace transform of
δ(t − a) . We see the same thing using integration,
So in a certain sense
d
[u(t − a)] = δ(t − a) (6.4.16)
dt
This line of reasoning allows us to talk about derivatives of functions with jump discontinuities. We can think of the derivative of the
Heaviside function u(t − a) as being somehow infinite at a, which is precisely our intuitive understanding of the delta function.
Example 6.4.1:
Compute
−1
s+1
L { }. (6.4.17)
s
So far we have always looked at proper rational functions in the s variable. That is, the numerator was always of lower degree than
s+1
the denominator. Not so with . We write,
s
−1
s+1 −1
1 −1 −1
1
L { } = L {1 + } = L {1} + L { } = δ(t) + 1. (6.4.18)
s s s
The resulting object is a generalized function and only makes sense when put underneath an integral.
Lx = δ(t) (6.4.19)
Example 6.4.2:
Solve (find the impulse response)
′′ 2 ′
x + ω x = δ(t), x(0) = 0, x (0) = 0. (6.4.20)
0
We first apply the Laplace transform to the equation. Denote the transform of x(t) by X(s).
2 2
s X(s) + ω X(s) = 1, (6.4.21)
0
and so
1
X(s) = . (6.4.22)
2 2
s +ω
0
Let us notice something about the above example. We have proved before that when the input was f(t) , then the solution to
Lx = f(t) was given by
t
sin(ω0 (t − τ ))
x(t) = ∫ f(τ ) dτ . (6.4.24)
0
ω0
Notice that the solution for an arbitrary input is given as convolution with the impulse response. Let us see why. The key is to notice
that for functions x(t) and f(t) ,
2 t t
′′
d ′′ ′′
(x ∗ f ) (t) = [∫ f(τ )x(t − τ ) dτ ] = ∫ f(τ )x (t − τ ) dτ = (x ∗ f)(t). (6.4.25)
2
dt 0 0
We simply differentiate twice under the integral6, the details are left as an exercise. And so if we convolve the entire equation
(6.4.20), the left hand side becomes
′′ 2 ′′ 2 ′′ 2
(x + ω x) ∗ f = (x ∗ f) + ω (x ∗ f) = (x ∗ f ) + ω (x ∗ f). (6.4.26)
0 0 0
This procedure works in general for other linear equations Lx = f(t) . If you determine the impulse response, you also know how
to obtain the output x(t) for any input f(t) by simply convolving the impulse response and the input f(t) .
where E and I are constants8 and F (x) is the force applied per unit length at position x. The situation we are interested in is when the
force is applied at a single point as in Figure 6.4.
where x = a is the point where the mass is applied. F is the force applied and the minus sign indicates that the force is downward,
that is, in the negative y direction. The end points of the beam satisfy the conditions,
′′
y(0) = 0, y (0) = 0, (6.4.31)
′′
y(L) = 0, y (L) = 0.
See ch. 5.2, for further information about endpoint conditions applied to beams.
Example 6.4.3: Suppose that length of the beam is 2, and suppose that EI = 1 for simplicity. Further suppose that the force F = 1 is
applied at x = 1 . That is, we have the equation
4
d y
= −δ(x − 1) (6.4.32)
4
dx
We could integrate, but using the Laplace transform is even easier. We apply the transform in the x variable rather than the t variable.
Let us again denote the transform of y(x) as Y (s) .
4 3 2 ′ ′′ ′′′ −s
s Y (s) − s y(0) − s y (0) − sy (0) − y (0) = −e . (6.4.34)
We take the inverse Laplace transform utilizing the second shifting property (6.2.14) to take the inverse of the rst term.
3
−(x − 1) C2
3
y(x) = u(x − 1) + C1 x + x . (6.4.36)
6 6
We still need to apply two of the endpoint conditions. As the conditions are at x = 2 we can simply replace u(x − 1) = 1 when
taking the derivatives. Therefore,
3
−(2 − 1) C2 −1 4 −1 4
3
0 = y(2) = + C1 (2) + 2 = + 2 C1 + C2 + 2 C1 + C2 (6.4.37)
6 6 6 3 6 3
and
3
−(2 − 1) C2 −1 4
3
0 = y(2) = + C1 (2) + 2 = + 2 C1 + , (6.4.38)
6 6 6 3C2
−3 ⋅ 2 ⋅ (2 − 1) C2
′′
0 = y (2) = + 3 ⋅ 2 ⋅ 2 = −1 + 2 C2 (6.4.39)
6 6
Hence C 2 =
1
2
and solving for $C_1$ using the first
equation we obtain C 1 =
−1
4
. Our solution for the beam deflection is
3
3
−(x − 1) x x
y(x) = u(x − 1) − + . (6.4.40)
6 4 12
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
2s
Exercise 6.1.10: Find the inverse Laplace transform of 2
.
s −1
1
Exercise 6.1.11: Find the inverse Laplace transform of .
2
(s − 1 ) (s + 1)
t if t ≥ 1,
Exercise 6.1.12: Find the Laplace transform of f(t) = { .
0 if t < 1.
s
Exercise 6.1.13:Find the inverse Laplace transform of .
2
(s + s + 2)(s + 4)
8
Exercise 6.1.102: Find the inverse Laplace transform of .
3
s (s + 2)
Exercise 6.2.7: Show the differentiation of the transform property. Suppose L{f(t)} = F (s) , then show
′
L{−tf(t)} = F (s). (6.E.4)
a) Sketch the graph of f(t) . b) Write down f(t) using the Heaviside function. c) Solve x ′′ ′
+ x = f(t), x(0) = 0, x (0) = 0 using
Laplace transform.
Exercise 6.2.12: Find the transfer function for m x ′′ ′
+ c x + kx = f(t) (assuming the initial conditions are zero).
Exercise 6.2.101: Using the Heaviside function u(t), write down the function
⎧ 0 if t < 1,
⎪
6.3: CONVOLUTION
Exercise 6.3.1: Let f(t) = t for t ≥ 0 , and g(t) = u(t − 1) . Compute f ∗ g .
2
Exercise 6.3.2: Let f(t) = t for t ≥ 0 , and g(t) = sin t for t ≥ 0 . Compute f ∗ g .
Exercise 6.3.3: Find the solution to
′′ ′ ′
mx + c x + kx = f(t), x(0) = 0, x (0) = 0,
Exercise 6.4.3: A pulse can come later and can be bigger. Solve x ′′
+ 4x = 4δ(t − 1), x(0) = 0, x (0) = 0.
′
Exercise 6.4.4: Suppose that f(t) and g(t) are differentiable functions and suppose that f(t) = g(t) = 0 for all t ≤ 0 . Show that
′ ′ ′
(f ∗ g) (t) = (f ∗ g)(t) = (f ∗ g )(t). (6.E.7)
Exercise 6.4.7 (challenging): Solve Example 6.4.3 via integrating 4 times in the x variable.
Exercise 6.4.8: Suppose we have a beam of length 1 simply supported at the ends and suppose that force F = 1 is applied at x = 3
in the downward direction. Suppose that EI = 1 for simplicity. Find the beam deection y(x) .
Exercise 6.4.101: Solve (nd the impulse response) x ′′
= δ(t), x(0) = 0, x (0) = 0
′
.
Exercise 6.4.102: Solve (nd the impulse response) x ′
+ ax = δ(t), x(0) = 0, x (0) = 0
′
.
Exercise 6.4.103: Suppose that Lx = δ(t), x(0) = 0, x (0) = 0 , has the solution ′
x(t) = cos(t) for t > 0 . Find (in closed form)
the solution to Lx = sin(t), x(0) = 0, x (0) = 0fort > 0 . ′
2 −s
3s e +2
Exercise 6.4.105: Compute L .
−1
{ 2
}
s
1 1/8/2020
7.1: POWER SERIES
Many functions can be written in terms of a power series
∞
k
∑ ak (x − x0 ) (7.1.1)
k=0
If we assume that a solution of a differential equation is written as a power series, then perhaps we can use a method reminiscent of
undetermined coefficients. That is, we will try to solve for the numbers a . Before we can carry out this process, let us review some
k
7.1.1 DEFINITION
As we said, a power series is an expression such as
∞
k 2 3
∑ ak (x − x0 ) = a0 + a1 (x − x0 ) + a2 (x − x0 ) + a3 (x − x0 ) +⋯, (7.1.2)
k=0
n
k 2 3 n
Sn (x) = ∑ ak (x − x0 ) = a0 + a1 (x − x0 ) + a2 (x − x0 ) + a3 (x − x0 ) + ⋯ + an (x − x0 ) , (7.1.3)
k=0
exists, then we say that the series (7.1.2) converges at x. Note that for x = x , the series always converges to 0 a0 . When (7.1.2)
converges at any other point x ≠ x , we say that (7.1.2) is a convergent power series. In this case we write
0
∞ n
k k
∑ ak (x − x0 ) = lim ∑ ak (x − x0 ) . (7.1.5)
n→∞
k=0 k=0
If the series does not converge for any point x ≠ x , we say that the series is divergent.
0
Example 7.1.1:
The series
∞ 2 3
1 x x
k
∑ x = 1 +x + + +⋯ (7.1.6)
k! 2 6
k=0
is convergent for any x. Recall that k! = 1 ⋅ 2 ⋅ 3 ⋯ k is the factorial. By convention we dene 0! = 1 . In fact, you may recall
that this series converges to e . x
k=0 k 0|
k
is convergent.If (7.1.2) converges absolutely at x, then it converges at x. However,
the opposite implication is not true.
Example 7.1.2:
The series
∞
1 k
∑ x (7.1.8)
k
k=1
for all x.
∑ ck (7.1.9)
k=0
exists. Then the series converges absolutely if L < 1 and diverges if L > 1 .
Let us apply this test to the series (7.1.2). That is we let c in the test. Compute
k
k = ak (x − x0 )
k+1
∣a ∣
∣ ck+1 ∣ k+1 (x − x0 ) ∣ ak+1 ∣
L = lim ∣ ∣ = lim ∣ ∣ = lim ∣ ∣ |x − x0 |. (7.1.11)
n→∞ ∣ ∣ k ∣ ak ∣
ck n→∞
∣ ak (x − x0 ) ∣
n→∞
Define A by
∣ ak+1 ∣
A = lim ∣ ∣. (7.1.12)
n→∞ ∣ ak ∣
Then if 1 > L = A|x − x | the series (7.1.2) converges absolutely. If A = 0 , then the series always converges. If A > 0 , then the
0
series converges absolutely if |x − x | < , and diverges if |x − x | > . That is, the radius of convergence is . Let us
0
1
A
0
1
A
1
summarize.
Theorem 7.1.2. Let
∞
k
∑ ak (x − x0 ) (7.1.13)
k=0
exists. If A = 0 , then the radius of convergence of the series is ∞. Otherwise the radius of convergence is 1
A
.
−k k
∑2 (x − 1) . (7.1.15)
k=0
First we compute,
∣ ak+1 ∣ ∣ 2−k−1 ∣ 1
−1
A = lim ∣ ∣ = lim ∣ ∣ = 2 = . (7.1.16)
−k
k→∞ ∣ ak ∣ k→∞ ∣ ∣ 2
2
Therefore the radius of convergence is 2, and the series converges absolutely on the interval (−1, 3) .
ak+1
The ratio test does not always apply. That is the limit of ∣
∣
ak
∣
∣ might not exist. There exist more sophisticated ways of finding the
radius of convergence, but those would be beyond the scope of this chapter.
we have
∞ (k)
f (x0 ) k
f(x) = ∑ (x − x0 ) , (7.1.17)
k!
k=0
where f (k)
(x0 ) denotes the k
th
derivative of f(x) at the point x . 0
PIC
Figure 7.2: The sine function and its Taylor approximations around x o = 0 of and degree.
For example, sine is an analytic function and its Taylor series around x 0 = 0 is given by
∞ n
(−1)
2n+1
sin(x) = ∑ x . (7.1.18)
(2n + 1)!
n=0
In Figure 7.2 we plot sin(x) and the truncations of the series up to degree 5 and 9. You can see that the approximation is very good for
x near 0, but gets worse for x further away from 0. This is what happens in general. To get a good approximation far away from x 0
you need to take more and more terms of the Taylor series.
∞ ∞
d k k−1
[ ∑ ak (x − x0 ) ] = ∑ kak (x − x0 ) . (7.1.19)
dx
k=0 k=1
Notice that the term corresponding to k = 0 disappeared as it was constant. The radius of convergence of the differentiated series is
the same as that of the original.
Example 7.1.4:
Let us show that the exponential y = e x
solves y ′
= y . First write
∞
1
x k
y= e = ∑ x . (7.1.20)
k!
k=0
Now differentiate
∞ ∞
1 1
′ k−1 k−1
y = ∑k x = ∑ x . (7.1.21)
k! (k − 1)!
k=1 k=1
That was precisely the power series for e that we started with, so we showed that
x d
dx
x
[e ] = e
x
.
Convergent power series can be added and multiplied together, and multiplied by constants using the following rules. First, we can add
series by adding term by term,
∞ ∞ ∞
k k k
(∑ ak (x − x0 ) ) + (∑ bk (x − x0 ) ) = ∑(ak + bk ) (x − x0 ) . (7.1.23)
k=0 k=0
where c = a b + a b
k 0 k +⋯+a b 1 . The radius of convergence of the sum or the product is at least the minimum of the radii
k−1 k 0
can always expand a polynomial as a power series about any point x by writing the polynomial as a polynomial in (x − x ) . For 0 0
2 2
2x − 3x + 4 = 3 + (x − 1) + 2 (x − 1) . (7.1.26)
In other words a 0 = 3 ,a 1 = 1 ,a 2 = 2 , and all other a k = 0 . To do this, we know that a k = 0 for all k ≥ 3 as the polynomial is of
degree 2.
We write a + a (x − 1) + a (x − 1) , we expand, and we solve for
0 1 2
2
a0 , a1 , and a2 . We could have also differentiated at
x = 1 and used the Taylor series formula (7.1.17).
Let us look at rational functions, that is, ratios of polynomials. An important fact is that a series for a function only defines the function
on an interval even if the function is defined elsewhere. For example, for −1 < x < 1 we have
∞
1
k 2
= ∑x = 1 +x +x +⋯ (7.1.27)
1 −x
k=0
This series is called the geometric series. The ratio test tells us that the radius of convergence is 1. The series diverges for x ≤ −1 and
x ≥ 1 , even though is defined for all x ≠ 1 .
1
1−x
We can use the geometric series together with rules for addition and multiplication of power series to expand rational functions around
a point, as long as the denominator is not zero at x . Note that as for polynomials, we could equivalently use the Taylor series
0
expansion (7.1.17).
Example 7.1.5:
Expand 1+2x+x
x
2
as a power series around the origin (x 0 = 0 ) and find the radius of convergence. First, write
2 2
1 + 2x + x
2
= (1 + x) = (1 − (−x)) . Now we compute
2
∞
k k
= x(∑ (−1) x )
k=0
k
= x (∑ ck x )
k=0
∞
k+1
= ∑ ck x ,
k=0
where using the formula for the product of series we obtain, c 0 = 1 ,c1 = −1 − 1 = −2 ,c 2 = 1 +1 +1 = 3 , etc ….
Therefore
∞
x k+1 k 2 3 4
= ∑ (−1) kx = x − 2x + 3x − 4x +⋯ (7.1.29)
2
1 + 2x + x
k=1
x2 −1
, we write
3 ∞ ∞ ∞
x +x 1 1 k k k k
= x+ − = x + ∑ (−1) x −∑x = −x + ∑ (−2)x . (7.1.31)
2
x −1 1 +x 1 −x
k=0 k=0 k=3
k odd
1
Named after the English mathematician Sir Brook Taylor (1685–1731).
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Suppose that p(x) , q(x), and r(x) are polynomials. We will try a solution of the form
∞
2
y = ∑ ak (x − xo ) (7.2.2)
k=0
and solve for the a to try to obtain a solution defined in some interval around x .
k o
Handling singular points is harder than ordinary points and so we now focus only on ordinary points.
k
y = ∑ ak x (7.2.4)
k=0
′ k−1
y = ∑ k ak x (7.2.5)
k=1
′′ k−2
y = ∑ k (k − 1) ak x (7.2.6)
k=2
k=0
k=0 k=0
k k
= ∑((k + 2)(k + 1)ak+2 x − ak x )
k=0
k
= ∑((k + 2)(k + 1)ak+2 − ak )x .
k=0
As y ′′
−y is supposed to be equal to 0, we know that the coefficients of the resulting series must be equal to 0. Therefore,
ak
(k + 2)(k + 1)ak+2 − ak = 0, or ak+2 = . (7.2.9)
(k + 2)(k + 1)
The above equation is called a recurrence relation for the coefficients of the power series. It did not matter what a or a was. They 0 1
can be arbitrary. But once we pick a and a , then all other coefficients are determined by the recurrence relation.
0 1
Let us see what the coefficients must be. First, a and a are arbitrary 0 1
a0 a1 a2 a0 a3 a1
a2 = , a3 = , a4 = = , a5 = = , … (7.2.10)
2 (3)(2) (4)(3) (4)(3)(2) (5)(4) (5)(4)(3)(2)
We recognize the two series as the hyperbolic sine and cosine. Therefore,
Of course, in general we will not be able to recognize the series that appears, since usually there will not be any elementary function
that matches it. In that case we will be content with the series.
Example 7.2.2:
Let us do a more complex example. Suppose we wish to solve Airy’s equation2, that is
′′
y − xy = 0 (7.2.15)
k
y = ∑ ak x (7.2.16)
k=0
′′ k−2
y = ∑ k(k − 1)ak x (7.2.17)
k=2
k=2 k=0
∞ ∞
k−2 k+1
= (∑ k (k − 1) ak x ) − (∑ ak x ).
k=2 k=0
′′ k k
0 = y − xy = (2 a2 + ∑(k + 2) (k + 1) ak+2 x ) − (∑ ak−1 x ). (7.2.19)
k=1 k=1
∞
k
= 2 a2 + ∑((k + 2) (k + 1) ak+2 − ak−1 ) x .
k=1
Again y ′′
− xy is supposed to be 0 so first we notice that a 2 = 0 and also
ak−1
(k + 2) (k + 1) ak+2 − ak−1 = 0, or ak+2 = . (7.2.20)
(k + 2)(k + 1)
Now we jump in steps of three. First we notice that since a = 0 we must have that, a 2 5 = 0 ,a 8 = 0 ,a 11 = 0 , etc …. In general
a = 0 . The constants a and a are arbitrary and we obtain
3n+2 0 1
a0 a1 a3 a0 a4 a1
a3 = , a4 = , a6 = = , a7 = = , … (7.2.21)
(3)(2) (4)(3) (6)(5) (6)(5)(3)(2) (7)(6) (7)(6)(4)(3)
a0
a3n = . (7.2.22)
(2)(3)(5)(6) ⋯ (3n − 1)(3n)
a1
a3n+1 = . (7.2.23)
(3)(4)(6)(7) ⋯ (3n)(3n + 1)
In other words, if we write down the series for y we notice that it has two parts
a0 a0 a0
3 6 3n
y = ( a0 + x + x +⋯+ x + ⋯) (7.2.24)
6 180 (2)(3)(5)(6) ⋯ (3n − 1)(3n)
a1 4
a1 7
a1 3n+1
+ ( a1 x + x + x +⋯+ x + ⋯)
12 504 (3)(4)(6)(7) ⋯ (3n)(3n + 1)
1 3
1 6
1 3n
= a0 (1 + x + x +⋯+ x + ⋯)
6 180 (2)(3)(5)(6) ⋯ (3n − 1)(3n)
1 1 1
4 7 3n+1
+ a1 (x + x + x +⋯+ x + ⋯) .
12 504 (3)(4)(6)(7) ⋯ (3n)(3n + 1)
We define
1 1 1
3 6 3n
y1 (x) = 1 + x + x +⋯+ x +⋯, (7.2.25)
6 180 (2)(3)(5)(6) ⋯ (3n − 1)(3n)
1 4
1 7
1 3n+1
y2 (x) = x + x + x +⋯+ x +⋯,
12 504 (3)(4)(6)(7) ⋯ (3n)(3n + 1)
and write the general solution to the equation as y(x) = a y (x) + a y (x) . Notice from the power series that y (0) = 1 and
0 1 1 2 1
y (0) = 0 . Also, y (0) = 0 and y (0) = 1 . Therefore y(x) is a solution that satisfies the initial conditions y(0) = a and
′ ′
2 1 2 0
y (0) = a .
′
1
PIC
The functions y and y cannot be written in terms of the elementary functions that you know. See Figure 7.3 for the plot of the
1 2
solutions y and y . These functions have many interesting properties. For example, they are oscillatory for negative x (like
1 2
k=0
k=1
′′ k−2
y = ∑ k (k − 1) ak x .
k=2
′′ ′ k−2 k−1 k
0 = y − 2x y + 2ny = (∑ k (k − 1) ak x ) − 2x(∑ kak x ) + 2n(∑ ak x ) (7.2.29)
∞ ∞ ∞
k−2 k k
= (∑ k (k − 1) ak x ) − (∑ 2kak x ) + (∑ 2nak x )
∞ ∞ ∞
k k k
= (2 a2 + ∑(k + 2) (k + 1) ak+2 x ) − (∑ 2kak x ) + (2na0 + ∑ 2nak x )
k
= 2 a2 + 2na0 + ∑((k + 2) (k + 1) ak+2 − 2kak + 2nak )x .
k=1
As y ′′ ′
− 2x y + 2ny = 0 we have
(2k − 2n)
(k + 2) (k + 1) ak+2 + (−2k + 2n)ak = 0, or ak+2 = ak . (7.2.30)
(k + 2)(k + 1)
This recurrence relation actually includes a 2 = −na0 (which comes about from 2 a 2 + 2na0 = 0 ). Again a and a are arbitrary.
0 1
−2n 2(1 − n)
a2 = a0 , a3 = a1 , (7.2.31)
(2)(1) (3)(2)
2
2(2 − n) 2 (2 − n)(−n)
a4 = a2 = a0 ,
(4)(3) (4)(3)(2)(1)
2
2(3 − n) 2 (3 − n)(1 − n)
a5 = a3 = a1 , …
(5)(4) (5)(4)(3)(2)
m
2 (1 − n)(3 − n) ⋯ (2m − 1 − n)
a2m+1 = .
(2m + 1)!
Let us write down the two series, one with the even powers and one with the odd.
We then write
We also notice that if n is a positive even integer, then y (x) is a polynomial as all the coefficients in the series beyond a certain
1
degree are zero. If n is a positive odd integer, then y (x) is a polynomial. For example, if n = 4 , then
2
2
2(−4) 2 (−4)(2 − 4) 4
2 4 2 4
y1 (x) = 1 + x + x = 1 − 4x + x . (7.2.35)
2! 4! 3
2Named after the English mathematician Sir George Biddell Airy (1801 – 1892).
3
Named after the French mathematician Charles Hermite (1822–1901).
Contributors
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Example 7.3.1:
Let us first look at a simple first order equation
′
2x y − y = 0. (7.3.1)
k=0
we obtain
′
0 = 2x y − y (7.3.3)
∞ ∞
k−1 k
= 2x (∑ kak x ) − (∑ ak x ) (7.3.4)
k=1 k=0
k
= a0 + ∑(2kak − ak ) x . (7.3.5)
k=1
First, a = 0 . Next, the only way to solve 0 = 2ka − a = (2k − 1) a for k = 1, 2, 3, … is for a = 0 for all k. Therefore we only get
0 k k k k
the trivial solution y = 0 . We need a nonzero solution to get the general solution. Let us try y = x for some real number r. Consequently our
r
solution---if we can find one---may only make sense for positive x. Then y = rx . So ′ r−1
′
0 = 2x y − y (7.3.6)
r−1 r
= 2xrx −x (7.3.7).
r
= (2r − 1)x (7.3.8)
1
Therefore r = , or in other words y = x1/2
. Multiplying by a constant, the general solution for positive x is
2
1/2
y = Cx . (7.3.9)
If C ≠ 0 then the derivative of the solution "blows up" at x = 0 (the singular point). There is only one solution that is differentiable at x = 0
and that's the trivial solution y = 0 .
Not every problem with a singular point has a solution of the form y = x , of course. But perhaps we can combine the methods. What we will do
r
Example 7.3.2:
Suppose that we have the equation
2 ′′ 2 ′
4x y − 4 x y + (1 − 2x)y = 0, (7.3.11)
r k
y = x ∑ ak x (7.3.12)
k=0
∞
k+r
= ∑ ak x , (7.3.13)
k=0
where r is a real number, not necessarily an integer. Again if such a solution exists, it may only exist for positive x . First let us find the
derivatives
′ k+r−1
y = ∑(k + r) ak x , (7.3.14)
k=0
′′ k+r−2
y = ∑(k + r) (k + r − 1) ak x . (7.3.15)
k=0
Plugging Equations 7.3.13 - 7.3.15 into our original differential equation (Equation 7.3.11) we obtain
2 ′′ 2 ′
0 = 4x y − 4 x y + (1 − 2x)y (7.3.16)
∞ ∞ ∞
∞ ∞ ∞ ∞
k+r k+r+1 k+r k+r+1
= (∑ 4(k + r) (k + r − 1) ak x ) − (∑ 4(k + r) ak x ) + (∑ ak x ) − (∑ 2 ak x ) (7.3.18)
∞ ∞ ∞ ∞
r r k+r
= 4r(r − 1) a0 x + a0 x + ∑ (4(k + r) (k + r − 1) ak − 4(k + r − 1) ak−1 + ak − 2 ak−1 ) x (7.3.20)
k=1
∞
r k+r
= (4r(r − 1) + 1) a0 x + ∑ ((4(k + r) (k + r − 1) + 1) ak − (4(k + r − 1) + 2) ak−1 ) x . (7.3.21)
k=1
1
This equation is called the indicial equation. This particular indicial equation has a double root at r = . OK, so we know what r has to be.
2
That knowledge we obtained simply by looking at the coefficient of x . All other coefficients of x r k+r
also have to be zero so
1
If we plug in r = and solve for a we get k
2
1
4(k + − 1) + 2
2 1
ak = ak−1 = ak−1 . (7.3.24)
1 1 k
4(k + ) (k + − 1) + 1
2 2
In other words,
∞ ∞ ∞
1 1
k+r k+1/2 1/2 k 1/2 x
y = ∑ ak x = ∑ x = x ∑ x = x e . (7.3.27)
k! k!
k=0 k=0 k=0
That was lucky! In general, we will not be able to write the series in terms of elementary functions. We have one solution, let us call it
e . But what about a second solution? If we want a general solution, we need two linearly independent solutions. Picking a to be a
1/2 x
y = x
1 0
different constant only gets us a constant multiple of y , and we do not have any other r to try; we only have one solution to the indicial
1
equation. Well, there are powers of x floating around and we are taking derivatives, perhaps the logarithm (the antiderivative of x ) is around −1
as well. It turns out we want to try for another solution of the form
∞
k+r
y2 = ∑ bk x + (ln x)y1 , (7.3.28)
k=0
k+1/2 1/2 x
y2 = ∑ bk x + (ln x)x e . (7.3.29)
k=0
We now differentiate this equation, substitute into the differential equation and solve for b . A long computation ensues and we obtain some k
recursion relation for b . The reader can (and should) try this to obtain for example the first three terms
k
2 b1 − 1 6 b2 − 1
b1 = b0 − 1, b2 = , b3 = , … (7.3.30)
4 18
We then fix b and obtain a solution y . Then we write the general solution as y = Ay
0 2 1 + By2 .
be an ODE. As before, if p(x 0) = 0 , then x is a singular point. If, furthermore, the limits
0
q(x) r(x)
2
lim (x − x0 ) and lim (x − x0 ) (7.3.32)
x→x0 p(x) x→x0 p(x)
both exist and are finite, then we say that x is a regular singular point.
0
Write
q(x) x(1 + x)
lim x = lim x = lim (1 + x) = 1, (7.3.34)
x→0 x→0 2 x→0
p(x) x
r(x)
2 2 2 2 2
lim x = lim x frac(π + x )x = lim (π + x ) = π.
x→0 p(x) x→0 x→0
then
q(x) (1 + x) 1 +x
lim x = lim x = lim = DNE. (7.3.36)
2
x→0 p(x) x→0 x x→0 x
Here DNE stands for does not exist. The point 0 is a singular point, but not a regular singular point.
Let us now discuss the general Method of Frobenius. Let us only consider the method at the point x = 0 for simplicity. The main idea is the
following theorem.
has a regular singular point at x = 0 , then there exists at least one solution of the form
∞
r k
y= x ∑ ak x . (7.3.38)
k=0
k+r
y = ∑ ak x . (7.3.39)
k=0
We plug this y into equation (7.3.26). We collect terms and write everything as a single series.
r1 k
y1 = x ∑ ak x , (7.3.40)
k=0
and we solve for all a to obtain the first solution. Then using the second root, we plug in
k
r2 k
y2 = x ∑ bk x , (7.3.41)
k=0
(iv) If the indicial equation has a doubled root r, then there we find one solution
∞
r k
y1 = x ∑ ak x , (7.3.42)
k=0
r k
y2 = x ∑ bk x + (ln x)y1 , (7.3.43)
k=0
(v) If the indicial equation has two real roots such that r 1 − r2 is an integer, then one solution is
∞
r1 k
y1 = x ∑ ak x , (7.3.44)
k=0
r2 k
y2 = x ∑ bk x + C(ln x)y1 , (7.3.45)
k=0
where we plug y into (7.3.26) and solve for the constants b and C .
2 k
(vi) Finally, if the indicial equation has complex roots, then solving for a in the solution k
∞
r1 k
y= x ∑ ak x (7.3.46)
k=0
results in a complex-valued function---all the ak are complex numbers. We obtain our two linearly independent solutions by taking the real and
imaginary parts of y .
The main idea is to find at least one Frobenius-type solution. If we are lucky and find two, we are done. If we only get one, we either use the ideas
above or even a different method such as reduction of order (Exercise 2.1.8) to obtain a second solution.
BESSEL FUNCTIONS
An important class of functions that arises commonly in physics are the Bessel functions. For example, these functions appear when solving the
wave equation in two and three dimensions. First we have Bessel's equation of order p:
2 ′′ ′ 2 2
x y + x y + (x − p ) y = 0. (7.3.47)
1
We allow p to be any number, not just an integer, although integers and multiples of are most important in applications. When we plug
2
k+r
y = ∑ ak x (7.3.48)
k=0
∞ k 2k
(−1) x
−p
y2 = x ∑ .
2k
k=0
2 k!(k − p)(k − 1 − p) ⋯ (2 − p)(1 − p)
Exercise 7.3.1:
a. Verify that the indicial equation of Bessel's equation of order p is (r − p)(r + p) = 0 .
b. Suppose that p is not an integer. Carry out the computation to obtain the solutions y and y above. 1 2
Bessel functions will be convenient constant multiples of y and y . First we must define the gamma function
1 2
∞
x−1 −t
Γ(x) = ∫ t e dt. (7.3.51)
0
Notice that Γ(1) = 1 . The gamma function also has a wonderful property
Γ(x + 1) = xΓ(x). (7.3.52)
From this property, one can show that Γ(n) = (n − 1)! when n is an integer, so the gamma function is a continuous version of the factorial. We
compute:
Γ(k + p + 1) = (k + p)(k − 1 + p) ⋯ (2 + p)(1 + p)Γ(1 + p), (7.3.53)
Exercise 7.3.2:
Verify the above identities using Γ(x + 1) = xΓ(x) .
∞ k
(−1) 2k−p
1 x
J−p (x) = y2 = ∑ ( ) .
−
2 Γ(1 − p) k!Γ(k − p + 1) 2
k=0
As these are constant multiples of the solutions we found above, these are both solutions to Bessel's equation of order p. The constants are picked
for convenience. When p is not an integer, J and J are linearly independent. When n is an integer we obtain
p −p
∞ k
(−1) 2k+n
x
Jn (x) = ∑ ( ) . (7.3.55)
k!(k + n)! 2
k=0
and so we do not obtain a second linearly independent solution. The other solution is the so-called Bessel function of second kind. These make sense
only for integer orders n and are defined as limits of linear combinations of J (x) and J (x) as p approaches n in the following way:
p −p
As each linear combination of J (x) and J (x) is a solution to Bessel's equation of order p, then as we take the limit as p goes to n, Y (x) is a
p −p n
solution to Bessel's equation of order n. It also turns out that Y (x) and J (x) are linearly independent. Therefore when n is an integer, we have
n n
for arbitrary constants A and B. Note that Y (x) goes to negative infinity at x = 0 . Many mathematical software packages have these functions
n
J (x) and Y (x) defined, so they can be used just like say sin(x) and cos(x) . In fact, they have some similar properties. For example, −J (x)
n n 1
is a derivative of J (x), and in general the derivative of J (x) can be written as a linear combination of J
0 n (x) and J (x). Furthermore, n−1 n+1
these functions oscillate, although they are not periodic. See Figure 7.4 for graphs of Bessel functions.
PIC PIC
Figure 7.4: Plot of the J 0 (x) and J 1 (x) in the first graph and Y 0 (x) and Y 1 (x) in the second graph.
can be changed to x2
y
′′ ′ 2 2
+ xy + λ x y = 0 . Then changing variables t = λx we obtain via chain rule the equation in y and t:
2 ′′ ′ 2
t y + t y + t y = 0, (7.3.60)
which can be recognized as Bessel's equation of order 0. Therefore the general solution is y(t) = AJ 0 (t) + BY0 (t) , or in terms of x:
y = AJ0 (λx) + BY0 (λx). (7.3.61)
This equation comes up for example when finding fundamental modes of vibration of a circular drum, but we digress.
4
Named after the German mathematician Ferdinand Georg Frobenius (1849 – 1917).
5
See Joseph L. Neuringera, The Frobenius method for complex roots of the indicial equation, International Journal of Mathematical Education in
Science and Technology, Volume 9, Issue 1, 1978, 71–77.
6Named after the German astronomer and mathematician Friedrich Wilhelm Bessel (1784 – 1846).
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Q7.1.2
∞
Is the power series ∑ k=0
kx
k
convergent? If so, what is the radius of convergence?
Q7.1.3
Is the power series ∑ ∞
k=0
k! x
k
convergent? If so, what is the radius of convergence?
Q7.1.4
Is the power series ∑ convergent? If so, what is the radius of convergence?
∞ 1 k
(x − 10)
k=0 (2k)!
Q7.1.5
Determine the Taylor series for sin x around the point x 0 = π .
Q7.1.6
Determine the Taylor series for ln x around the point x 0 = 1 , and find the radius of convergence.
Q7.1.7
1
Determine the Taylor series and its radius of convergence of around x 0 = 0 .
1 +x
Q7.1.8
x
Determine the Taylor series and its radius of convergence of around x 0 = 0 . Hint: You will not be able to use the ratio test.
4 − x2
Q7.1.9
Expand x 5
+ 5x + 1 as a power series around x 0 = 5 .
Q7.1.10
∞
Suppose that the ratio test applies to a series ∑ k=0
ak x
k
. Show, using the ratio test, that the radius of convergence of the differentiated
series is the same as that of the original series.
Q7.1.11
Suppose that f is an analytic function such that f (n)
(0) = n . Find f(1) .
Q7.1.101
Is the power series ∑ convergent? If so, what is the radius of convergence?
∞ n n
(0.1) x
n=1
Q7.1.102
[challenging] Is the power series ∑ convergent? If so, what is the radius of convergence?
∞ n! n
n
x
n=1 n
Q7.1.103
Using the geometric series, expand 1−x
1
around x 0 = 2 . For what x does the series converge?
Q7.1.104
[challenging] Find the Taylor series for x 7
e
x
around x 0 = 0 .
Q7.1.105
[challenging] Imagine f and g are analytic functions such that f
(k)
(0) = g
(k)
(0) for all large enough k. What can you say about
f(x) − g(x) ?
Q7.2.1
Use power series methods to solve y ′′
+y = 0 at the point x 0 = 1 .
Q7.2.2
Use power series methods to solve y ′′
+ 4xy = 0 at the point x 0 = 0 .
Q7.2.3
Use power series methods to solve y ′′
− xy = 0 at the point x 0 = 1 .
Q7.2.4
Use power series methods to solve y ′′
+x y = 0
2
at the point x 0 = 0 .
Q7.2.5
The methods work for other orders than second order. Try the methods of this section to solve the first order system ′
y − xy = 0 at
the point x = 0 .
0
Q7.2.6
(Chebyshev’s equation of order p): a) Solve (1 − x 2
)y
′′ ′
− xy + p y = 0
2
using power series methods at x0 = 0 . b) For what p is
there a polynomial solution?
Q7.2.7
Find a polynomial solution to (x 2
+ 1)y
′′
− 2x y + 2y = 0
′
using power series methods.
Q7.2.8
a) Use power series methods to solve (1 − x)y ′′
+y = 0 at the point x0 = 0 . b) Use the solution to part a) to find a solution for
x y + y = 0 around the point x = 1 .
′′
0
Q7.2.101
Use power series methods to solve y ′′
+ 2x y = 0
3
at the point x 0 = 0 .
Q7.2.102
[challenging] We can also use power series methods in nonhomogeneous equations. a) Use power series methods to solve
′′
y − xy = at the point x = 0 . Hint: Recall the geometric series. b) Now solve for the initial condition y(0) = 0 , y (0) = 0 .
1
1−x
0
′
Q7.2.103
Attempt to solve x 2
y
′′
−y = 0 at x 0 = 0 using the power series method of this section (x is a singular point). 0
Can you find at least one solution? Can you find more than one solution?
Q7.3.4
Find a particular (Frobenius-type) solution of x y ′′
−y = 0 .
Q7.3.5
Find a particular (Frobenius-type) solution of y ′′
+
1
x
′
y − xy = 0 .
Q7.3.6
Find the general solution of 2x y ′′ ′
+y −x y = 0
2
.
Q7.3.7
Find the general solution of x 2
y
′′ ′
− xy − y = 0 .
Q7.3.8
In the following equations classify the point x = 0 as ordinary, regular singular, or singular but not regular singular.
b. x y + y + y = 0
2 ′′ ′
c. x y + x y + y = 0
′′ 3 ′
d. x y + x y − e y = 0
′′ ′ x
e. x y + x y + x y = 0
2 ′′ 2 ′ 2
Q7.3.101
In the following equations classify the point x = 0 as ordinary, regular singular, or singular but not regular singular.
a. y + y = 0
′′
b. x y + (1 + x)y = 0
3 ′′
c. x y + x y + y = 0
′′ 5 ′
d. sin(x)y − y = 0
′′
e. cos(x)y − sin(x)y = 0
′′
Q7.3.102
Find the general solution of x 2
y
′′
−y = 0 .
Q7.3.103
Find a particular solution of x 2
y
′′
+ (x −
3
4
)y = 0 .
Q7.3.3
[tricky] Find the general solution of x 2
y
′′ ′
− xy + y = 0 .
8.5: CHAOS
Mathematical chaos is not really chaos, there is precise order behind the scenes. Everything is still deterministic. However a chaotic
system is extremely sensitive to initial conditions. This also means even small errors induced via numerical approximation create
large errors very quickly, so it is almost impossible to numerically approximate for long times. This is large part of the trouble as
chaotic systems cannot be in general solved analytically.
1 1/8/2020
8.1: LINEARIZATION, CRITICAL POINTS, AND EQUILIBRIA
Except for a few brief detours in Chapter 1, we considered mostly linear equations. Linear equations suffice in many applications, but
in reality most phenomena require nonlinear equations. Nonlinear equations, however, are notoriously more difficult to understand than
linear ones, and many strange new phenomena appear when we allow our equations to be nonlinear.
Not to worry, we did not waste all this time studying linear equations. Nonlinear equations can often be approximated by linear ones if
we only need a solution "locally," for example, only for a short period of time, or only for certain parameters. Understanding linear
equations can also give us qualitative understanding about a more general nonlinear problem. The idea is similar to what you did in
calculus in trying to approximate a function by a line with the right slope.
In Ch. 2.4 we looked at the pendulum of mass m and length L. The goal was to solve for the angle θ(t) as a function of the time t.
The equation for the setup is the nonlinear equation
g
′′
θ + sin θ = 0. (8.1.1)
L
Instead of solving this equation, we solved the rather easier linear equation
′′
g
θ + θ = 0. (8.1.2)
L
While the solution to the linear equation is not exactly what we were looking for, it is rather close to the original, as long as the angle θ
is small and the time period involved is short.
You might ask: Why don't we just solve the nonlinear problem? Well, it might be very difficult, impractical, or impossible to solve
analytically,depending on the equation in question. We may not even be interested in the actual solution, we might only be interested in
some qualitative idea of what the solution is doing. For example, what happens as time goes to innity?
where f(x, y) and g(x, y) are functions of two variables, and the derivatives are taken with respect to time t. Solutions are functions
x(t) and y(t) such that
′ ′
x (t) = f(x(t), y(t)), y (t) = g(x(t), y(t)). (8.1.4)
The way we will analyze the system is very similar to Ch. 1.6, where we studied a single autonomous equation. The ideas in two
dimensions are the same, but the behavior can be far more complicated.
It may be best to think of the system of equations as the single vector equation
′
x f(x, y)
[ ] = [ ]. (8.1.5)
y g(x, y)
As in Ch.3.1 we draw the phase portrait (or phase diagram), where each point (x, y) corresponds to a specific state of the system. We
draw the vector field given at each point (x, y) by the vector [ f (x,y)
] . And as before if we find solutions, we draw the trajectories by
g(x,y)
Example 8.1.1:
Consider the second order equation x ′′
= −x + x
2
. Write this equation as a first order nonlinear system
′ ′ 2
x = y, y = −x + x . (8.1.6)
f(x, y)
⃗
[ ] = 0. (8.1.7)
g(x, y)
In other words, the points where both f(x, y) = 0 and g(x, y) = 0 . The critical points are where the behavior of the system is in
some sense the most complicated. If [
f (x,y)
] is zero, then nearby, the vector can point in any direction whatsoever. Also, the
g(x,y)
trajectories are either going towards, away from, or around these points, so if we are looking for long term behavior of the system, we
should look at what happens there.
Critical points are also sometimes called equilibria, since we have so-called equilibrium solutions at critical points. If (x0 , y0 ) is a
critical point, then we have the solutions
x(t) = x0 , y(t) = y0 . (8.1.8)
Compare this discussion on equilibria to the discussion in Ch. 1.6. The underlying concept is exactly the same.
8.1.2 LINEARIZATION
In Ch. 3.5 we studied the behavior of a homogeneous linear system of two equations near a critical point. For a linear system of two
variables the only critical point is generally the origin (0, 0). Let us put the understanding we gained in that section to good use
understanding what happens near critical points of nonlinear systems.
In calculus we learned to estimate a function by taking its derivative and linearizing. We work similarly with nonlinear systems of
ODE. Suppose (x , y ) is a critical point. First change variables to (u, v), so that (u, v) = (0, 0) corresponds to (x , y ) . That is,
0 0 0 0
u = x − x0 , v = y − y0 . (8.1.10)
Next we need to find the derivative. In multivariable calculus you may have seen that the several variables version of the derivative is
the Jacobian matrix. The Jacobian matrix of the vector-valued function [ at (x is
f (x,y)
] 0, y0 )
g(x,y)
∂f ∂f
⎡ (x0 , y0 ) (x0 , y0 ) ⎤
∂x ∂y
⎢ ⎥. (8.1.11)
∂g ∂g
⎣ (x0 , y0 ) (x0 , y0 ) ⎦
∂x ∂y
This matrix gives the best linear approximation as u and v (and therefore x and y ) vary. We define the linearization of the equation
(8.1.5) as the linear system
∂f ∂f
′ (x0 , y0 ) (x0 , y0 ) ⎤
⎡
u ∂x ∂y u
[ ] = ⎢ ⎥[ ]. (8.1.12)
∂g ∂g
v ⎣ v
(x0 , y0 ) (x0 , y0 ) ⎦
∂x ∂y
Example 8.1.2:
Let us keep with the same equations as Example 8.1.1: ′
x = y , y
′
= −x + x
2
. There are two critical points, (0, 0) and (1, 0) .
The Jacobian matrix at any point is
∂f ∂f
⎡ (x, y) (x, y) ⎤
∂x ∂y 0 1
⎢ ⎥ = [ ]. (8.1.13)
∂g ∂g
⎣ (x, y) (x, y) ⎦ −1 + 2x 0
∂x ∂y
where u = x and v = y .
PIC
PIC
Figure 8.2: Phase diagram with some trajectories of linearizations at the critical points (0, 0) (left) and (1, 0) (right) of x
′
= y ,
y = −x + x
′
. 2
The phase diagrams of the two linearizations at the point (0, 0) and (1, 0) are given in Figure 8.2. Note that the variables are now
and . Compare Figure 8.2 with Figure 8.1, and look especially at the behavior near the critical points.
1Named for the German mathematician Carl Gustav Jacob Jacobi (1804–1851).
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
isolated and the Jacobian at the point is invertible, or equivalently if the linearized system has an isolated critical point. In such a case,
the nonlinear terms will be very small and the system will behave like its linearization, at least if we are close to the critical point.
In particular the system we have just seen in Examples 8.1.1 and 8.1.2 has two isolated critical points (0, 0) and (0, 1), and is almost
linear at both critical points as both of the Jacobian matrices
0 1
[ ] (8.2.1)
−1 0
and
0 1
[ ] (8.2.2)
1 0
are invertible.
On the other hand a system such as x ′
= x
2
,y ′
= y
2
has an isolated critical point at (0, 0), however the Jacobian matrix
2x 0
[ ] (8.2.3)
0 2y
is zero when (x, y) = (0, 0) . Therefore the system is not almost linear. Even a worse example is the system x ′
= x y , ′
= x
2
,which
does not have an isolated critical point, as x and y are both zero whenever x = 0 , that is, the entire y axis.
′ ′
Fortunately, most often critical points are isolated, and the system is almost linear at the critical points. So if we learn what happens
here, we have figured out the majority of situations that arise in applications.
In the new third column, we have marked points as asymptotically stable or unstable. Formally, a stable critical point (x , y ) is one 0 0
where given any small distance ϵ to (x , y ) ,and any initial condition within a perhaps smaller radius around (x , y ) ,the trajectory of
0 0 0 0
the system will never go further away from (x , y ) than ϵ. An unstable critical point is one that is not stable. Informally, a point is
0 0
stable if we start close to a critical point and follow a trajectory we will either go towards, or at least not get away from, this critical
point.
A stable critical point (x , y ) is called asymptotically stable if given any initial condition sufficiently close to
0 0 (x0 , y0 ) and any
solution (x(t), y(t)) given that condition, then
That is, the critical point is asymptotically stable if any trajectory for a sufficiently close initial condition goes towards the critical point
(x , y ) .
0 0
Example 8.2.1:
where −y − x = 0 and −x + y = 0 . The first equation means y = −x , and so y = x . Plugging into the second equation
2 2 2 2 4
we obtain −x + x = 0 . Factoring we obtain x(1 − x ) = 0 . Since we are looking only for real solutions we get either x = 0
4 3
or x = 1 . Solving for the corresponding y using y = −x ,we get two critical points, one being (0, 0) and the other being
2
(1, −1) . Clearly the critical points are isolated. Let us compute the Jacobian matrix:
−2x −1
[ ]. (8.2.5)
−1 2y
0
] and so the two eigenvalues are 1 and −1 . As the matrix is invertible, the system is
almost linear at (0, 0) . As the eigenvalues are real and of opposite signs, we get a saddle point, which is an unstable equilibrium
point.
PIC
As you can see from the diagram, this behavior is true even for some initial points quite far from (1, −1) ,but it is definitely not
true for all initial points.
Example 8.2.2:
Let us look at x = y + y e , y = x . First let us find the critical points. These are the points where y + y e = 0 and x = 0 .
′ 2 x ′ 2 x
Simplifying we get 0 = y + y = y(y + 1) . So the critical points are (0, 0) and (0, −1) ,and hence are isolated. Let us compute
2
2
±i
2
. The matrix is invertible, and so the system is
almost linear at (0, −1) . As we have complex eigenvalues with positive real part, the critical point is a spiral source, and therefore
an unstable equilibrium point.
PIC
Using the quadratic equation, the eigenvalues of the Jacobian matrix at any point (x, y) are
− −−− −−
3 √ 4 − 9y 4
2
λ = y ±i . (8.2.9)
2 2
At any point where y ≠ 0 (so at most points near the origin), the eigenvalues have a positive real part (y can never be negative). 2
This positive real part will pull the trajectory away from the origin. A sample trajectory for an initial condition near the origin is
given in
PIC
Figure 8.5: An unstable critical point (spiral source) at the origin for x ′
= y, y
′
= −x + y
3
, even if the linearization has a center.
The moral of the example is that further analysis is needed when the linearization has a center. The analysis will in general be more
complicated than in the above example, and is more likely to involve case-by-case consideration. Such a complication should not be
surprising to you. By now in your mathematical career, you have seen many places where a simple test is inconclusive, perhaps starting
with the second derivative test for maxima or minima, and requires more careful, and perhaps ad hoc analysis of the situation.
for an arbitrary function f(x) is called a conservative equation. For example the pendulum equation is a conservative equation. The
equations are conservative as there is no friction in the system so the energy in the system is "conserved." Let us write this equation as
a system of nonlinear ODE.
′ ′
x = y, y = −f(x). (8.2.11)
These types of equations have the advantage that we can solve for their trajectories easily. The trick is to first think of y as a function
of x for a moment. Then use the chain rule
′′ ′
dy
x = y = y , (8.2.12)
dx
dy
where the prime indicates a derivative with respect to t. We obtain y
dx
+ f(x) = 0 . We integrate with respect to x to get
dy
∫ y
dx
dx + ∫ f(x) dx = C . In other words
1
2
y +∫ f(x) dx = C. (8.2.13)
2
We obtained an implicit equation for the trajectories, with different C giving different trajectories. The value of C is conserved on any
trajectory. This expression is sometimes called the Hamiltonian or the energy of the system. If you look back to Ch. 1.8, you will
dy
notice that y + f(x) = 0 is an exact equation, and we just found a potential function.
dx
Example 8.2.4:
Let us find the trajectories for the equation x ′′
+x −x
2
= 0 , which is the equation from Example 8.1.1. The corresponding first
order system is
′ ′ 2
x = y, y = −x + x . (8.2.14)
Trajectories satisfy
We solve for y
−−−− −−−−− −−−−−
2
2 3
y = ±√ −x + x + 2C . (8.2.16)
3
Plotting these graphs we get exactly the trajectories in Figure 8.1. In particular we notice that near the origin the trajectories are
closed curves: they keep going around the origin, never spiraling in or out. Therefore we discovered a way to verify that the critical
point at (0, 0) is a stable center. The critical point at (0, 1) is a saddle as we already noticed. This example is typical for
conservative equations.
y = ±√ −2 ∫ f(x) dx + 2C . (8.2.17)
So all trajectories are mirrored across the x-axis. In particular, there can be no spiral sources nor sinks. All critical points occur when
y = 0 (the x-axis), that is when x = 0 . The critical points are simply those points on the x-axis where f(x) = 0 . The Jacobian
′
matrix is
0 1
[ ]. (8.2.18)
′
−f (x) 0
−−−− −−
Therefore ′
λ = ±√−f (x) . In other words, either we get real eigenvalues of opposite signs, or we get purely imaginary eigenvalues.
There are only two possibilities for critical points, either an unstable saddle point, or a stable center. There are never any asymptotically
stable points.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
8.3.1 PENDULUM
g
The first example we will study is the pendulum equation θ ′′
+
L
sin θ = 0 . Here, θ is the angular displacement, g is the gravitational
constant, and L is the length of the pendulum. In this equation we disregard friction, so we are talking about an idealized pendulum.
As we have mentioned before, this equation is a conservative equation, so we will be able to use our analysis of conservative equations
from the previous section. Let us change the equation to a two-dimensional system in variables (θ, ω) by introducing the new variable ω:
′
θ ω
[ ] = [ g ]. (8.3.1)
ω − sin θ
L
g
The critical points of this system are when ω = 0 and − sin θ = 0 , or in other words if sin θ = 0 . So the critical points are when
L
ω = 0 and θ is a multiple of π. That is the points are … (−2π, 0), (−π, 0), (0, 0), (π, 0), (2π, 0) … . While there are infinitely
many critical points, they are all isolated. Let us compute the Jacobian matrix:
∂ ∂
⎡ (ω) (ω) ⎤
∂θ ∂ω 0 1
⎢ ⎥ = [ g ]. (8.3.2)
∂ g ∂ g − cos θ 0
⎣ (− sin θ) (− sin θ) ⎦ L
∂θ L ∂ω L
For conservative equations, there are two types of critical points. Either stable centers, or saddle points. The eigenvalues of the Jacobian
−−−−−−−
g
are λ = ±√− L
cos θ .
The eigenvalues are going to be real when cos θ < 0 . This happens at the odd multiples of π. The eigenvalues are going to be purely
imaginary when cos θ > 0 . This happens at the even multiples of π. Therefore the system has a stable center at the points
… (−2π, 0), (0, 0), (2π, 0) … , and it has an unstable saddle at the points … (−3π, 0), (−π, 0), (π, 0), (3π, 0) … . Look at the
g
phase diagram in Figure 8.6, where for simplicity we let = 1 . L
PIC
Figure 8.6: Phase plane diagram and some trajectories of the nonlinear pendulum equation.
In the linearized equation we only had a single critical point, the center at (0, 0). We can now see more clearly what we meant when we
said the linearization was good for small angles. The horizontal axis is the deflection angle. The vertical axis is the angular velocity of the
pendulum. Suppose we start at θ = 0 (no deflection), and we start with a small angular velocity ω. Then the trajectory keeps going
around the critical point (0, 0) in an approximate circle. This corresponds to short swings of the pendulum back and forth. When θ stays
small, the trajectories really look like circles and hence are very close to our linearization.
When we give the pendulum a big enough push, it will go across the top and keep spinning about its axis. This behavior corresponds to
the wavy curves that do not cross the horizontal axis in the phase diagram. Let us suppose we look at the top curves, when the angular
velocity ω is large and positive. Then the pendulum is going around and around its axis. The velocity is going to be large when the
pendulum is near the bottom, and the velocity is the smallest when the pendulum is close to the top of its loop.
At each critical point, there is an equilibrium solution. The solution θ = 0 is a stable solution. That is when the pendulum is not moving
and is hanging straight down. Clearly this is a stable place for the pendulum to be, hence this is a stable equilibrium.
The other type of equilibrium solution is at the unstable point, for example θ = π . Here the pendulum is upside down. Sure you can
balance the pendulum this way and it will stay, but this is an unstable equilibrium. Even the tiniest push will make the pendulum start
swinging wildly. See Figure 8.7 for a diagram. The first picture is the stable equilibrium θ = 0 . The second picture corresponds to those
"almost circles" in the phase diagram around θ = 0 when the angular velocity is small. The next picture is the unstable equilibrium
θ = π . The last picture corresponds to the wavy lines for large angular velocities.
is conserved by any solution. This is the energy or the Hamiltonian of the system.
We have a conservative equation and so (exercise) the trajectories are given by
−−−−−− − −−−
2g
ω = ±√ cos θ + C , (8.3.4)
L
for various values of C . Let us look at the initial condition of (θ , 0) , that is, we take the pendulum to angle θ , and just let it go (initial
0 0
angular velocity 0). We plug the initial conditions into the above and solve for C to obtain
2g
C = − cos θ0 . (8.3.5)
L
Let us figure out the period. That is, the time it takes for the pendulum to swing back and forth. We notice that the oscillation about the
origin in the phase plane is symmetric about both the θ and the ω axis. That is, in terms of θ, the time it takes from θ to −θ is the same 0 0
as it takes from −θ back to θ . Furthermore, the time it takes from −θ to 0 is the same as to go from 0 to θ . Therefore, let us find
0 0 0 0
how long it takes for the pendulum to go from angle 0 to angle θ , which is a quarter of the full oscillation and then multiply by 4.
0
We figure out this time by finding and integrating from 0 to ω . The period is four times this integral. Let us stay in the region where
dt
0
dθ
−
−−
dt L 1
= √ . (8.3.7)
−−−−−−−−− −
dθ 2g √ cos θ − cos θ
0
The integral is an improper integral, and we cannot in general evaluate it symbolically. We must resort to numerical approximation if we
want to compute a particular T .
g
Recall from Ch. 2.4, the linearized equation θ ′′
+
L
θ = 0 has period
−−
L
Tlinear = 2π √ . (8.3.9)
g
T−Tlin ear
We plot T , T , and the relative error
linear in Figure 8.8. The relative error says how far is our approximation from the real period
T
percentage-wise. Note that T is simply a constant, it does not change with the initial angle θ . The actual period T gets larger and
linear 0
larger as θ gets larger. Notice how the relative error is small when θ is small. It is still only 15% when θ = , that is, a 90 degree
π
0 0 0
2
angle. The error is 3.8% when starting at , a 45 degree angle. At a 5 degree initial angle, the error is only 0.048%.
π
PIC PIC
That is, the period goes to infinity as the initial angle approaches the unstable equilibrium point. So if we put the pendulum almost upside
down it may take a very long time before it gets down. This is consistent with the limiting behavior, where the exactly upside down
pendulum never makes an oscillation, so we could think of that as infinite period.
When there are a lot of hares, there is plenty of food for the foxes, so the fox population grows. However, when the fox population grows,
the foxes eat more hares, so when there are lots of foxes, the hare population should go down, and vice versa. The Lotka-Volterra model
proposes that this behavior is described by the system of equations
′
x = (a − by)x,
′
y = (cx − d)y,
where a, b, c, d are some parameters that describe the interaction of the foxes and hares. In this model, these are all positive numbers.
Let us analyze the idea behind this model. The model is a slightly more complicated idea based on the exponential population model.
First expand,
′
x = (a − by)x = ax − byx. (8.3.11)
The hares are expected to simply grow exponentially in the absence of foxes, that is where the ax term comes in, the growth in
population is proportional to the population itself. We are assuming the hares will always find enough food and have enough space to
reproduce. However, there is another component −byx , that is, the population also is decreasing proportionally to the number of foxes.
Together we can write the equation as (a − by)x , so it is like exponential growth or decay but the constant depends on the number of
foxes.
The equation for foxes is very similar, expand again
′
y = (cx − d)y = cxy − dy. (8.3.12)
The foxes need food (hares) to reproduce: the more food, the bigger the rate of growth, hence the cxy term. On the other hand, there are
natural deaths in the fox population, and hence the −dy term.
Without further delay, let us start with an explicit example. Suppose the equations are
′ ′
x = (0.4 − 0.01y)x, y = (0.003x − 0.3)y. (8.3.13)
See Figure 8.9 for the phase portrait. In this example it makes sense to also plot x and y as graphs with respect to time. Therefore the
second graph in Figure 8.9 is the graph of x and y on the vertical axis (the prey x is the thinner line with taller peaks), against time on the
horizontal axis. The particular trajectory graphed was with initial conditions of 20 foxes and 50 hares.
PIC PIC
Figure 8.9: The phase portrait (left) and graphs of x and y for a sample trajectory (right).
Let us analyze what we see on the graphs. We work in the general setting rather than putting in specific numbers. We start with finding
the critical points. Set (a − by)x = 0 , and (cx − d)y = 0 . The first equation is satisfied if either x = 0 or y = . If x = 0 , the
a
second equation implies y = 0 . If y = , the second equation implies . There are two equilibria: at when there are no
a d
x = (0, 0)
b c
In our specific example x = , and y = . This is the point where there are 100 hares and 40 foxes.
d a
= 100 = 40
c b
0 −d
0
] , so the eigenvalues are a and −d , hence real and of opposite signs. So the critical point at
the origin is a saddle. This makes sense. If you started with some foxes but no hares, then the foxes would go extinct, that is, you would
approach the origin. If you started with no foxes and a few hares, then the hares would keep multiplying without check, and so you would
go away from the origin.
OK, how about the other critical point at ( d
c
,
a
) . Here the Jacobian matrix becomes
b
bd
0 −
c
[ ]. (8.3.15)
ac
0
b
−−
Computing the eigenvalues we get the equation λ + ad = 0 . In other words, λ = ±i √ad . The eigenvalues being purely imaginary,
2
we are in the case where we cannot quite decide using only linearization. We could have a stable center, spiral sink, or a spiral source.
That is, the equilibrium could be asymptotically stable, stable, or unstable. Of course I gave you a picture above that seems to imply it is
a stable center. But never trust a picture only. Perhaps the oscillations are getting larger and larger, but only very slowly. Of course this
would be bad as it would imply something will go wrong with our population sooner or later. And I only graphed a very specific example
with very specific trajectories.
How can we be sure we are in the stable situation? As we said before, in the case of purely imaginary eigenvalues, we have to do a bit
more work. Previously we found that for conservative systems, there was a certain quantity that was conserved on the trajectories, and
hence the trajectories had to go in closed loops. We can use a similar technique here. We just have to figure out what is the conserved
quantity. After some trial and error we find the constant
a d
y x a d −cx−by
C = = y x e (8.3.16)
cx+by
e
is conserved. Such a quantity is called the constant of motion. Let us check C really is a constant of motion. How do we check, you say?
Well, a constant is something that does not change with time, so let us compute the derivative with respect to time:
′ a−1 ′ d −cx−by a d−1 ′ −cx−by a d −cx−by ′ ′
C = ay y x e +y dx x e +y x e (−c x − b y ). (8.3.17)
Our equations give us what x and y are so let us plug those in:
′ ′
a d −cx−by
= y x e (a(cx − d) + d(a − by) + (−c(a − by)x − b(cx − d)y))
= 0.
a d
y x
So along the trajectories C is constant. In fact, the expression C = cx+by
gives us an implicit equation for the trajectories. In any case,
e
a d
y x
once we have found this constant of motion, it must be true that the trajectories are simple curves, that is, the level curves of cx+by
. It
e
turns out, the critical point at ( , ) is a maximum for C (left as an exercise). So ( is a stable equilibrium point, and we do not
d a d a
, )
c b c b
have to worry about the foxes and hares going extinct or their populations exploding.
One blemish on this wonderful model is that the number of foxes and hares are discrete quantities and we are modeling with continuous
variables. Our model has no problem with there being 0.1 fox in the forest for example, while in reality that makes no sense. The
approximation is a reasonable one as long as the number of foxes and hares are large, but it does not make much sense for small numbers.
One must be careful in interpreting any results from such a model.
An interesting consequence (perhaps counterintuitive) of this model is that adding animals to the forest might lead to extinction, because
the variations will get too big, and one of the populations will get close to zero. For example, suppose there are 20 foxes and 50 hares as
before, but now we bring in more foxes, bringing their number to 200. If we run the computation, we will find the number of hares will
plummet to just slightly more than 1 hare in the whole forest. In reality that will most likely mean the hares die out, and then the foxes
will die out as well as they will have nothing to eat.
Showing that a system of equations has a stable solution can be a very difficult problem. In fact, when Isaac Newton put forth his laws of
planetary motions, he proved that a single planet orbiting a single sun is a stable system. But any solar system with more than 1 planet
proved very difficult indeed. In fact, such a system will behave chaotically (see Ch. 8.5), meaning small changes in initial conditions will
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
where μ is some positive constant. The Van der Pol oscillator comes up often in applications, for example in electrical circuits.
For simplicity, let us use μ = 1 . A phase diagram is given in the left hand plot in Figure 8.10. Notice how the trajectories seem to
very quickly settle on a closed curve. On the right hand plot we have the plot of a single solution for t = 0 to t = 30 with initial
conditions x(0) = 0.1 and x (0) = 0.1 . Notice how the solution quickly tends to a periodic solution.
′
PIC PIC
Figure 8.10: The phase portrait (left) and graphs of sample solutions of the Van der Pol oscillator.
The Van der Pol oscillator is an example of so-called relaxation oscillation. The word relaxation comes from the sudden jump (the
very steep part of the solution). For larger μ the steep part becomes even more pronounced, for small μ the limit cycle looks more
like a circle. In fact setting μ = 0 , we get x + x = 0 , which is a linear system with a center and all trajectories become circles.
′′
The closed curve in the phase portrait above is called a limit cycle. A limit cycle is a closed trajectory such that at least one other
trajectory spirals into it (or spirals out of it). If all trajectories that start near the limit cycle spiral into it, the limit cycle is called
asymptotically stable. The limit cycle in the Van der Pol oscillator is asymptotically stable.
Given a limit cycle on an autonomous system, any solution that starts on it is periodic. In fact, this is true for any trajectory that is a
closed curve (a so-called closed trajectory). Such a curve is called a periodic orbit. More precisely, if (x(t), y(t)) is a solution such
that for some t the point (x(t ), y(t )) lies on a periodic orbit, then both x(t) and y(t) are periodic functions (with the same
0 0 0
period). That is, there is some number P such that x(t) = x(t + P ) and y(t) = y(t + P ) .
Consider the system
′ ′
x = f(x, y), y = g(x, y), (8.4.2)
the solution is a periodic function, or the solution spirals towards a periodic solution in R.
The main point of the theorem is that if you find one solution that exists for all t large enough (that is, we can let t go to infinity) and
stays within a bounded region, then you have found either a periodic orbit, or a solution that spirals towards a limit cycle. That is, in
the long term, the behavior will be very close to a periodic function. We should take the theorem more as a qualitative statement rather
than something to help us in computations. In practice it is hard to find solutions and therefore hard to show rigorously that they exist
for all time. Another caveat to consider is that the theorem only works in two dimensions. In three dimensions and higher, there is
simply too much room.
Let us next look when limit cycles (or periodic orbits) do not exist. We will assume the equation (8.4.2) is defined on a simply
connected region, that is, a region with no holes we could go around. For example the entire plane is a simply connected region, and so
is the inside of the unit disc. However, the entire plane minus a point is not a simply connected domain as it has a "hole" at the origin.
Theorem 8.4.2 (Bendixson-Dulac). Suppose f and g are defined in a simply connected region R. If the expression
∂f ∂g
+ (8.4.3)
∂x ∂y
is either always positive or always negative on R (except perhaps a small set such as on isolated points or curves) then the system
(8.4.2) has no closed trajectory inside R.
The theorem gives us a way of ruling out the existence of a closed trajectory, and hence a way of ruling out limit cycles. The exception
about points or lines really means that we can allow the expression to be zero at a few points, or perhaps on a curve, but not on any
larger set.
Example 8.4.2:
In some books (or the internet) the theorem is not stated carefully and it concludes there are no periodic solutions. That is not quite
right. The above example has two critical points and hence it has constant solutions, and constant functions are periodic. The
conclusion of the theorem should be that there exist no trajectories that form closed curves. Another way to state the conclusion of the
theorem would be to say that there exist no nonconstant periodic solutions that stay in R.
Example 8.4.3:
Let us look at a somewhat more complicated example. Take the system x ′
= −y − x
2
,y ′
= −x + y
2
(see Example 8.2.1). We
∂f ∂g
compute + = 2x + 2y . This expression takes on both signs, so if we are talking about the whole plane we cannot simply
∂x ∂y
apply the theorem. However, we could apply it on the set where x + y > 0 . Via the theorem, there is no closed trajectory in that
set. Similarly, there is no closed trajectory in the set x + y < 0 . We cannot conclude (yet) that there is no closed trajectory in the
entire plane. Perhaps half of it is in the set where x + y > 0 and the other half is in the set where x + y < 0 .
The key is to look at the set x + y = 0 , or x = −y . Let us make a substitution x = z and y = −z (so that x = −y ). Both
equations become z = z − z . So any solution of z = z − z , gives us a solution x(t) = z(t) , y(t) = −z(t) . In particular,
′ 2 ′ 2
any solution that starts out on the line x + y = 0 , stays on the line x + y = 0 . In other words, there cannot be a closed trajectory
that starts on the set where x + y > 0 and goes through the set where x + y < 0 , as it would have to pass through x + y = 0 .
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
′ ′ ′
8
x = −10x + 10y, y = 28x − y − xz, z = − z + xy. (8.5.1)
3
A small change in the initial conditions yield a very different solution after a reasonably short time. A very simple example the reader
can experiment with, which displays chaotic behavior, is a double pendulum. The equations that govern this system are somewhat
complicated and their derivation is quite tedious, so we will not bother to write them down. The idea is to put a pendulum on the end of
another pendulum. If you look at the movement of the bottom mass, the movement will appear chaotic. This type of system is a basis
for a whole number of office novelty desk toys. It is very simple to build a version. Take a piece of a string, and tie two heavy nuts at
different points of the string; one at the end, and one a bit above. Now give the bottom nut a little push, as long as the swings are not
too big and the string stays tight, you have a double pendulum system.
8.5.1 Duffing equation and strange attractors
Let us study the so-called Duffing equation:
′′ ′ 3
x + ax + bx + c x = C cos(ωt). (8.5.2)
Here a, b, c , C , and ω are constants. You will recognize that except for the cx term, this equation looks like a forced mass-spring
3
system. The cx term comes up when the spring does not exactly obey Hooke's law (which no real-world spring actually does obey
3
exactly). When c is not zero, the equation does not have a nice closed form solution, so we have to resort to numerical solutions as is
usual for nonlinear systems. Not all choices of constants and initial conditions will exhibit chaotic behavior. Let us study
′′ ′ 3
x + 0.05 x + x = 8 cos(t). (8.5.3)
The equation is not autonomous, so we will not be able to draw the vector field in the phase plane. We can still draw the trajectories
however.
In Figure 8.11 we plot trajectories for t going from 0 to 15, for two very close initial conditions (2, 3) and (2, 2.9), and also the
solutions in the (x, t) space. The two trajectories are close at first, but after a while diverge significantly. This sensitivity to initial
conditions is precisely what we mean by the system behaving chaotically.
PIC
PIC
Figure 8.12: The solution to the given Duffing equation for t from 0 to 100.
Let us see the long term behavior. In Figure 8.12, we plot the behavior of the system for initial conditions (2, 3), but for much longer
period of time. Note that for this period of time it was necessary to use a ridiculously large number of steps in the numerical algorithm
used to produce the graph, as even small errors quickly propagate. From the graph it is hard to see any particular pattern in the shape of
the solution except that it seems to oscillate, but each oscillation appears quite unique. The oscillation is expected due to the forcing
term.
In general it is very difficult to analyze chaotic systems, or to find the order behind the madness, but let us try to do something that we
did for the standard mass-spring system. One way we analyzed what happens is that we figured out what was the long term behavior
(not dependent on initial conditions). From the figure above it is clearthat we will not get a nice description of the long term behavior,
but perhaps we can figure out some order to what happens on each "oscillation" and what do these oscillations have in common.
The concept we will explore is that of a Poincare section. Instead of looking at t in a certain interval, we will look at where the system
is at a certain sequence of points in time. Imagine flashing a strobe at a certain fixed frequency and drawing the points where the
solution is during the flashes. The right strobing frequency depends on the system in question. The correct frequency to use for the
forced Duffing equation (and other similar systems) is the frequency of the forcing term. For the Duffing equation above, find a
solution (x(t), y(t)) , and look at the points
As we are really not interested in the transient part of the solution, that is, the part of the solution that depends on the initial condition
we skip some number of steps in the beginning. For example, we might skip the first 100 such steps and start plotting points at
t = 100(2π) , that is
The plot of these points is the Poincarè section. After plotting enough points, a curious pattern emerges in Figure 8.13 (the left hand
picture), a so-called strange attractor.
PIC
PIC
Figure 8.13: Strange attractor. The left plot is with no phase shift, the right plot has phase shift π
4
.
If we have a sequence of points, then an attractor is a set towards which the points in the sequence eventually get closer and closer to,
that is, they are attracted. The Poincarè section above is not really the attractor itself, but as the points are very close to it, we can see
its shape. The strange attractor in the figure is a very complicated set, and it in fact has fractal structure, that is, if you would zoom in
as far as you want, you would keep seeing the same complicated structure.
The initial condition does not really make any difference. If we started with different initial condition, the points would eventually
gravitate towards the attractor, and so as long as we throw away the first few points, we always get the same picture.
An amazing thing is that a chaotic system such as the Duffing equation is not random at all. There is a very complicated order to it, and
the strange attractor says something about this order. We cannot quite say what state the system will be in eventually, but given a fixed
strobing frequency we can narrow it down to the points on the attractor.
If you would use a phase shift, for example π
4
, and look at the times
π π π π
, 2π + , 4π + , 6π + , … (8.5.6)
4 4 4 4
you would obtain a slightly different looking attractor. The picture is the right hand side of Figure 8.13. It is as if we had rotated,
distorted slightly, and then moved the original. Therefore for each phase shift you can find the set of points towards which the system
periodically keeps coming back to.
You should study the pictures and notice especially the scales---where are these attractors located in the phase plane. Notice the regions
where the strange attractor lives and compare it to the plot of the trajectories in Figure 8.11.
Let us compare the discussion in this section to the discussion in Ch. 2.6 about forced oscillations. Take the equation
F0
′′ ′ 2
x + 2p x + ω x = cos(ωt). (8.5.7)
0
m
Strobing using the frequency ω we would obtain a single point in the phase space. So the attractor in this setting is a single point---an
expected result as the system is not chaotic. In fact it was the opposite of chaotic. Any difference induced by the initial conditions dies
away very quickly, and we settle into always the same steady periodic motion.
8.5.2 The Lorenz system
In two dimensions to have the kind of chaotic behavior we are looking for, we have to study forced, or non-autonomous, systems such
as the Duffing equation. Due to the Poincarè -Bendoxson Theorem, if an autonomous two-dimensional system has a solution that exists
for all time in the future and does not go towards infinity, then we obtain a limit cycle or a closed trajectory. Hardly the chaotic
behavior we are looking for.
Let us very briefly return to the Lorenz system
′ ′ ′
8
x = −10x + 10y, y = 28x − y − xz, z = − z + xy. (8.5.9)
3
The Lorenz system is an autonomous system in three dimensions exhibiting chaotic behavior. See the Figure 8.14 for a sample
trajectory.
PIC
draw it. Roll a die, and use it to pick of the p , p , or p randomly (for example 1 and 4 mean p , 2 and 5 mean p , and 3 and 6 mean
1 2 3 1 2
new point p . Rinse, repeat. Try to be precise and draw as many iterations as possible. Your points should be attracted to the so-
new
called Sierpinski triangle. A computer was used to run the game for 10,000 iterations to obtain the picture in Figure 8.16.
PIC
Figure 8.16: 10,000 iterations of the chaos game producing the Sierpinski triangle.
Exercise 8.5.3:[project] Construct the double pendulum described in the text with a string and two nuts (or heavy beads). Play around
with the position of the middle nut, and perhaps use different weight nuts. Describe what you find.
Exercise 8.5.4:[computer project] Use a computer software (such as Matlab, Octave, or perhaps even a spreadsheet), plot the solution
of the given forced Duffing equation with Euler's method. Plotting the solution for t from 0 to 100 with several different (small) step
sizes. Discuss.
Exercise 8.5.101: Find critical points of the Lorenz system and the associated linearizations.
CONTRIBUTORS
Jiří Lebl (Oklahoma State University).These pages were supported by NSF grants DMS-0900885 and DMS-1362337.
Exercise 8.1.3: Find the critical points and linearizations of the following systems.
a) x ′
= x
2
−y
2
,y ′
= x
2
+y
2
−1 ,
b) x ′
= −y ,y ′
= 3x + yx
2
,
c) x ′
= x
2
+y ,y ′
= y
2
+x .
Exercise 8.1.4: For the following systems, verify they have critical point at (0, 0), and find the linearization at (0, 0).
a) x ′
= x + 2y + x
2
−y
2
,y ′
= 2y − x
2
b) x ′
= −y ,y ′
= x −y
3
c) x = ax + by + f(x, y) , y
′ ′
= cx + dy + g(x, y) , where f(0, 0) = 0 , g(0, 0) = 0 , and all first partial derivatives of f and g
are also zero at (0, 0), that is,
∂f ∂f ∂g ∂g
∂x
(0, 0) =
∂y
(0, 0) =
∂x
(0, 0) =
∂y
(0, 0) = 0 .
Exercise 8.1.5:Take x ′
= (x − y)
2
,y ′
= (x + y)
2
.
a) Find the set of critical points.
b) Sketch a phase diagram and describe the behavior near the critical point(s).
c) Find the linearization. Is it helpful in understanding the system?
Exercise 8.1.6: Take x ′
= x
2
,y ′
= x
3
.
a) Find the set of critical points.
b) Sketch a phase diagram and describe the behavior near the critical point(s).
c) Find the linearization. Is it helpful in understanding the system?
Exercise 8.1.101: Find the critical points and linearizations of the following systems.
a) x ′
= sin(πy) + (x − 1 )
2
,y ′
= y
2
−y ,
b) x ′
= x +y+y
2
,y ′
= x ,
c) x ′
= (x − 1 )
2
+y ,y ′
= x
2
+y .
Exercise 8.1.102: Match systems
1) x ′
= y
2
,y ′
= −x
2
, 2) x ′
= y ,y ′
= (x − 1)(x + 1) , 3) x′
= y+x
2
,y ′
= −x , to the vector fields below. Justify.
a) PIC b) PIC c) PIC
Exercise 8.1.103: The idea of critical points and linearization works in higher dimensions as well. You simply make the Jacobian
matrix bigger by adding more functions and more variables. For the following system of 3 equations find the critical points and their
linearizations:
′ 2
x = x +z ,
′ 2
y = z − y,
′ 2
z = z+x .
Exercise 8.1.1: Any two-dimensional non-autonomous system x = f(x, y, t) , y = g(x, y, t) can be written as a three-dimensional ′ ′
autonomous system (three equations). Write down this autonomous system using the variables u, v, w.
Exercise 8.2.2: Find the implicit equations of the trajectories of the following conservative systems. Next find their critical points (if
any) and classify them.
a) x ′′
+x +x
3
= 0 b) θ ′′
+ sin θ = 0 c) z ′′
+ (z − 1)(z + 1) = 0 d) x ′′
+x
2
+1 = 0
point of the form (0, y ) ,find what is the trajectory. c) Can a trajectory starting at (x , y ) where x > 0 spiral into the critical point
0 0 0 0
Exercise 8.2.102: Find the implicit equations of the trajectories of the following conservative systems. Next find their critical points (if
any) and classify them. a) x + x = 4 b) x + e = 0 c) x + (x + 1)e = 0
′′ 2 ′′ x ′′ x
derivative. A point x is critical when f(x ) = 0 and almost linear if in addition f (x ) ≠ 0 . Figure out if the critical point is stable
0 0
′
0
L
g
friction). a) Suppose μ = 1 and = 1 for simplicity, find and classify the critical points. b) Do the same for any μ > 0 and any g
L
g
and L, but such that the damping is small, in particular, μ
2
< 4( ) . c) Explain what your findings mean, and if it agrees with what
L
For the following two values of γ, find and classify all the critical points in the positive quadrant, that is, for x ≥ 0 and y ≥ 0 . Then
sketch the phase diagram. Discuss the implication for the long term behavior of the population. a) γ = 0.001 , b) γ = 0.01 .
yx
Exercise 8.3.3: a) Suppose x and y are positive variables. Show e
x+y
attains a maximum at (1, 1) . b) Suppose a, b, c, d are positive
a d
y x
constants, and also suppose x and y are positive variables. Show ecx+by
attains a maximum at ( d
c
,
a
b
) .
Exercise 8.3.4: Suppose that for the pendulum equation we take a trajectory giving the spinning-around motion, for example
−−−−−−−−−−−−−−
2g 2g
ω = √
L
cos θ +
L
+ω
2
0
. This is the trajectory where the lowest angular velocity is ω . Find an integral expression for how long it 2
0
such that for any higher initial angular velocity, the pendulum will keep going around its axis, and for any lower initial angular
velocity, the pendulum will simply swing back and forth. Hint: When the pendulum doesn't go over the top the expression for ω will be
undefined for some θs. c) What do you think happens if the initial condition is (0, ω ), that is, the initial angle is 0, and the initial 1
g
Exercise 8.3.101: Take the damped nonlinear pendulum equation θ + μθ + ( ) sin θ = 0 for some μ > 0 (that is, there is ′′ ′
L
g
friction). Suppose the friction is large, in particular μ > 4( ) . a) Find and classify the critical points. b) Explain what your findings
2
constants a = 0.4 , b = 0.01 , c = 0.003 , d = 0.3 , h = 10 . Analyze the critical points. What do you think it says about the forest?
Exercise 8.3.103:[challenging] Suppose the foxes never die. That is, we have the system x = (a − by)x, y = cxy . Find the critical
′ ′
points and notice they are not isolated. What will happen to the population in the forest if it starts at some positive numbers. Hint:
Think of the constant of motion.
′
Exercise 8.4.2: Formulate a condition for a 2-by-2 linear system x⃗ = Ax⃗ to not be a center using the Bendixson-Dulac theorem. That
is, the theorem says something about certain elements of A .
Exercise 8.4.3: Explain why the Bendixson-Dulac Theorem does not apply for any conservative system x ′′
+ h(x) = 0 .
Exercise 8.4.4: A system such as x = x, y = y has solutions that exist for all time t, yet there are no closed trajectories or other
′ ′
limit cycles. Explain why the Poincare-Bendixson Theorem does not apply.
Exercise 8.4.5: Differential equations can also be given in different coordinate systems. Suppose we have the system r = 1 − r , ′ 2
θ = 1 given in polar coordinates. Find all the closed trajectories and check if they are limit cycles and if so, if they are asymptotically
′
stable or not.
Exercise 8.4.101: Show that the following systems have no closed trajectories. a) x ′
= x +y
2
,y ′
= y+x
2
, b) x ′
= −x sin (y)
2
,
y = e , c) x = xy , y = x + x .
′ x ′ ′ 2
Exercise 8.4.102: Suppose an autonomous system in the plane has a solution x = cos(t) + e
−t
, y = sin(t) + e
−t
. What can you
say about the system (in particular about limit cycles and periodic solutions)?
Exercise 8.4.103: Show that the limit cycle of the Van der Pol oscillator (for μ > 0 ) must not lie completely in the set where
−−− −−−
1+μ 1+μ
−√
μ
< x < √
μ
.
8.5: CHAOS