0% found this document useful (0 votes)
134 views

Differential Equations With Linear Algeb PDF

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
134 views

Differential Equations With Linear Algeb PDF

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 157

Differential Equations with Linear Algebra

Ben Woodruff1

Typeset on April 8, 2013

1
Mathematics Faculty at Brigham Young University–Idaho, [email protected]

c 2013 Ben Woodruff. Some Rights Reserved.

This work is licensed under the Creative Commons Attribution-Share Alike


3.0 United States License. You may copy, distribute, display, and perform
this copyrighted work, but only if you give credit to Ben Woodruff, and all
derivative works based upon it must be published under the Creative Commons
Attribution-Share Alike 3.0 United States License. Please attribute this work
to Ben Woodruff, Mathematics Faculty at Brigham Young University–Idaho,
[email protected]. To view a copy of this license, visit
http://creativecommons.org/licenses/by-sa/3.0/us/

or send a letter to Creative Commons, 171 Second Street, Suite 300, San
Francisco, California, 94105, USA.
Contents

1 Review 1
1.1 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Laplace Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Ordinary Differential Equations . . . . . . . . . . . . . . . . . . . 4
1.4 General Functions and Derivatives . . . . . . . . . . . . . . . . . 5
1.4.1 The General Chain Rule . . . . . . . . . . . . . . . . . . . 6
1.5 Potentials of Vector Fields and Differential Forms . . . . . . . . . 8
1.6 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

2 Linear Algebra Arithmetic 10


2.1 Basic Notation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 Gaussian Elimination . . . . . . . . . . . . . . . . . . . . . . . . . 15
2.3 Rank, Linear Independence, Inverses, and Determinants . . . . . 20
2.4 Eigenvalues and Eigenvectors . . . . . . . . . . . . . . . . . . . . 26
2.5 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28

3 Linear Algebra Applications 29


3.1 Vector Fields . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29
3.1.1 Second Derivative Test . . . . . . . . . . . . . . . . . . . . 31
3.2 Conservation Laws . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.1 Stoichiometry . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.2.2 Kirchoff’s Electrical Laws . . . . . . . . . . . . . . . . . . 35
3.2.3 Markov Processes . . . . . . . . . . . . . . . . . . . . . . . 37
3.3 Cramer’s Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
3.4 Curve Fitting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.4.1 Interpolating Polynomials . . . . . . . . . . . . . . . . . . 42
3.4.2 Least Squares Regression . . . . . . . . . . . . . . . . . . 43
3.5 Partial Fraction Decompositions . . . . . . . . . . . . . . . . . . 46
3.6 Linear Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
3.7 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

4 First Order ODEs 50


4.1 Basic Concepts and Vocabulary . . . . . . . . . . . . . . . . . . . 51
4.2 Solution Techniques . . . . . . . . . . . . . . . . . . . . . . . . . 54
4.2.1 Use integrating factor when the ODE is not exact . . . . 56
4.2.2 Use a substitution when you can’t get an integrating factor. 59
4.3 Laplace Transforms . . . . . . . . . . . . . . . . . . . . . . . . . . 60
4.4 What Method Should I Use? . . . . . . . . . . . . . . . . . . . . 63
4.5 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

ii
CONTENTS iii

5 Homogeneous ODEs 66
5.1 Some Physical Models . . . . . . . . . . . . . . . . . . . . . . . . 67
5.2 Notation, Vocabulary, and Solutions . . . . . . . . . . . . . . . . 69
5.3 Mass-Spring Systems . . . . . . . . . . . . . . . . . . . . . . . . . 76
5.4 Higher Order ODEs . . . . . . . . . . . . . . . . . . . . . . . . . 78
5.5 Existence and Uniqueness . . . . . . . . . . . . . . . . . . . . . . 78
5.6 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 79

6 Non Homogeneous ODEs 80


6.1 Non Homogeneous Linear Systems . . . . . . . . . . . . . . . . . 80
6.2 Solving Non Homogeneous ODEs . . . . . . . . . . . . . . . . . . 83
6.2.1 Learning to Guess Appropriately . . . . . . . . . . . . . . 85
6.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89
6.3.1 Electric circuits . . . . . . . . . . . . . . . . . . . . . . . . 91
6.4 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93

7 Laplace Transforms 94
7.1 Review . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95
7.2 Piecewise Defined Functions . . . . . . . . . . . . . . . . . . . . . 96
7.2.1 The Heaviside function u(t − a) . . . . . . . . . . . . . . . 97
7.2.2 The Dirac-Delta distribution δ(t − a) and impulses. . . . 101
7.3 Convolutions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
7.4 Extra Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
7.5 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107

8 Power Series 108


8.1 MacLaurin Series . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
8.1.1 MacLaurin Series and ODEs . . . . . . . . . . . . . . . . 108
8.2 Radius of Convergence . . . . . . . . . . . . . . . . . . . . . . . . 116
8.3 Special Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 120
8.3.1 The Gamma Function . . . . . . . . . . . . . . . . . . . . 123
8.4 Extra Practice Problems . . . . . . . . . . . . . . . . . . . . . . . 125
8.5 Extra Practice Solutions . . . . . . . . . . . . . . . . . . . . . . . 126
8.6 Special Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . 126
8.7 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127

9 Systems of ODEs 128


9.1 Bringing it all together . . . . . . . . . . . . . . . . . . . . . . . . 128
9.2 The Matrix Exponential . . . . . . . . . . . . . . . . . . . . . . . 133
9.3 Solving Non Homogeneous ODEs . . . . . . . . . . . . . . . . . . 138
9.4 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 140
9.5 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142
9.6 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 143

10 Fourier Series and PDEs 145


10.1 Fourier Series . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 145
10.2 Wrap Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 150
10.3 Problems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 151
Chapter 1

Review

This chapter covers the following ideas.

1. Graph basic functions by hand. Compute derivatives and integrals, in


particular using the product rule, quotient rule, chain rule, integration by
u-substitution, and integration by parts (the tabular method is useful for
simplifying notation). Explain how to find a Laplace transform.
2. Explain how to verify a function is a solution to an ODE, and illustrate
how to solve separable ODEs.
3. Explain how to use the language of functions in high dimensions and how
to compute derivatives using a matrix. Illustrate the chain rule in high
dimensions with matrix multiplication.
4. Graph the gradient of a function together with several level curves to
illustrate that the gradient is normal to level curves.
5. Explain how to test if a differential form is exact (a vector field is conser-
vative) and how to find a potential.

1.1 Basics
We need to review our ability to graph functions with multiple inputs and/or
outputs. The next few problems ask you to practice some skills that will be
crucial as the course progresses.

Problem 1.1 Construct graphs of the following functions. Explain how


to obtain each graph by transforming and rescaling the first. Then state the
amplitude and period of the function.
1. y = sin(x)
2. y = 5 sin(x) + 1
3. y = 4 sin(3(x − π)) + 2
4. y = 4 sin(3x − π) + 2

Problem 1.2 Consider the function f (x) = e−x .


1. Construct graphs of y = f (x) and y = 2f (−(x + 3)) − 1.

1
CHAPTER 1. REVIEW 2

2. State limx→∞ f (x) and limx→−∞ f (x) from your graph.


3. Compute limx→∞ xf (x) and limx→∞ x2 f (x). [Hint: L’Hopital’s rule will
help.]

As the semester progresses, we’ll need the functions

ex + e−x ex − e−x
cosh x = and sinh x = .
2 2
These functions are the hyperbolic trig functions, and we say the hyperbolic
sine of x when we write sinh x. These functions are very similar to sine and
cosine functions, and have very similarly properties.
d
Problem 1.3 Three useful facts about the trig functions are (1) dx sin x =
d 2 2
cos x, (2) dx cos x = − sin x, and (3) cos x + sin x = 1. Use the definitions
above to show the following:
d
1. dx sinh x = cosh x,
d
2. dx cosh x = sinh x, and

3. cosh2 x − sinh2 x = 1.
[Hint: Start by replacing the hyperbolic function with its definition in terms of
exponentials. Then perform the computations.]

Problem 1.4 The three facts from the previous problem are crucial tools
d
need to prove that dx tan x = sec2 x.
d
1. Use the quotient rule to give a formula for dx tanh x in terms of hyperbolic
trig functions.
1
2. Similarly obtain a formula for the derivative of sech x = cosh x .
d
3. What is dx csch x?

You might ask why these function are called the hyperbolic trig functions.
What does a hyperbola have to do with anything?

Problem 1.5 Each pair of parametric equations traces out a curve in the
xy plane. Given a Cartesian equation of the curve by eliminating the parameter
t, and then graph the curve.
1. x = cos t, y = sin t, −2π < t < 2π.
2. x = cosh t, y = sinh t, −∞ < t < ∞.
Give a reason as to why do we call cosh the hyperbolic cosine.

Problem 1.6 Use implicit differentiation to find the derivative of y =


sinh−1 x. Your answer should not involve any hyperbolic trig functions, and
should be in terms of x. [Hint: First write x = sinh(y), and then implicitly
differentiate both sides. You’ll need the key identity from a few problems above
to help you finish.]
CHAPTER 1. REVIEW 3

The problems above asked you to review your differentiation skills. You’ll
want to make sure you can use the basic rules of differentiation (such as the
power, product, quotient, and chain rules). The next few problems will help you
review your integration techniques, and you will apply them to two new ideas.

Problem 1.7 Compute the three integrals


Z Z 1 Z ∞
2 2 2
xe−x dx and xe−x dx and xe−x dx.
0 0

If you have never used the tabular method to perform integration-by-parts,


I strongly suggest that you open the online text and read a few examples (see
the bottom of page 2).
Z Z
Problem 1.8 Compute x sin(5x)dx and x2 sin(5x)dx.

Z
1
Problem 1.9 Compute tanh−1 xdx. The derivative of tanh−1 x is .
1 − x2

1.2 Laplace Transforms


Definition 1.1: The Laplace Transform. Let f (t) be a function that is
defined for all t ≥ 0. Using the function f (t), we define the Laplace transform
of f to be a few function F where for each s we obtain the value by computing
the integral Note that the Laplace transform
Z ∞
of a function with independent
F (s) = L {f (t)} = e−st f (t)dt. variable t is another function with
0 a different independent variable s.
The domain of F is the set of all s such that the improper integral above After integration, all t’s will be
removed from F (s). You can of
converges. The function f (t) is called the inverse Laplace transform of F (s),
course use any other letters
and we write f (t) = L −1 (F (s)). besides t and s.

We will use the Laplace transform throughout the semester to help us solve
many problems related to mechanical systems, electrical networks, and more.
The mechanical and electrical engineers in this course will use Laplace transforms
in many future courses. Our goal in the problems that follow is to practice
integration-by-parts. As an extra bonus, we’ll learn the Laplace transforms of
some basic functions.
Z ∞
Problem 1.10 Compute the integral e−st dt, and state for which s the
0
integral converges. What is the Laplace transform of f (t) = 1? (If the last
question seems redundant, then horray.)

Problem 1.11 Compute the Laplace transform of f (t) = e2t , and state
the domain. Then compute the Laplace transform of f (t) = e3t and state the
domain. Finally, compute the Laplace transform of f (t) = eat for any a, and
state the domain.
CHAPTER 1. REVIEW 4

Problem 1.12 Suppose s > 0 and n is a positive integer. Explain why

tn
lim = 0.
t→∞ est

Use this fact to prove that the Laplace transform of t2 is


2
L {t2 } .
s3
[You’ll need to do integration-by-parts twice, try the tabular method.]

Problem 1.13 In the previous problems, you showed that

1 2
L {t0 } = and L {t2 } = .
s1 s3
1
Show that the Laplace transform of t is L {t1 } = . Then compute the Laplace
s2
3 4
transforms of t , t , and so on until you see a pattern. Use this pattern to state
the Laplace transform of t1 0 and tn , provided n is a positive integer. [Hint: Try
the tabular method of integration-by-parts. After evaluating at 0 and ∞, all
terms but 1 will be zero.]

Theorem 1.2. Since integration can be done term-by-term, and constants can
be pulled out of the integral, we have the crucial fact that

L {af (t) + bg(t)} = aL {f (t)} + bL {g(t)}

for functions f, g and constants a, b.

Problem 1.14 Without integrating, rather using the results above, compute
the Laplace transform L(3 + 5t2 − 6e8t ), and state the domain.

et + e−t et − e−t
Problem 1.15 Recall that cosh t = and sinh t = . Use
2 2
this to prove that
s a
L {cosh at} = and L {sinh at} = .
s2 − a2 s2 − a2

1.3 Ordinary Differential Equations


A differential equation is an equation which involves derivatives (of any order)
of some function. For example, the equation y 00 + xy 0 + sin(xy) = xy 2 is
a differential equation. An ordinary differential equation (ODE) is a
differential equation involving an unknown function y which depends on only
one independent variable (often x or t). A partial differential equation involves
an unknown function y that depends on more than one variable (such as y(x, t)).
The order of an ODE is the order of the highest derivative in the ODE. A
solution to an ODE on an interval (a, b) is a function y(x) which satisfies the
ODE on (a, b).
CHAPTER 1. REVIEW 5

Example 1.3. The first order ODE y 0 (x) = 2x, or just y 0 = 2x, has unknown
function y with independent variable x. A solution on (−∞, ∞) is the function
y = x2 + C for any constant C. We obtain this solution by simply integrating
both sides. Notice that there are infinitely many solutions to this ODE.
Typically a solution to an ODE involves an arbitrary constant C. There is
often an entire family of curves which satisfy a differential equation, and the
constant C just tells us which curve to pick. A general solution of an ODE is
an infinite class of solutions of the ODE. A particular solution is one of the
infinitely many solutions of an ODE.
Often an ODE comes with an initial condition y(x0 ) = y0 for some values
x0 and y0 . We can use these initial conditions to find a particular solution of the
ODE. An ODE, together with an initial condition, is called an initial value
problem (IVP).
Example 1.4. The IVP y 0 = 2x, y(2) = 1, has the general solution y = x2 + C
from the previous problem. Since y = 1 when x = 2, we have 1 = 22 + C which
means C = −3. Hence the solution to our IVP is y = x2 − 3.
Problem 1.16 Consider the ordinary differential equation y 00 + 9y = 0. By
computing derivatives, show that y(t) = A cos(3t)+B sin(3t) is a general solution
to the ODE, where A and B are arbitrary constants. If we know that y(0) = 1
and y 0 (0) = 2, determine the values of A and B.

dy
Problem 1.17 Consider the ordinary differential equation y = x2 . Find
dx
a general solution to this ODE by integrating both sides with respect to x. State
an interval on which your solution is valid.

They could introduce the entire method of separation by parts without me


telling them what to do. I just need to ask them to do an integral. Afterward, I
could ask them to solve an ODE. Put it in the same problem.
Problem 1.18 Consider the ODE given by y 0 = 4ty. Find a general solution
dy
to this ODE. [Hint: Rewrite y 0 as . Then put all the terms that involve y
dt
on one side of the equation, and the terms that involve t on the other. Then it
should be similar to the previous problem.]

x2 − 1
Problem 1.19 Solve the IVP given by y 0 = , where y(0) = 1.
y4 + 1

1.4 General Functions and Derivatives


Recall that to compute partial derivatives, we hold all but one variable constant
and then differentiate with respect to that variable. Partial derivatives can be
organized into a matrix Df where columns represents the partial derivative
of f with respect to each variable. This matrix, called the derivative or total
derivative, takes us into our study of linear algebra. Some examples of functions
and their derivatives appear in Table 1.1. When the output dimension is one,
the matrix has only one row and the derivative is often called the gradient of f ,
written ∇f .
In multivariate calculus, we focused our time on learning to graph, differen-
tiate, and analyze each of the types of functions in the table above. The next
few problems ask you to review this.
CHAPTER 1. REVIEW 6

Function Derivative

f (x) = x2 Df (x) = [2x]


 
−3 sin t
~r(t) = (3 cos(t), 2 sin(t)) D~r(t) =
2 cos t
 
− sin t
~r(t) = (cos(t), sin(t), t) D~r(t) =  cos t 
1
f (x, y) = 9 − x2 − y 2 Df (x, y) = ∇f (x, y) = [−2x −2y]
 
f (x, y, z) = x2 + y + xz 2 Df (x, y, z) = ∇f (x, y, z) = 2x + z 2 1 2xz
 
0 −1
F~ (x, y) = (−y, x) DF~ (x, y) =
1 0
 
cos θ −r sin θ 0
F~ (r, θ, z) = (r cos θ, r sin θ, z) DF~ (r, θ, z) =  sin θ r cos θ 0
0 0 1
 
1 0
~r(u, v) = (u, v, 9 − u2 − v 2 ) D~r(u, v) =  0 1 
−2u −2v

Table 1.1: The table above shows the (matrix) derivative of various functions.
Each column of the matrix corresponds a partial derivative of the function.
When the output of a function is a vector, partial derivatives are vectors which
are placed in columns of the matrix. The order of the columns matches the
order in which you list the variables.



Problem 1.20 Let ~r(t) = t2 − 1, 2t + 3 . Construct a graph of ~r(t), and
compute the derivative D~r(t).

Problem 1.21 Let f (x, y) = 4 − x− y 2 . Construct a 3D graph of z = f (x, y).


Also construct a graph of several level curves. Then compute the derivative Recall that a level curve of
Df (x, y). z = f (x, y) is curve in the xy
plane where the output z is
constant.

Problem 1.22 Let ~r(t) = h3 cos t, 2 sin t, ti. Construct a 3D graph of ~r(t),
and compute the derivative D~r(t).

Problem 1.23 Let F~ (x, y) = (y, −2x). Construct a 2D graph of this vector
field, and compute the derivative DF~ (x, y).

1.4.1 The General Chain Rule


The chain rule in first semester calculus states that

(f ◦ g)0 (x) = f 0 (g(x))g 0 (x).


CHAPTER 1. REVIEW 7

You may remember this as “the derivative of the outside function times the
derivative of the inside function.” In multivariable calculus, most textbooks use
a tree rule to develop the formula
df
= fx xt + fy yt
dt
for a function f (x, y), where x and y depend on t (so that ~r(t) = (x(t), y(t)) is
a curve in the xy plane). Written in matrix form, the chain rule is simply
 
df   xt
= fx fy = Df · Dr,
dt yt

which is the (matrix) product of the derivatives, just as it was in first semester
calculus. You are welcome to tackle the following problems by using the tree
rule or matrix product.

Problem 1.24 Suppose that f (x, y) = x2 + 3xy, where x = t2 + 1 and


y = sin t, so we could write ~r(t) = (t2 + 1, sin t).
dx
1. Compute Df (x, y), , and D~r(t). (You should have two matrices.)
dt
df
2. Compute dt .

dx
Problem 1.25 Suppose that f (x, y) = x + 3y and that = cos t and
dt
dy
= et . Compute df
dt .
dt

∂f ∂f
Problem 1.26 Suppose that z = f (x, y) and that = 3x2 y and =
√ ∂x ∂y
3 y df
x y − e . Also suppose that x = t and y = ln t. Compute dt .

Problem 1.27 Suppose that z = f (x, y) is a differential function of two


variables. Suppose that ~r(t) is a parametrization of a level curve of f . We can
write the level curve in vector form as ~r(t) = (x(t), y(t)), or in parametric form
x = x(t) and y = y(t).
1. If f (~r(0)) = 7, then what is f (~r(2))?

df d~r
2. Why does dt = ∇f (x, y) · ?
dt
3. Why is the gradient of f normal to level curves? Recall that the word normal
means there is a 90 degree angle
between the gradient and the level
Before proceeding, let’s practice with an examples to visually remind us that curve.
the gradient is normal to level curves. This key fact will help us solve most of
the differential equations we encounter in the course.

Problem 1.28 Consider the function f (x, y) = x2 − y. Start by computing


the gradient. Then construct a graph which contains several level curves of f ,
as well as the gradient at several points on each level curve.
CHAPTER 1. REVIEW 8

1.5 Potentials of Vector Fields and Differential


Forms
When the output dimension of a function is one, so we would write f : Rn → R1 ,
then we call the derivative the gradient and write ∇f~ = (fx , fy , fz ). Notice that
this is a vector field. Taking a derivative gives us a vector field. Is every vector
field the derivative of some function? Hopefully you remember that the answer
to this question is “No.”
If a vector field F~ = (M, N ) (or in 3D F~ = (M, N, P )) is the gradient of
some some function f (so that ∇f ~ = F~ ), then we say that the vector field F~ is
a gradient field (or conservative vector field). We say that f is a potential for
the vector field F~ when ∇f = F~ . In this section, we’ll review how to determine
if a vector field has a potential, as well as how to find a potential.

Problem 1.29 Let F~ = (M, N ) = (2x + y, x + 4y). Find a potential for F~


by doing the following.
1. If we suppose M = 2x + y is the partial of f with respect to x, then
fx = 2x + y. Find a function f whose partial with respect to x is M .
2. If we suppose N = x + 4y is the partial of f with respect to y, then
fy = x + 4y. Find a function f whose partial with respect to y is N .

3. What is a potential for F~ ? Prove your answer is correct by computing the


gradient of your answer.

By taking derivatives, there is a test that tells you if a function will have a
potential. Some textbooks call it the test for a conservative field.

Problem 1.30: Test for a conservative vector field. Let’s prove the test The test for a conservative vector
for a conservative vector field in both 2 and 3 dimensions. field states states more than what
you showed in this problem. It
~ is a continuously
1. Suppose that F~ (x, y) = (M, N ) is a continuously differentiable vector states that if F
differentiable vector field on a
field on the entire plane. Suppose further that F~ has a potential f . The simply connected domain, then (1)
derivative of F~ is   ~ has potential, then certain
if F
~ Mx My pairs of partials must be equal,
DF (x, y) = .
Nx Ny and (2) if those pairs of partial
derivatives are equal, then the F ~
Some of the entries in this matrix must be equal? Which ones? Explain. has a potential. We will not prove
[If you’re not sure, try taking the derivative of the problem above.] part (2).

2. Suppose that F~ (x, y, z) = (M, N, P ) is a continuously differentiable vector


field on all of space. Suppose further that F~ has a potential f . State the
derivative of F~ , and then state which pairs of entries must be equal.

Problem 1.31 For each vector field below, either give a potential, or explain
why no potential exists.
1. F~ = (4x + 5y, 5x + 6y)

2. F~ = (2x − y, x + 3y)
 
~ 2y
3. F = 4x + , arctan(2x)
1 + 4x2

4. F~ = (3y + 2yz, 3x + 2xz + 6z, 2xy + 6y)


CHAPTER 1. REVIEW 9

We’ll finish by introducing the vocabulary of differential forms. We’ll use


this vocabulary throughout the semester as we study differential equations. The
vocabulary of vector fields parallels the vocabulary of differential forms.
Definition 1.5: Differential Forms. Assume that f, M, N, P are all functions
of three variables x, y, z. Similar definitions hold in all dimensions.
• A differential form is an expression of the form M dx + N dy + P dz (just
as a vector field is a function F~ = (M, N, P )).

• The differential of a function f is the expression df = fx dx + fy dy + fz dz


~ = (fx , fy , fz )).
(just as the gradient is ∇F

• If a differential form is the differential of a function f , then the differential A differential form is exact
form is said to be exact (just as we say a vector field is a gradient field). precisely when the corresponding
vector field is a gradient field.
Again, the function f is called a potential for the differential form.
Notice that M dx + N dy + P dz is exact if and only if F~ = (M, N, P ) is a
gradient field. The language of differential forms is practically the same as
the language of conservative vector fields. Why do we have different sets of
words for the same idea? That happens all the time when different groups of
people work on seeming different problems, only to discover years later that
they have been working on the same problem. If both sets of vocabulary stick,
it’s often because both have advantages. We have many different notations for
dy
the derivative (such as y 0 , dx , and Df ), and each notation has advantages. The
language of differential forms is best suited when studying differential equations.

Problem 1.32 For each differential form below, state if the differential form
is exact. If it is exact, give a potential.
1. (2x + 3y)dx + (4x + 5y)dy

2. (2x − y)dx + (3y − x)dy


 
3y
3. 4x + dx + arctan(3x)dy
1 + 9x2
4. (3y + 2yz)dx + (3x + 2xz + 6z)dy + (2xy + 5y)dz

1.6 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 2

Linear Algebra Arithmetic

This chapter covers the following ideas.

1. Be able to use and understand matrix and vector notation, addition,


scalar multiplication, the dot product, matrix multiplication, and matrix
transposing.
2. Use Gaussian elimination to solve systems of linear equations. Define
and use the words homogeneous, nonhomogeneous, row echelon form, and
reduced row echelon form.
3. Find the rank of a matrix. Determine if a collection of vectors is linearly
independent. If linearly dependent, be able to write vectors as linear
combinations of the preceding vectors.
4. For square matrices, compute determinants, inverses, eigenvalues, and
eigenvectors.
5. Illustrate with examples how a nonzero determinant is equivalent to having
independent columns, an inverse, and nonzero eigenvalues. Similarly a
zero determinant is equivalent to having dependent columns, no inverse,
and a zero eigenvalue.

The next unit will focus on applications of these ideas. The main goal of
this unit is to familiarize yourself with the arithmetic involved in linear algebra.

2.1 Basic Notation


Most of linear algebra centers around understanding vectors, with matrices
being functions which transform vectors from one vector space into vectors in
another vector space. This chapter contains a brief introduction to the arithmetic
involved with matrices and vectors. The next chapter will show you many of
the uses of the ideas we are learning. You will be given motivation for all of
the ideas learned here, as well as real world applications of these ideas, before
the end of the next chapter. For now, I want you become familiar with the
arithmetic of linear algebra so that we can discuss how all of the ideas in this
chapter show up throughout the course.
Definition 2.1. A matrix of size m by n has m rows and n columns. We Matrix size is
row by column.

10
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 11

normally write matrices using capital letters, and use the notation
 
a11 · · · a1n
 a21 · · · a2n 
A= . ..  = [ajk ],
 
. . .
 . . . 
am1 · · · amn
where ajk is the entry in the jth row, kth column.
• We say two matrices A and B are equal if ajk = bjk for all j and k.
• We add and subtract matrices of the same size entry wise. So we write
A + B = C where cjk = ajk + bjk . If matrices do not have the same size,
then we cannot add them.
• We can multiply a matrix A by a scalar C to obtain a new matrix cA. We
do this multiplying every entry in the matrix A by the scalar c.
• If the number of rows and columns are equal, then we say the matrix is
square.
• The main diagonal of a square (n × n) matrix consists of the entries
a11 , a22 , . . . , ann .
• The
P trace of a square matrix is the sum of the entries on the main diagonal
( ajj ).
• The transpose of a matrix A = [ajk ] is a new matrix B = AT formed by
interchanging the rows and columns of A, so that bjk = akj . If AT = A,
then we say that A is symmetric.
   
1 3 3 −1
Problem 2.1 Let A = and B = . Compute 2A − 3B, and
0 2 0 4
find the trace of both A and B.

Problem 2.2 Write down a 3 by 2 matrix, and compute the transpose of


that matrix. Then give an example of a 3 by 2 symmetric matrix, or explain
why it is not possible.

Vectors represent a magnitude in a given direction. We can use vectors to


model forces, acceleration, velocity, probabilities, electronic data, and more.
We can use matrices to represent vectors. A row vector is a 1 × n matrix. A
column vector is an m × 1 matrix. Textbooks often write vectors using bold face
font. By hand (and in this book) we add an arrow above them. The notation
v = ~v = hv1 , v2 , v3 i can represent either row or column vectors. Many different
ways to represent vectors are used throughout different books. In particular, we
can represent the vector h2, 3i in any of the following forms
   
  2  2
h2, 3i = 2i + 3j = (2, 3) = 2 3 = = 2 3 =
3 3
The notation (2, 3) has other meanings as well (like a point in the plane, or an
open interval), and so when you use the notation (2, 3), it should be clear from
the context that you are working with a vector. To draw a vector hv1 , v2 i, one
option is to draw an arrow from the origin (the tail) to the point (v1 , v2 ) (the Both vectors represent h2, −3i,
regardless of where we start.
head). However, the tail does not have to be placed at the origin.
The principles of addition and subtraction of matrices apply to vectors
(which can be though of as row or column matrices). We will most often think
of vectors as column vectors.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 12

Definition
p 2.2. The magnitude (or length) of the vector ~u = (u1 , u2 ) is |~u| =
u21 + u22 . In higher dimensions we extend this as
v
q u n
uX
2 2 2 2
|~u| = u1 + u2 + u3 + · · · un = t u2i .
i=1

A unit vector is a vector with length 1. In many books unit vectors are written A unit vector û has length |~u| = 1
with a hat above them, as û.

We will need to be able to find vectors of any length that point in a given
direction.
Problem 2.3 Find a vector of length 12 that points in the same direction
as the vector ~v = (1, 2, 3, 4). Then give a general formula for finding a vector of
length c that points in the direction of ~u.

The simplest vectors in 2D are a one unit increment in either the x or y


direction, and we write these vectors in any of the equivalent forms

i = ~i = h1, 0i = (1, 0) and j = ~j = h0, 1i = (0, 1).

We call these the standard basis vectors in 2D. In 3D we include the vector
k = ~j = h0, 0, 1i as well as add a zero to both ~i and ~j to obtain the standard
basis vectors. The word basis suggests that we can base other vectors on these The standard basis vectors in 3D
basis vectors, and we typically write other vectors in terms of these standard i = ~i = h1, 0, 0i = (1, 0, 0)
basis vectors. Using only scalar multiplication and vector addition, we can j = ~j = h0, 1, 0i = (0, 1, 0)
k = ~k = h0, 0, 1i = (0, 0, 1)
obtain the other vectors in 2D from the standard basis vectors.
Problem 2.4 Write the vector (2, 3) in the form (2, 3) = c1~i + c2~j.
If instead we use the non-standard basis vectors ~u1 = (1, 2) and ~u2 = (−1, 4),
then write the vector (2, 3) in the form (2, 3) = c1 ~u1 + c2 ~u2 .

Definition 2.3. A linear combination of vectors ~v1 , ~v2 , . . . , ~vn is an expression


of the form c1~v1 + c2~v2 + . . . + cn~vn , where ci is a constant for each i.
A linear combination of vectors is simply a sum of scalar multiples of the
vectors. We start with some vectors, stretch each one by some scalar, and then
sum the result. Much of what we will do this semester (and in many courses to
come) relates directly to understanding linear combinations.

Problem 2.5 The force acting on an object is F~ = (−3, 2) N. The object is


in motion and has velocity vector ~v = (1, 1) and acceleration vector ~a = (−1, 2).
Write the force as a linear combination of the velocity and acceleration vectors.

Problem 2.6 Write the vector (2, 3, 1) as a linear combination of the stan-
dard basis vectors in R3 . Then write (2, 3, 1) as a linear combination of the
vectors (1, 0, 0), (1, 1, 0), and (1, 1, 1).

One of the key applications of linear combinations we will make throughout


the semester is matrix multiplication. Let’s introduce the idea with an example.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 13
     
1 0 2
Example 2.4. Consider the three vectors 0,  2 , and 1. Let’s multiply
1 −3 1
the first vector by 2, the second by -1, and the third by 4, and then sum the
result. This gives us the linear combination
       
1 0 2 10
2 0 − 1  2  + 4 1 =  2 
1 −3 1 9
We will define matrix multiplication so that multiplying a matrix on the right by
a vector corresponds precisely to creating a linear combination of the columns
of A. We now write the linear combination above in matrix form
    
1 0 2 2 10
0 2 1 −1 =  2  .
1 −3 1 4 9

Definition 2.5: A matrix times a vector. We define the matrix product A~x
(a matrix times a vector) to be the linear combination of columns of A where
the components of ~x are the scalars in the linear combination. For this to make
sense, notice that the vector ~x must have the same number of entries as there
are columns in A. We can make this definition more precise as follows.  Let 
x1
   x2 
~vi be the ith column of A so that A = ~a1 ~a2 · · · ~an , and let ~x =  . . ..

xn
Then the matrix product is the linear combination The product A~x gives us linear
  combinations of the columns of A.
x1
   x2 
A~x = ~a1 ~a2 · · · ~an  . . . = ~a1 x1 + ~a2 x2 + · · · + ~an xn .

xn
The definition above should look like the dot product. If you think of A as a
vector of vectors, then A~x is just the dot product of A and ~x.
Problem 2.7 Write down a 2 by 4 nonzero matrix, and call it A (fill the
matrix with some integers of your choice). Then write down a vector ~x such
that the matrix product A~x makes sense (again, fill the vector with integers of
your choice). Then use the definition above to obtain the product A~x.

Definition 2.6:h A matrix times i a matrix. Let ~bj represent the jth column
of B (so B = ~b1 ~b2 · · · ~bn ). The product AB of two matrices Am×n and
Bn×p is a new matrix Cm×p = [cij ] where the jth column of C is the product
A~bj . To summarize, the matrix product AB is a new matrix whose jth column
is a linear combinations of the columns of A using the entries of the jth column
of B to perform the linear combinations.
 
1 2  
0 1 4
Problem 2.8 Let A = 3 4 and B =
  . Use the definition
−1 2 −3
5 6
given above to compute both AB and BA. Be prepared to show the class how
you used linear combinations to get the matrix product. (If you are used to
using the row dotted by column approach, then this problem asks you to do the
matrix product differently.)
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 14

We introduced matrix multiplication in terms of linear combinations of


column vectors. My hope is that by doing so you immediately start thinking of
linear combinations whenever you encounter matrix multiplication (as this is
what it was invented to do). There are many alternate ways to think of matrix
multiplication. Here are two additional methods.
1. “Row times column approach.” The product AB of two Pnmatrices Am×n
and Bn×p is a new matrix Cm×p = [cij ] where cij = k=1 aik bkj is the
dot product of the of the ith row of A and the jth column of B. Wikipedia
has an excellent visual illustration of this approach.
2. Rephrase everything in terms of rows (instead of columns). We form linear
combinations of rows using rows. The matrix product ~xB (notice the order
is flopped) is a linear combination of the rows of B using the components
of x as the scalars. For the product AB, let ~ai represent the ith row of
A. Then the ith row of AB is the product ~ai B. We’ll most often use the
column definition instead of this, because we use the function notation
f (x) from calculus, and later we will use the notation A(~x) instead of (~x)A
to describe how matrices act as functions.
 
1 2  
0 1 4
Problem 2.9 Let A = 3 4 and B =
  . Use the two alter-
−1 2 −3
5 6
nate definitions above to compute AB. Be prepared to show the class how you
used both alternate definitions (You’ll need to show your intermediate steps).

Problem 2.10 Do each of the following:


1. Solve the system of equations x + 2y = 3, 4x + 5y = 6.
     
3 1 2
2. Write the vector as a linear combination of and .
6 4 5
   
1 2 ~ 3
3. Let A = and b = . Find a vector ~x so that A~x = ~b. This
4 5 6
matrix A is called the coefficient matrix of the system in the first part.
How are these three questions related?

Prior to introducing Gaussian elimination, let’s solve a system of equations


using an elimination method. If 2x + 3y = 4 and 5x + 7y = 0, then we can
eliminate x from the second equation by multiplying both sides of the first
equation by 5, and both sides of the second equation by 2, and then subtracting.
This would give us the equations 10x + 15y = 20 and 10x + 14y = 1. The first
equation minus the second then gives (10 − 10)x + (15 − 14)y = (20 − 0), or
more simply y = 20. Similarly, you could multiply the first equation by 7, and
the second by 3, to eliminate y.

Problem 2.11 Solve the system of equations

2x + 3y − 4z = 4
3x + 4y − 3z = 8
7x + 12y − 12z = 19.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 15

Use elimination to find your solution. Eliminate x from the 2nd and 3rd
equations (which will give you two equations that do not involve x). Then
use one of these simplified equations to eliminate y from the other simplified
equation. At this point you should have an equation that only involves z. Then
use back substitution to give y and x.

Problem 2.12 Answer the following.


1. Suppose that ax + by = c and dx + ey = f , where a, b, c, d, e, f are all
constants. This is a system of equations with 2 equations and 2 unknowns.
Each equation represents a line in the plane. How many solutions are
there to this system? (You should have a few different cases.)
2. Suppose that a11 x + a12 y + a13 z = b1 , a21 x + a22 y + a23 z = b2 and
a31 x + a32 y + a33 z = b1 , where each aij is a constant. This is a system of
equations with 3 equations and 3 unknowns. Each equation represents a
plane in space. How many solutions are there to this system? (You should
have a few different cases.)
3. Suppose that a11 x + a12 y + a13 z = b1 and a21 x + a22 y + a23 z = b2 , where
each aij is a constant. This is a system of equations with 2 equations
and 3 unknowns. Each equation represents a plane in space. How many
solutions are there to this system? (You should have a few different cases.)

Definition 2.7. We say that a system of linear equation is consistent, if it has


at least one solution. We say it is inconsistent if there is no solution.

2.2 Gaussian Elimination


Gaussian elimination is an efficient algorithm we will use to solve systems of
equations. This is the same algorithm implemented on most computers systems.
The main idea is to eliminate each variable from all but one equation/row (if
possible), using the following three operations (called elementary row operations):
1. Multiply an equation (or row of a matrix) by a nonzero constant,
2. Add a nonzero multiple of any equation (or row) to another equation,
3. Interchange two equations (or rows).
These three operations are the operations learned in college algebra when solving
a system using a method of elimination. Gaussian elimination streamlines
elimination methods to solve generic systems of equations of any size. The
process involves a forward reduction and (optionally) a backward reduction.
The forward reduction creates zeros in the lower left corner of the matrix. The
backward reduction puts zeros in the upper right corner of the matrix. We
eliminate the variables in the lower left corner of the matrix, starting with
column 1, then column 2, and proceed column by column until all variables
which can be eliminated (made zero) have been eliminated. Before formally
stating the algorithm, let’s look at a few examples.
Example 2.8. Let’s start with a system of 2 equations and 2 unknowns. I will
write the augmented matrix representing the system as we proceed. To solve
 
x1 − 3x2 = 4 1 −3 4
2x1 − 5x2 = 1 2 −5 1
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 16

we eliminate the 2x1 in the 2nd row by adding -2 times the first row to the
second row.  
x1 − 3x2 = 4 1 −3 4
x2 = −7 0 1 −7
The matrix at the right is said to be in row echelon form. row echelon form

Definition 2.9: Row Echelon Form. We say a matrix is in row echelon form
(ref) if
• each nonzero row begins with a 1 (called a leading 1),
• the leading 1 in a row occurs further right than a leading 1 in the row
above, and

• any rows of all zeros appear at the bottom.


The position in the matrix where the leading 1 occurs is called a pivot. The
column containing a pivot is called a pivot column. pivot column

At this point in our example, we can use “back-substitution” to get x2 = −7


and x1 = 4 + 3x2 = 4 − 21 = −17. Alternatively, we can continue the elimination
process by eliminating the terms above each pivot, starting on the right and
working backwards. This will result in a matrix where all the pivot columns
contain all zeros except for the pivot. If we add 3 times the second row to the
first row, we obtain.
 
x1 = −17 1 0 −17
x2 = −7 0 1 −7

The matrix on the right is said to be in reduced row echelon form (or just
rref). We can easily read solutions to systems of equations directly from a
matrix which is in reduced row echelon form.

Definition 2.10: Reduced Row Echelon Form. We say that a matrix is reduced row echelon form - rref
in reduced row echelon form (rref) if
• the matrix is in row echelon form, and
• each pivot column contains all zeros except for the pivot (leading one).

Example 2.11. Let’s now solve a nonhomogeneous (meaning the right side is
not zero) system with 3 equations and 3 unknowns:
 
2x1 + x2 − x3 = 2 2 1 −1 2
x1 − 2x2 = 3 1 −2 0 3 .
4x2 + 2x3 = 1 0 4 2 1

We’ll encounter some homogeneous systems later on. To simplify the writing,
we’ll just use matrices this time. To keep track of each step, I will write the
row operation next to the row I will replace. Remember that the 3 operations
are (1)multiply a row by a nonzero constant, (2)add a multiple of one row to
another, (3) interchange any two rows. If I write R2 + 3R1 next to R2 , then
this means I will add 3 times row 1 to row 2. If I write 2R2 − R1 next to R2 ,
then I have done two row operations, namely I multiplied R2 by 2, and then
added (-1) times R1 to the result (replacing R2 with the sum). The steps below
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 17

read left to right, top to bottom. In order to avoid fractions, I wait to divide
until the last step, only putting a 1 in each pivot at the very end.
   
2 1 −1 2 2 1 −1 2
⇒(1) 1 −2 0 3 2R2 − R1 ⇒(2) 0 −5 1 4
0 4 2 1 0 4 2 1 5R3 + 4R2
   
2 1 −1 2 2 1 −1 2 2R1 + R3
⇒(3) 0 −5 1 4 ⇒(4) 0 −10 2 8 R2 − R3
0 0 14 21 R3 /7 0 0 2 3
   
4 2 0 7 4 2 0 7 R1 + R2
⇒(5) 0 −10 0 5 R2 /5 ⇒(6) 0 −2 0 1
0 0 2 3 0 0 2 3
   
4 0 0 8 R1 /4 1 0 0 2
⇒(7) 0 −2 0 1 R2 / − 2 ⇒(8) 0 1 0 −1/2
0 0 2 3 R3 /2 0 0 1 3/2

Writing the final matrix in terms of a system, we have the solution x1 = 2, x2 =


−1/2, x3 = 3/2. Remember that this tells us (1) where three planes intersect,
(2) how to write the 4th column ~b in our original augmented matrix as a linear
combination of the columns of the coefficient matrix A, and (3) how to solve
the matrix equation A~x = ~b for ~x.
The following steps describe the Gaussian elimination algorithm that we
used above. Please take a moment to compare what is written below with the
example above. Most of the problems in this unit can be solved using Gaussian
elimination, so we will practice it as we learn a few new ideas.
1. Forward Phase (row echelon form) - The following 4 steps should be
repeated until you have mentally erased all the rows or all the columns.
In step 1 or 4 you will erase a column and/or row from the matrix.

(a) Consider the first column of your matrix. Start by interchanging Computer algorithms place the
rows (if needed) to place a nonzero entry in the first row. If all the largest (in absolute value) nonzero
entry in the first row. This
elements in the first column are zero, then ignore that column in reduces potential errors due to
future computations (mentally erase the column) and begin again rounding that can occur in later
with the smaller matrix which is missing this column. If you erase steps.
the last column, then stop.
(b) Divide the first row (of your possibly smaller matrix) row by its
leading entry so that you have a leading 1. This entry is a pivot, and
the column is a pivot column. [When doing this by hand, it is often
convenient to skip this step and do it at the very end so that you
avoid fractional arithmetic. If you can find a common multiple of all
the terms in this row, then divide by it to reduce the size of your
computations. ]
(c) Use the pivot to eliminate each nonzero entry below the pivot, by
adding a multiple of the top row (of your smaller matrix) to the
nonzero lower row.
(d) Ignore the row and column containing your new pivot and return Ignoring rows and columns is
to the first step (mentally cover up or erase the row and column equivalent to incrementing row
and column counters in a
containing your pivot). If you erase the last row, then stop. computer program.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 18

2. Backward Phase (reduced row echelon form - often called Gauss-Jordan


elimination) - At this point each row should have a leading 1, and you
should have all zeros to the left and below each leading 1. If you skipped
step 2 above, then at the end of this phase you should divide each row by
its leading coefficient to make each row have a leading 1.
(a) Starting with the last pivot column. Use the pivot in that column to
eliminate all the nonzero entries above it, by adding multiples of the
row containing the pivot to the nonzero rows above.
(b) Work from right to left, using each pivot to eliminate the nonzero
entries above it. Nothing to the left of the current pivot column
changes. By working right to left, you greatly reduce the number of
computations needed to fully reduce the matrix.
 
0 1 1 −2 7
1 3 5 1 6
Example 2.12. As a final example, let’s reduce   to
2 0 4 3 −8
−2 1 −3 0 5
reduced row echelon form (rref). The first step involves swapping 2 rows. We
swap row 1 and row 2 because this places a 1 as the leading entry in row 1.
(1) Get
 a nonzero entry in upper
 left (2) Eliminate
 entries in 1st column

0 1 1 −2 7 R1 ↔ R2 1 3 5 1 6
1 3 5 1 6 0 1 1 −2 7
⇒    ⇒  
2 0 4 3 −8 2 0 4 3 −8 R3 − 2R1
−2 1 −3 0 5 −2 1 −3 0 5 R4 + 2R1

(3) Eliminate
 entries in 2nd column
 (4) Make
 a leading 1 in 4th column
1 3 5 1 6 1 3 5 1 6
0 1 1 −2 7  0 1 1 −2 7 
⇒  0 −6 −6
 ⇒  
1 −20 R3 + 6R2 0 0 0 −11 22  R3 /(−11)
0 7 7 2 17 R4 − 7R2 0 0 0 16 −32 R4 /16

(5) Eliminate
 entries in 4th
 column (6) Row
 Echelon Form 
1 3 5 1 6 1 3 5 1 6
0 1 1 −2 7 0 1 1 −2 7
⇒   ⇒  
0 0 0 1 −2 0 0 0 1 −2
0 0 0 1 −2 R4 − R3 0 0 0 0 0

At this stage we have found a row echelon form of the matrix. Notice that we
eliminated nonzero terms in the lower left of the matrix by starting with the
first column and working our way over column by column. Columns 1, 2, and 4
are the pivot columns of this matrix. We now use the pivots to eliminate the
other nonzero entries in each pivot column (working right to left). Recall that a matrix is in reduced
row echelon (rref) if:
(7) Eliminate
 entries in 4th column (8) Eliminate
 entries in 2nd column 1. Nonzero rows begin with a
1 3 5 1 6 R1 − R3 1 3 5 0 8 R1 − 3R2 leading 1.
0 1 1 − 2 7 R2 + 2R3 0 1 1 0 3
⇒    ⇒    2. Leadings 1’s on subsequent
0 0 0 1 −2 0 0 0 1 −2 rows appear further right
0 0 0 0 0 0 0 0 0 0 than previous rows.
3. Rows of zeros are at the
(9) Reduced
 Row Echelon
 Form (10) Switch to system form bottom.
1 0 2 0 −1 x1 + 2x3 = −1 4. Zeros are above and below
0 1 1 0 3 x2 + x3 = 3 each pivot.
⇒   ⇒
0 0 0 1 −2 x4 = −2
0 0 0 0 0 0 =0

We have obtained the reduced row echelon form. When we write this matrix
in the corresponding system form, notice that there is not a unique solution to
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 19

the system. Because the third column did not contain a pivot column, we can
write every variable in terms of x3 (the redundant equation x3 = x3 allows us
to write x3 in terms of x3 ). We are free to pick any value we want for x3 and
still obtain a solution. For this reason, we call x3 a free variable, and write our Free variables correspond to non
infinitely many solutions in terms of x3 as pivot columns. Solutions can be
written in terms of free variables.
x1 = −1 − 2x3 x1 = −1 − 2t
x2 = 3 − x3 x2 =3−t
or by letting x3 = t .
x3 = x3 x3 =t
x4 = −2 x4 = −2
By choosing a value (such as t) for x3 , we can write our solution in so called parametric form
parametric form. We have now given a parametrization of the solution set,
where t is an arbitrary real number.
Problem 2.13 Each of the following augmented matrices requires one row
operation to be in reduced row echelon form. Perform the required row operation,
and then write the solution to the corresponding system of equations in terms
of the free variables.
   
1 0 0 3 1 0 2 4
1. 0 0 1 1  3. 0 1 −3 0
0 1 0 −2 0 0 0 1
 
  0 1 0 7 0 3
1 2 0 −4 0 0 1 5 −3 −10
4.  
2.  0 0 1 3  0 0 0 0 1 2 
−3 −6 0 12 0 0 0 0 0 0

Problem 2.14 Use Gaussian elimination to solve


x2 − 2x3 = −5
2x1 − x2 + 3x3 =4
4x1 + x2 + 4x3 =5
by row reducing the matrix to reduced row echelon form. [Hint: Start by
interchanging row 1 and row 2.]

Problem 2.15 Use Gaussian elimination to solve


x1 − 2x2 + x3 =4
−x1 + 2x2 + 3x3 =8
2x1 − 4x2 + x3 =5
by row reducing the matrix to reduced row echelon form. [Hint: You should end
up with infinitely many solutions. State your solution by writing each variable
in terms of the free variable(s).]

Problem 2.16 Use Gaussian elimination to solve


x1 + 2x3 + 3x4 = −7
2x1 + x2 + 4x4 = −7
−x1 + 2x2 + 3x3 =0
x2 − 2x3 − x4 =4
by row reducing the matrix to reduced row echelon form.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 20

2.3 Rank, Linear Independence, Inverses, and


Determinants
Definition 2.13. • The rank of a matrix is the number of pivot columns
of the matrix. To find the rank of a matrix, you reduce the matrix using
Gaussian elimination until you discover the pivot columns.
• The span of a set of vectors {~v1 , ~v2 , . . . , ~vn } is all possible linear combina-
tions of the vectors. In terms of matrices, the span of a set of vectors is all
possible vectors ~b such that A~x = ~b for some vector ~x, where the vectors
~vi are placed in the columns of A.
• We say that a set of vectors {~v1 , ~v2 , . . . , ~vn } is linearly independent if the
only solution to the homogeneous system c1~v1 + c2~v2 + . . . + cn~vn = ~0 is
the trivial solution c1 = c2 = · · · = cn = 0. Otherwise we say the vectors
are linearly dependent, and it is possible to write one of the vectors as
a linear combination of the others. We say the vectors are dependent
because one of them depends on (can be obtained as a linear combination
of) the others.
• In terms of spans, we say vectors are linearly dependent when one of them
is in the span of the other vectors.
As we complete each of the following problems in class, we’ll talk about the
span of the vectors, and the rank of the corresponding matrix. The key thing
we need to focus on is learning to use the words “linearly independent” and
“linearly dependent.”

Problem 2.17 Are the vectors ~v1 = (1, 3, 5), ~v2 = (−1, 0, 1), and ~v3 =
(0, 3, 1) linearly independent? Solve the system c1~v1 + c2~v2 + c3~v3 = ~0 to answer
this question. If they are dependent, then write one of the vectors as a linear
combination of the others.

Problem 2.18 Are the vectors ~v1 = (1, 2, 0), ~v2 = (2, 0, 3), and ~v3 =
(3, −2, 6) linearly independent? Solve the system c1~v1 + c2~v2 + c3~v3 = ~0 to
answer this question. If they are dependent, then write one of the vectors as a
linear combination of the others.

Problem 2.19 Answer each of the following:


1. Suppose you have row reduced a 3 by 3 matrix, and discovered that the
rank of the matrix is 2. Are the columns of the matrix independent or
dependent? What if the rank was 3?
2. Now suppose you have row reduced a 7 by 7 matrix. If the columns are
independent, what possible options do you have for the rank.
3. Now suppose you have row reduced a 7 by 5 matrix. If the columns are
independent, what must the rank be.
4. Now suppose you have row reduced a 5 by 7 matrix. Explain why the
columns cannot be independent.
5. If you have n vectors placed in the columns of a matrix, what must the rank
of the matrix be in order to guarantee that the vectors are independent?
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 21

Problem 2.20 Is the vector [2, 0, 1, −5] in the span of

{[1, 0, −1, −2], [1, 2, 3, 0], [0, 1, −1, 2]}?

If it is, then write it as a linear combination of the others. If it is not, then


explain why it is not.

Problem 2.21 Find the reduced row echelon form of the matrix
 
2 −1 1 0 2 0 2
B= .
1 1 0 1 0 3 3

Use your result to answer the following questions.

1. Write both (1, 0) and (0, 1) as linear combinations of (2, 1) and (−1, 1).
       
2 2 −1 8
2. Write as a linear combination of and . Then write
0     1 1 0
2 −1
as a linear combination of and .
1 1
     
2 −1 1 0
3. Let A = . Find vectors ~x and ~y so that A~x = and A~y = .
1 1 0 1
 
1 0
4. Find a matrix B so that AB = .
0 1

Problem: 21, revised Answer each of the following questions.

1. Find the reduced row echelon form of the matrix


 
2 −1 1 0 2 0 2
B= .
1 1 0 1 0 3 3

2. Write (1, 0) as a linear combination of (2, 1) and (−1, 1). Remember, that
when writing c1 (2, 1) + c2 (−1, 1) = (1, 0), you must solve for
 the unknown

2 −1 1
constants. Feel free to row reduce the augmented matrix .
1 1 0

3. Write (0, 1) as a linear combination of (2, 1) and (−1, 1). Remember, that
when writing c1 (2, 1) + c2 (−1, 1) = (0, 1), you must solve for
 the unknown

2 −1 0
constants. Feel free to row reduce the augmented matrix .
1 1 1
     
2 0 2
4. Continue to write each of , , and as a linear combina-
    0 3 3
2 −1
tion of and . [Hint:At some point, rather than row reducing
1 1
 
2 −1
~v , ask yourself how you could use part 1 to answer this.]
1 1
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 22

5. The following matrix row reduces to give


   9 
1 0 2 4 5 8 1 0 0 3 2 6
rref
0 2 5 2 −1 3 −−→ 0 1 0
  − 14 − 98 −1 .
0 −2 −1 0 2 1 1 1
0 0 1 2 4 1

Use this to write both (4, 2, 0) and (5, −1, 2) as a linear combination of
the first three columns.

Definition 2.14. The identity matrix I is a square matrix so that if A is a


square matrix, then IA = AI = A. The identity matrix acts like the number 1
when performing matrix multiplication.
If A is a square matrix, then the inverse of A is a matrix A−1 where we have
AA = A−1 A = I, provided such a matrix exists.
−1

 
1 3
Problem Let A = . We now develop an algorithm for computing the
3 4
−1
inverse A . If an inverse
 matrix  exists, then we know it’s the same size as A,
so we could let A−1 = ~v1 ~v2 be the inverse matrix, where ~v1 and ~v2 are the
columns of A−1 .
     
1 0 1 0
1. We know that AA−1 = . Explain why A~v1 = and A~v2 = .
0 1 0 1
   
1 0
2. Solve the matrix equations A~v1 = and A~v2 = . (This involves
0 1
   
1 3 1 1 3 0
row reducing and ).
3 4 0 3 4 1
 
1 3 1 0
3. What is the reduced row echelon form of . How is this
3 4 0 1
related to your previous work.
4. State the inverse of A.

The previous problem showed you howto obtain a matrix B so


 that AB
 = I.
You just had to row reduce that matrix A I to the matrix I A−1 . The
inverse shows up instantly after row reduction.

Problem 2.22 Use the algorithm describe immediately before this problem
to compute the inverse of
 
3 0 3
A = 0 −1 1  .
0 3 −4

Then use your work to write each of the standard basis vectors (1, 0, 0), (0, 1, 0),
and (0, 0, 1) as a linear combination of the columns of A.

 
a b
Problem 2.23 Let A = . Use Gaussian elimination to show that the
c d
inverse of A is  
1 d −b
A−1 = .
ad − bc −c a
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 23

In computing the inverse of a 2 by 2 matrix, the number ad − bc appears


in the denominator. We call this number the determinant. If I asked you to
compute the inverse of a 3 by 3 matrix, you would again see a number appear
in the denominator. We call that number the determinant. This holds true in
all dimensions.
 
a b c
Problem: Optional Let A = d e f . Use Gaussian elimination to
g h i
find the inverse of A, and show that the common denominator is a(ei − hf ) −
b(di − gf ) + c(dh − ge).

Definition 2.15: Determinants of 2 by 2 and 3 by 3 matrices. The


determinant of a 2 × 2 and 3 × 3 matrix are the numbers
 
a b a b
= ad − bc
det =

c d c d

a b c
d e f = a det e f − b det d f
d e
h i g + c det

g h i
i g h

= a(ei − hf ) − b(di − gf ) + c(dh − ge)

We use vertical bars next to a matrix to state we want the determinant. Notice
the negative sign on the middle term of the 3 × 3 determinant. Also, notice that
we had to compute three determinants of 2 by 2 matrices in order to find the
determinant of a 3 by 3.

In the examples above, we obtained the determinant of a 3 by 3 matrix by


computing the determinant of several 2 by 2 matrices. We obtained each 2 by 2
matrix by removing a row and column from the original 3 by 3 matrix. We now
add some language to extend the definition above to all dimensions.
Definition 2.16: Minors, Cofactors, and General determinants. Let A
be an n by n matrix.
• The minor Mij of a matrix A is the determinant of the the matrix formed
by removing row i and column j from A.
• The cofactor Cij is the product of the minor Mij and (−1)i+j , so we have
Cij = (−1)i+j Mij . So it’s either the minor, or the opposite of the minor.
• To compute the determinant,
Pn first pick a row or column. We define
the
Pn determinant to be k=1 aik Cik (if we chose row i) or alternatively
k=1 akj Ckj (if we chose column j).

• You can pick ANY row or ANY column you want, and then compute
the determinant by multiplying each entry of that row or column by its
cofactor, and then summing the results. (The fact that this works would
+ − + ···
 
require proof. That proof will be left to a course in linear algebra.) −
 + − · · · 
• A sign matrix keeps track of the (−1)j+k term in the cofactor. All you
+ − + · · ·
 
.. .. .. . .
have to do is determine if the first entry of your expansion has a plus or . . . .
minus, and then alternate the sign as you expand. sign matrix
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 24
 
2 3 −1
Problem 2.24 Compute the determinant of the matrix 1 0 0  in 3
4 2 5
different ways. First, use a cofactor expansion using the first row (Definition
2.15). Then use a cofactor expansion using the 2nd row. Then finally use a
cofactor expansion using column 3. Which of the was the quickest, and why?

Problem 2.25 Compute the determinants of the matrices


   
2 1 −6 8 3 2 5 −1
0 3 5 4  0 8 4 2
A=  and B =  .
0 0 1 5 0 −1 0 0 
0 0 0 −4 0 −5 3 −1

You can make these problems really fast if you use a cofactor expansion along a
row or column that contains a lot of zeros.

Problem 2.26 Compute the determinant of


 
1 1 1 1
2 2 2 2
A= 0 2 1 −1 .

1 0 −2 1

Then find the inverse of A (or explain why it does not exist). Are the columns
of A linearly independent or linearly dependent?

 
2 1 0
Problem 2.27 Compute the determinant of A = 0 2 1 . Does A have
1 0 2
an inverse? Are the columns of A linearly independent or linearly dependent?
Answer both of the previous
 questions without
 doing any row reduction. Then
  2 1 0 1 0 0
row reduce A I = 0 2 1 0 1 0 to confirm your answer.
1 0 2 0 0 1

After completing the previous two problems, you should see that there is a
connection between the determinant, inverse, and linear independence. Make
a conjecture about what this connection is. We’ll learn a little more about
determinants and inverses, and then you’ll have a chance to state your conjecture,
as well as prove it.

Problem 2.28 Start by writing the system of equations



 −2x1 + 5x3 = −2
−x1 + 3x3 = 1
4x1 + x2 − x3 = 3

as a matrix product A~x = ~b. (What are A, ~x and ~b?) Then find the inverse of
A, and use this inverse to find ~x. [Hint: If we just have numbesr, then to solve
ax = b, we multiply both sides by a1 to obtain a1 ax = a1 b or just x = a1 b.]
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 25

In the next problem, you’ll prove that the determinant of a 2 by 2 matrix


gives the area of a parallelogram whose edges are the columns of the matrix.

Problem 2.29 To find the area of the parallelogram with vertexes O = (0, 0),
U = (a, c), V = (b, d), and P = (a + b, c + d), we would find the length of OU
(the base b), and multiply it by the distance from V to OU . Complete the
following:
~ onto OU
1. Find the projection of OV ~ . (You may have to look up a formula
from math 215.)
~ − proj ~ OU
2. The vector OV ~ is called the component of OV ~ that is or-
OV
~
thogonal to OU . The length of this vector is precisely the distance from
V to OU , which we’ll call h. Find the length of this vector.
3. We now have the base b = |OU | and height
h of a parallelogram. Compute
a b
the product, and prove it equals = |ad − bc|.
c d

The result above extends to 3 dimensions. The determinant of a 3 by 3


matrix gives the volume of a parallelepiped whose edges are the columns of the
matrix. We then use determinants to define nth dimensional volume.

Problem 2.30 Answer each of the following:


1. Let ~u = (2, 3). If you pick a vector ~v that is a linear combination of ~u,
what will the determinant of ~u ~v equal? First explain how you know
the answer (before you have even chosen a vector ~v ). Then give us an
example by picking a vector that is a linear combination of ~v .

2. Let ~u = (1, 0, 2) and ~v = (0, −1, 1). If w


~ is a linear combination of ~u and
~v , what will the determinant equal? Explain. Then show us an example
to confirm your conjecture.
 
2 1 −6 8
0 3 5 4
3. We already computed the determinant of A =  0 0 1
. Swap
5
0 0 0 −4
two columns of the matrix, and then compute the determinant. How
does the determinant of your matrix with swapped columns relate to the
determinant of the original matrix. If you swap two columns of a matrix,
what happens to the determinant?

Problem 2.31 Construct a 2 by 2 matrix whose columns are linearly inde-


pendent. What is the reduced row echelon form of your matrix? Compute the
rank and the determinant, and finally find the inverse (if possible).
Now construct a 2 by 2 matrix whose columns are linear dependent. What
is the reduced row echelon form of your matrix? Compute the rank and the
determinant, and finally find the inverse (if possible).
Make a conjecture about the connection between (1) linear dependence, (2)
rref, (3) rank, (4) determinant, and (5) inverses. Then use a computer to give
two 3 by 3 examples similar to the examples above. You’ll be asked to show us
the computations on the computer in class.
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 26

 
2 1 −1
Problem 2.32 Consider the matrix A = 1 2 0  . Compute the de-
0 4 3
terminant of A. Then create a matrix B so that the ijth entry of B is the
cofactor Cij (remove row i and column j, compute the determinant, and then
times by an appropriate sign). This will require that you compute nine 2 by 2
determinants. Finally, compute the inverse of A (feel free to use a computer on
this part). Make a conjecture about the connection between the determinant of
A, this matrix B, and the inverse of A. We’ll verify your conjecture is true on a
4 by 4 matrix in class.

2.4 Eigenvalues and Eigenvectors


The final computational skill we need to tackle is to compute eigenvalues and
eigenvectors. Let’s start by looking at an example to motivate the language we
are about to introduce.
 
2 1
Example 2.17. Consider the matrix A = . When we multiply this
   1 2  
1 2 1 1 3
matrix by the vector ~x = , we obtain = = 3~x. Multiplication
1 1 2 1 3
by the matrix A was miraculously the same as multiplying by the number 3.
Symbolically  we
 have A~x = 3~x. Not every
  vector
 ~x satisfies this property, as
1 2 1 1 2
letting ~x = gives the product = , which is not a multiple of
0 1 2 0 1
 
1
~x = .
0
Our main goal in this section is to answer the following two questions:
1. For which nonzero vectors ~x (eigenvectors) is it possible to write A~x = λ~x?
2. Which scalars λ (eigenvalues) satisfy A~x = λ~x?
Now for some definitions.
Definition 2.18: Eigenvector and Eigenvalue. Let A be a square n × n
matrix.
• An eigenvector of A is a nonzero vector ~x such that A~x = λ~x for some
scalar λ. (Matrix multiplication reduces to scalar multiplication.) We
avoid letting ~x be the zero vector because A~0 = λ~0 no matter what λ is.
• If ~x is an eigenvector satisfying A~x = λ~x, then we call λ and eigenvalue of
A.
Problem 2.33 Use
 the  definition above to determine with of the following
3 1
are eigenvectors of :
4 6
       
1  4 1, −2,
, 1, 4 , , , .
1 1 −1 2

If the vector is an eigenvector, state the corresponding eigenvalue.


CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 27

The next problem gives us an algorithm for computing eigenvalues and


eigenvectors.

Problem 2.34: How to compute eigenvalues and eigenvectors Let A


be a square matrix.
1. If λ is an eigenvalue, explain why we can find the eigenvectors by solving
the equation (A − λI)~x = ~0. This means we h can subtract
i λ from the
~
diagonal entries of A, and then row reduce A − λI 0 to obtain the
eigenvectors. Note that you should always obtain infinitely many solutions.
2. Explain why we can obtain the eigenvalues of A by solving for when the
determinant of (A − λI) is zero, i.e. solving the equation

det(A − λI) = 0.

The algorithm above suggests the following definition.


Definition 2.19. If A is a square n by n matrix, then we call det(A − λI) the
characteristic polynomial of A. It is a polynomial in λ of degree n, and hence
has n roots (counting multiplicity). These roots are the eigenvalues of A.
We now have an algorithm for finding the eigenvalues and eigenvectors of
a matrix. We start by finding the characteristic polynomial of A. The zeros
of this polynomial are the eigenvalues.h To get thei eigenvectors, we just have
to row reduce the augmented matrix A − λI ~0 . Finding eigenvalues and
eigenvectors requires that we compute determinants, find zeros of polynomials,
and then solve homogeneous systems of equations. You know you are doing the
problem correctly if you get infinitely many solutions to the system (A−λI)~x = 0
for each lambda (i.e. there is at least one row of zeros along the bottom after
row reduction). As another way to check your work, the following two facts can
help.
• The sum of the eigenvalues equals the trace of the matrix (the sum of the The trace and determinant are
diagonal elements). equal to the sum and product of
the eigenvalues.
• The product of the eigenvalues equals the determinant.
 
3 1
Problem 2.35 Consider the matrix A = from problem 2.33.
4 6
1. Find the characteristic polynomial of A, and then find the zeros to deter-
mine the eigenvalues.
2. For each eigenvalue, find all corresponding eigenvectors.
3. Compute the trace and determinant of A.

 
6 4
Problem 2.36 Consider the matrix A = . Find the characteristic
3 2
polynomial and eigenvalues of A. Then for each eigenvalue, find all corresponding
eigenvectors. (Check your work by computing the trace and determinant of A.)
CHAPTER 2. LINEAR ALGEBRA ARITHMETIC 28
 
3 0 0
Problem 2.37 Consider the matrix A = 0 2 1. Find the characteristic
0 1 2
polynomial and eigenvalues of A. Then for each eigenvalue, find all corresponding
eigenvectors. (Check your work by computing the trace and determinant of A.)

 
1 2 1 0
0 2 1 1
Problem 2.38 Consider the matrix A =  0 0 2 0. Find the charac-

0 0 0 5
teristic polynomial and eigenvalues of A. Then for each eigenvalue, find all
corresponding eigenvectors. (Check your work by computing the trace and
determinant of A.)

2.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 3

Linear Algebra
Applications

This chapter covers the following ideas.

1. Explain the connection between vector fields and their corresponding


eigenvalues and eigenvectors. Use this knowledge to apply the second
derivative test.
2. Solve various problems relating to conservation laws, including stoichiome-
try, Kirchoff’s electrical laws, and Markov Processes.
3. Use Cramer’s rule to solve systems, and explain when you would choose
Cramer’s rule over row reduction.
4. Find interpolating polynomials, and use the transpose to solve the least
squares regression problem.
5. Find the partial fraction decomposition of a rational function. Utilize this
decomposition to integrate rational functions.
6. Be able to show that a function is linear, and find the kernel of a linear
function.

3.1 Vector Fields


In multivariate calculus, we studied vector fields of the form F~ (x, y) = (M, N ),
where M and N are functions of x and y. The derivative of the vector field is
the square matrix  
~ ∂M/∂x ∂M/∂y
DF (x, y) = .
∂N/∂x ∂N/∂y
The eigenvalues and eigenvectors of this matrix provide us with a wealth of
information about the vector field. The next few problems have you discover
many of these key ideas. We’ll return to these ideas throughout the semester,
especially when we start studying systems of differential equations in depth.

Problem 3.1 Consider the vector field F~ (x, y) = (2x + y, x + 2y).


1. At each of the 8 points given by (±1, ±1), (0, ±1), (±1, 0), sketch the
vector F~ (x, y) with it’s base at the input point (so at point (1, 0), sketch
(2, 1), a vector starting at (1, 0) and ending at (3, 1)). This provides us
with a rough sketch of the vector field.

29
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 30

2. Compute A = DF~ (x, y). It should be a 2 by 2 matrix.


3. Remember that we say a vector ~x is an eigenvector if A~x = λ~x. For any of
the vectors from part 1., did you find that A~x = λ~x? Which ones (these
are eigenvectors)? By how much was the vector ~x stretched (these are
eigenvalues)?
4. Now compute the eigenvalues and eigenvectors of this matrix, using the
algorithm from the previous chapter. You should obtain the same answer
as part 3.

The problem above had two positive eigenvalues. In the next problem, your
goal is to determine what a vector field looks like when you have both a positive
and negative eigenvalue.

Problem 3.2 Complete the following:

1. For the vector field F~ = (x, 2x − y), compute the eigenvalues and eigen-
vectors of DF~ (x, y).

2. For the vector field F~ = (x − 4y, −6x − y), compute the eigenvalues and
eigenvectors of DF~ (x, y).
3. With each vector field, use a computer to construct a vector field plot. In
the plot, please show us how to see the eigenvectors, together with which
eigenvector corresponds to a positive eigenvalues, and which corresponds to
a negative eigenvalue. You can construct vector fields in Wolfram—Alpha
by typing “vector field plot” in the input box, or just follow the link http:
//www.wolframalpha.com/input/?i=vector+field+plot&lk=4&num=2.
4. Add to your plots several trajectories, i.e. a path that a particle would
follow if F~ represents the tangent vectors of the path. Think, “If I dropped
a really light particle in this field, representing water current, where would
the particle go?

Problem 3.3 The following three vector fields have imaginary eigenvalues.
Compute the eigenvalues for each, construct a vector field plot, and on the plot
add several trajectories (the path followed by a particle that is dropped into
this field).

1. F~ = (−2y, x).

2. F~ = (−x + y, −x − y).

3. F~ = (x − y, x)
Make a conjecture as to why one spirals in, one spirals out, and one just wraps
around in ellipses. We’ll address this conjecture in class.

The next problem requires that you are on a computer that can use Math-
ematica. These computers are available in the Ricks, Austin, Romney, and
library. Alternately, you can download VMWare that will allow you to use
Mathematica for free from your computer, provided you head to https://
vdiview.byui.edu/. You can download step-by-step instructions from http:
//www.byui.edu/help-desk/categories/vdivmware. Please take a moment
and make sure you can access Mathematica.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 31

Problem 3.4 Start by downloading the Mathematica notebook Vector-


Fields.nb (click on the link). The goal of this problem is to make a connection
between a vector field and it’s corresponding eigenvalues/eigenvectors. Once the
notebook is open, click somewhere in the text, hold down Shift, and then press
Enter. This will evaluate the commands and produce a vector field plot, with
the eigenvector directions drawn in green. You can click on the bubbles with
crosshairs in them to adjust the vectors (which are the columns of the matrix).
Play around with the animation until you feel like you can answer each of the
following questions.
1. If the vector field pushes things outwards in all directions, what do you
know about the eigenvalues?
2. If the vector field pulls things inwards in all directions, what do you know
about the eigenvalues?
3. How can you tell, by looking at a vector field plot, that one eigenvalue is
positive and the other is negative?

4. If the vector field involves swirling motion, what do you know about
the eigenvalues? What makes the difference between spiraling inwards,
outwards, or just spinning in circles?
5. What happens when you have a repeated eigenvalue? This one has lots of
correct answers, and it a topic for much further discussion in chapter 10.
See if you can get an example of a repeated eigenvalue with a behavior
that’s different from the above. If you have the first 4, you can present in
class. We’ll have you come up to the computer and show us what you did.

3.1.1 Second Derivative Test


Vector fields and eigenvalues provide us with precisely the key information
needed to locate maximums, minimums, and saddles for functions of the form
z = f (x, y).

Problem 3.5 Consider the function f (x, y) = x2 + 4xy + y 2 . The derivative


(gradient) is the vector field Df (x, y) = (2x + 4y, 4x + 2y). See Figure 3.1 for a
graph of several level curves, together with the gradient.
1. At what point(s) does Df (x, y) = ~0? These are the potential locations of
maximums, minimums, or saddles.
2. Compute the second derivative of f , which should give you a 2 by 2
symmetric matrix. This matrix is called the Hessian.
3. By looking at the picture, are the eigenvalues of D2 f (x, y) both positive,
both negative, or do they differ in sign? How can you tell? Then confirm
you are correct by computing the eigenvalues and eigenvectors of D2 f (x, y).

4. Recall that the gradient points in the direction of greatest increase. Using
this information alone, does the function have a maximum, minimum, or
saddle point at (x, y) = (0, 0)
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 32

-1

-2
-2 -1 0 1 2

Figure 3.1: A plot of several level curves of f (x, y) = x2 + 4xy + y 2 and the
gradient. In one direction the gradient is pulling things towards the origin. In
another direction, the gradient is pushing things away from the origin.

Theorem 3.1. Let f (x, y) be a function that is twice continuously differentiable.


Suppose that Df (x, y) = (0, 0) when (x, y) = (a, b), so that (a, b) is a critical
point. To determine if the point (a, b) corresponds to a maximum, minimum, or
saddle point, we compute the eigenvalues of D2 f (a, b) (the second derivative is
called the Hessian).
• If the eigenvalues of a are all positive, then the function has a minimum
at (a, b).
• If the eigenvalues of a are all negative, then the function has a maximum
at (a, b).
• If there is a positive eigenvalue, and a negative eigenvalue, then the function
has a saddle at (a, b).
• If zero is an eigenvalue, then the second derivative test fails.
Problem 3.6 Consider the function f (x, y) = x3 − 3x2 − y 2 + 2y See Figure
3.2 for a graph of several level curves, together with the gradient.
1. At what point(s) does Df (x, y) = ~0? You should obtain two points. These
are the potential locations of maximums, minimums, or saddles.
2. Compute the second derivative of f , which should give you a 2 by 2
symmetric matrix.
3. Pick one of the critical points. Use the vector field plot to decide if the
eigenvalues of D2 f (x, y) both positive, both negative, or differ in sign
at that critical point, and if the function has a maximum, minimum, or
saddle at that point. Then repeat with the other critical point.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 33

-1
-1 0 1 2 3

Figure 3.2: A plot of several level curves of f (x, y) = x3 − 3x2 − y 2 + 2y and the
gradient. There are two critical points. The vector field plot provides enough
information to determine if the sign of the eigenvectors of the second derivative
at each critical point.

4. Now compute the eigenvalues of the Hessian at each critical value. This
should confirm your answer to part 3. (The matrix is diagonal, so com-
puting eigenvalues should be quick.)

The following example adds a little more information to this discussion. I’ve
included it to give you one additional piece of information, namely how the
eigenvalues connect to the concavity of the function.
2 2
Example
 3.2. For
 the function f (x, y) = x + xy + y , the gradient is Df =
2x + y x + 2y , which is zero only at x = 0, y = 0 (solve the system of
 
2 1
equations 2x + y = 0, x + 2y = 0). The Hessian is D2 f = . The
  1 2
2−λ 1
eigenvalues are found by solving 0 = det = (2 − λ)2 − 1 =
1 2−λ
4 − 4λ + λ2 − 1 = (λ − 3)(λ − 1), so λ = 3, 1 are the eigenvalues. Since both
eigenvalues are positive, the gradient pushes things away from the origin in
all direction, which means in every direction you move from the critical point,
you’ll increase in height. There is a minimum at (0, 0).
The eigenvectors of the Hessian help us understand more about the graph of
the function. An eigenvector corresponding to 3 is (1, 1), and corresponding to
1 is (−1, 1). These vectors are drawn in figure 3.3, together with two parabolas
whose 2nd derivatives are precisely 3 and 1. The parabola which opens upwards
the most quickly has a 2nd derivative of 3. The other parabola has a second
derivative of 1. In every other direction, the 2nd derivative would be between 1
and 3.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 34

Figure 3.3: The eigenvectors of the second derivative tell you the directions
in which the 2nd derivative is largest and smallest. At each critical point,
two eigenvectors are drawn as well as a parabola whose second derivative (the
eigenvalue) matches the second derivative of the surface in the corresponding
eigenvector direction.

3.2 Conservation Laws


Many problems in nature arise from conservation laws. These laws generally
focus on the principle that matter is neither is created nor destroyed, rather it
is just moved, changed, or something. Any of the following could be viewed as
a conservation law:

• What comes in must come out.


• Voltage supplied equals voltage suppressed.
• Atoms before equal atoms after.
• The change in a quantity is how much it increases minus how much it
decreases.
• Current in equals current out.
The following problems related to some conservation law. You’ll see similar laws
in your future classes, regardless of your discipline.

3.2.1 Stoichiometry
Chemical reaction stoichiometry is the study balancing chemical equations.
A chemical reaction will often transform reactants into by-products. The by
products are generally different compounds, together with either an increase
or decrease in heat. One key rule in stoichiometry is that a chemical process
neither creates nor destroys matter, rather it only changes the way the matter
is organized. For simple reactions (with no radioactive decay), this conservation
law forces the number of atoms entering a reaction to be the same as the number
leaving. The next problem asks you to use this conservation law to create a
balanced chemical reaction equation.

Problem 3.7 The chemical compound hydrocarbon dodecane (C12 H26 ) is


used as a jet fuel surrogate (see Wikipedia for more info). This compound reacts
with oxygen (02 ), and the chemical reaction produces carbon dioxide (CO2 ),
water (H2 0), and heat. Suppose we expose some dodecane to oxygen, and that
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 35

a chemical reaction occurs in which the dodecane is completely converted to


carbon dioxide and water. Conservation requires that the number of atoms (H,
C, and 0) at the beginning of the chemical reaction must be the exact same
as the number at the end. We could write the chemical reaction in terms of
molecules as

x1 C12 H26 +x2 O2 = x3 CO2 +x4 H2 O or x1 C12 H26 −x2 O2 = x3 CO2 −x4 H2 O = 0,

where x1 molecules of dodecane and x2 molecules of oxygen were converted to


x3 units of carbon dioxide and x4 units of oxygen. If we look at each atom
(carbon, hydrogen, and oxygen) individually, we obtain three equations to relate
the variables x1 , x2 , x3 , x4 . The carbon equation is simply

x1 (12) + x2 (0) = x3 (1) + x4 (0) or x1 (12) + x2 (0) − x3 (1) − x4 (0) = 0.

Your job follows:


1. Write the other two conservation equations (for hydrogen and oxygen).
2. Solve the corresponding system of equations by row reduction. As there
are only 3 equations with 4 unknowns, you should obtain infinitely many
solutions. Write each variable in terms of the free variable.
3. If about 10,000 molecules of water are present at the end of the reaction,
about how many molecules of dodecane were burned?

3.2.2 Kirchoff ’s Electrical Laws


Gustav Kirchoff discovered two laws of electricity that pertain to the conservation
of charge and energy. To describe these laws, we must first discuss voltage,
resistance, and current.
• Current is the flow of electricity, and often it can be compared to the flow
of water.
• As a current passes across a conductor, it encounters resistance. Ohm’s
law states that the product of the resistance R and current I across a
conductor equals the voltage V , i.e. RI = V . If the voltage remains
constant, then a large resistance corresponds to a small current.
• A resistor is an object with high resistance which is placed in an electrical
system to slow down the flow (current) of electricity. Resistors are measured
in terms of ohms, and the larger the ohms, the smaller the current.
Figure 3.4 illustrates two introductory electrical systems. In this diagram, wires
meet at nodes (illustrated with a dot). Batteries and voltage sources (represented
by or other symbols) supply a voltage of E volts. At each node the current
may change, so the arrows and letters i represent the different currents in the
electrical system. The electrical current on each wire may or may not follow
the arrows drawn (a negative current means that the current flows opposite
the arrow). Resistors are depicted with the symbol , and the letter R
represents the ohms.
Kirchoff discovered two laws. They both help us find current in a system,
provided we know the voltage of any batteries, and the resistance of any resistors.
1. Kirchoff’s current law states that at every node, the current flowing in
equals the current flowing out (at nodes, current in = current out).
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 36

i1 i3 i1 i3 R3 i5
i2 i2 i4
E R2 R3 E R2 R4 R5
R1 R1 R6 i 6

Two Loop System Three Loop System

Figure 3.4: Electrical Circuit Diagrams.

2. Kirchoff’s voltage law states that on any loop in the system, the directed
sum of voltages supplied equals the directed sum of voltage drops (in loops,
voltage in = voltage out). To use this law, pick a spot in the system. Then
move around the system following a path that eventually gets you back to
where you began (a closed curve). If you encounter a battery (a voltage
source), then it counts as voltage in. If you encounter a resistor as you
move with the current, then the voltage drop is Ri. If you encounter a
resistor while moving opposite the current, then times by a negative to
get a voltage drop of −Ri .
Let’s use Kirchoff’s laws to generate a system of equations for the two loop
system. Remember that every time a current encounters a resistor, the voltage
drop is V = RI, the product of the resistance and the current.
Problem 3.8 Consider the two loop system in figure 3.4. Assume that the
voltage supplied from the battery E, as well as the ohms R1 , R2 , and R3 , on
the resistors are known. The currents i1 , i2 , and i3 are unknown.
1. Use Kirchoff’s laws to explain how to obtain each of the equations below:
i1 − i2 − i3 =0
−i1 + i2 + i3 =0
R1 i1 + R2 i2 =E
−R2 i2 + R3 i3 = 0.
R1 i1 + R3 i3 = E.
[Hint: If you encounter a resistor while moving backwards along a loop,
then times the voltage drop becomes a voltage gain (times by a negative).]
2. Some of the equations above are linear combinations of the other equations.
How could you obtain the 2nd and 5th as a linear combination of the
others?
3. If E = 12, R1 = 2, R2 = 3, and R3 = 6, then solve the system of equations
above by row reducing an appropriate matrix.

Problem 3.9 Consider the three loop system in figure 3.4. Assume that the
voltage supplied from the battery E and that the ohms Rj on the resistors are
known. The currents are unknown.
1. There are 4 nodes in this system. Write the 4 equations we obtain by
remember that the flow in at a node must equal the flow out.
2. There are three inner loops in the system above. Write the equations
formed by going around each inner loop. [To get an inner loop, pick any
point in the system. Then move in a clockwise fashion around the loop
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 37

3. Some of the equations above are linear combinations of the other equations.
How could you obtain the 2nd and 5th as a linear combination of the
others?
4. Why will row reducing the following matrix give you the unknown currents?
 
1 −1 −1 0 0 0 0
0
 0 1 −1 −1 0 0
0
 0 0 1 1 −1 0.
R1 R2 0 0 0 0 E
 
0 −R2 R3 R4 0 R6 0 
0 0 0 −R4 R5 0 0
[Don’t row reduce this matrix.]

Problem 3.10 Consider the three loop system in figure 3.4. If E = 12,
R1 = 1, R2 = 1, R3 = 1, R4 = 1, R5 = 1, R6 = 1 then find the unknown
currents by row reducing the matrix in part 4 above. Use a computer to check
your answer. The row reduction is quite short, because the matrix is sparse (has
lots of zeros).]

3.2.3 Markov Processes


Matrices can be used to model a process called a Markov Process. To fit this
kind of model, a process must have specific states, and the matrix which models
the process is a transition matrix which specifies how each state will change
through a given transition. An example of a set of states is “open” or “closed”
in an electrical circuit, or “working properly” and “working improperly” for
operation of machinery at a manufacturing facility. A car rental company which
rents vehicles in different locations can use a Markov Process to keep track
of where their inventory of cars will be in the future. Stock market analysts
use Markov processes and a generalization called stochastic processes to make
predictions about future stock values.
Problem 3.11 Suppose we own a car rental company which rents cars in
Idaho Falls and Rexburg. The last few weeks have shown a weekly trend that
60% of the cars which are rented in Rexburg will remain in Rexburg (the other
40% end up in Idaho Falls). About 80% of the cars which are rented in Idaho
Falls will remain in Idaho Falls (the other 20% end up in Rexburg).
1. If there are currently 60 cars in Rexburg and 140 cars in IF, how many
will be in each city next week? In two weeks?
2. Let Rn and In be the number of cars in Rexburg and Idaho Falls, respec-
tively, at the beginningof the
 nth
 week
 (so R0 = 60 and I0 
= 140).
 Obtain
 
R0 R1 R1 R2
a matrix A so that A = . Then check that A = .
I0 I1 I1 I2
3. We would like to know if the number of cars will stabilize in each city.
This would mean that if the current week’s car totals are R and I, then
we could find the next week’s totals by solving the system
   
R R
A = ,
I I
the totals don’t change. This is called a steady state solution. Find the
steady state solution.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 38

4. In the long run, what proportion of the cars will end up in Rexburg?
   
R R
5. Because the system A = had a nonzero solution, we know
I I
something about the eigenvalues of the matrix A. What is an eigenvalue
of A?
(We’ll answer 4 and 5 in class if you are unable. The key parts are 1-3.)

The matrix A found above is called a transition matrix. It’s the matrix
which tells you how to move from the current state ~xn to the next state ~xn+1 .
This means we have

~x1 = A~x0
~x2 = A~x1 = A(A~x0 ) = A2 ~x0
~x3 = A~x2 = A(A~x1 ) = · · · = A3 ~x0
~x4 = A~x3 = A(A~x2 ) = · · · = A4 ~x0
..
.

You can find the nth state by computing ~xn = An ~x0 , just raise the matrix to a
power, and times by the initial state. Let’s use this idea once more.

Problem 3.12 In a certain town, there are 3 types of land zones: residential,
commercial, and industrial. The city has been undergoing growth recently, and
the city has noticed the following 5 year trends.
• Every 5 years, they’ve notice that 10% of the residential land gets rezoned
as commercial land, while 5% of the residential land gets rezoned as
industrial. The other 85% of residential land remains residential.

• For commercial land, 70% remains commercial, while 10% becomes resi-
dential and 20% becomes industrial.
• For industrial land, 60% remains industrial, while 25% becomes commercial
and 15% becomes residential.

• Currently the percent of land in each zone is 40% residential, 30% com-
mercial, and 30% industrial.
Let’s assume that these trends continue over an extended period of time.
1. The current state is ~x0 = (40, 30, 30). After 5 years, what percentage of
land will be zoned residential? Commercial? Industrial? Answering this
question should give you the transition matrix A so that ~x1 = A~x0 .
2. Use software to find ~x2 , ~x3 , and ~x4 (the land use percentages after 10, 15,
and 20 years).
3. Find the steady state solution to this Markov Process by solving A~x = 1~x
(i.e., the eigenvector corresponding to the eigenvalue λ = 1.)

Problem 3.13 Consider three occupations, farming, manufacturing, and


clothing. Assume that goods are exchanged between the communities through
barter only. Here is how the communities exchange their goods.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 39

• The farming community keeps 1/2 of their goods, giving 1/4 to manufac-
turing and 1/4 to clothing.
• The manufacturing community keeps 1/3 of their goods, giving 1/3 to
farming and 1/3 to clothing.
• The clothing community keeps 1/4 of their goods, giving 1/2 to farming
and 1/4 to manufacturing.
Answer the following questions.
1. Suppose that all the commodities have the exact same value. If each
group starts out with 12 units of their commodity, then after 1 round
of bartering, how many units will each group have?
 Along the way you
12
should produce a transition matrix A so that A 12 gives the answer.
12
2. Let x1 be the value of the goods produced by farming. Let x2 be the value
of the goods produced by manufacturing. Let x3 be the value of the goods
produced by clothing. We would like to assign a value to each commodity
so that each group gets a fair deal when they barter. To do this, we need
to have the value of goods obtained after bartering to match the value of
the goods obtained before. Explain why we can obtain this by solving the
equations 1 1 1    
2 3 2 x1 x1
 1 1 1  x2  = x2  .
4 3 4
1 1 1 x3 x3
4 3 4
Then solve this equation.
3. (We’ll answer this one in class. Try to come up with an answer yourself.)
If the value of commodities from each group is the same, who is getting the
better deal? To make sure bartering results in a fair deal for all, should
farming commodities be more expensive, or less expensive than the others?

3.3 Cramer’s Rule


Gabriel Cramer developed a way to solve linear systems of equations by using
determinants. For small systems, the solution is extremely fast. However,
for large systems, the method looses it’s power because of the complexity of
computing determinants. Also, when the coefficients in the system are variables,
Cramer’s rule provides an extremely fast algorithm for computing determinants.
I’ll remind you occasionally throughout the problem set to apply Cramer’s rule
when the problem involves variable coefficients.
Theorem 3.3  (Cramer’s Rule).
 Consider the linear system given by A~x = ~b,
where A = ~v1 ~v2 · · · ~vn is an n by n matrix whose determinant is not
zero. Let D = |A|. For each i, replace vector ~vi with ~b, and then let Di be the
determinant of the corresponding matrix. The solution to the linear system is
then
D1 D2 Dn
x1 = , x2 = , · · · xn = .
D D D
For the 2 by 2 system
    
a11 a12 x1 b
= 1 ,
a21 a22 x2 b2
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 40

Cramer’s rule states the solution is (provided |A| =


6 0)

b1 a12 a11 b1

D1 b2 a22 D2 a21 b2
x1 = = , x2 = = .
D a11 a12
D a11 a12

a21 a22 a21 a22

Problem 3.14 Consider the system of equations x + 2y = 3, 4x + 5y = 6.


Solve this system in 2 different ways.
1. Use Cramer’s rule to solve the system. You just need to compute three 2
by 2 determinants.
2. Use row reduction to solve the system. Show the steps in class.

In the next problem, you’ll provide a proof of Cramer’s rule in 2D. Your
proof will contain the key idea needed to prove the theorem in all dimensions.
The key idea is to connect determinants to areas of parallelograms.
Problem 3.15: Proof of Cramer’s Rule Let ~v1 = (2, −2) and ~v2 = (1, 2).
Let x1 = −3 and x2 = −2, which means that ~b = x1~v1 + x2~v2 = (−8, 2). In the
picture below, the solid red vector is ~v1 , the solid blue vector is ~v2 , and the solid
black vector is ~b. Use the picture below, to answer the following questions.
10

-10 -5 5 10

-5

-10
[Hint: Each question can be answered by thinking about determinants as areas.]

1. Explain why x1 v~1 ~v2 = x1 v~1 ~v2 . Then explain why x1 v~1 ~v2 =


~
b1 ~v2 . Finally, solve for x1 to show


b1 a12

D1 b2 a22
x1 = = .
D a11 a12

a21 a22
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 41

2. In a similar fashion, obtain a formula for x2 .

Problem 3.16 In problem 3.8 we obtained needed to solve the system of


equations
i1 − i2 − i3 =0
R1 i1 + R2 i2 =E
−R2 i2 + R3 i3 = 0.
Write the corresponding system of equations, and then use Cramer’s rule to
obtain the general solution for the unknown currents. You should have i1 , i2 ,
and i3 all written in terms of R1 , R2 , R3 , and E.

Cramer’s rule is most useful when the coefficients in the linear system are
variables, rather than numbers. Let’s apply our knowledge to study the arms race
(the building of armies - tanks, bombs, soldiers, etc. - between two countries).
Consider two countries, country A and country B. As country B builds up
their military, country A looks on and says “Hmm, we better build up our
military.” Similarly, as country A builds up their military, country B looks and
says, “Hmm, we better build up our military.” If country A has a grudge against
country B, they will probably build up their military regardless of what country
B does. Similarly, any past grievances and grudges that country B has against
country A will increase the rate at which country B builds up their military.
Building up a military costs money, so hopefully both countries have economic
limitations that restrict the growth of their military. The real question behind
the arms race is, “Will the two countries eventually decide they are spending
enough on their military, or will their spending continue to grow without bound.”
We now develop a system of differential equations that describes the above.
The key principle is a general law of conservation:
The change in a quantity equals the flow in of the quantity minus
the flow out of the quantity, or more simply
Change = (Flow in) - (Flow out)
Change = (Increase) - (Decrease)
• Let x represent the dollar amount per year that country A spends on
arms. Let y represent the dollar amount per year that country B spends
on arms.
• When y is large, country A will respond by increasing their spending. We’ll
assume this change is proportional to y, so we see that x increases by an
amount ay. Similarly, when x is large, country B responds by increasing
their spending. Let’s assume that y increases by an amount mx.
• The economy of each country tries to slow down the growth rate. The
more money country A spends, the larger the effect of the economy. We’ll
assume that x decreases by an amount bx. Similarly, we’ll assume y
decrease by an amount ny.
• If the countries hold grudges against each other for past grievances, then
they are inclined to increase their spending regardless of economic factors
and the growth of the other country’s army. Let c represent the amount
that country A will increase their spending by, and let p represent the
amount that country B will increase their spending by. These values might
be zero (for example the US and Canada do not hold such grudges), but
might not be zero at all (as was the cases during the cold war, between
the US and USSR).
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 42

Problem 3.17 Read the arms race information above, and then answer the
following questions.
1. There are three things causing x to change. The flow in (parts causing an
increase) are ay and c, the response to the other country, and any grudges.
The flow out (parts causing a decrease) is only bx, the economic restriction.
We can write this as a differential equation
dx
= ay − bx + c.
dt
dy
Obtain a similar equation for (using the coefficients m, n, and p). Then
dt
write your system of ODEs in the form
 0     
x −b a x c
= + .
y0 ? ? y ?

2. An equilibrium solution to the system of differential equations above is


a solution that remains stable. At equilibrium, there should not be any
future change in x nor y, so we should have dx/dt = 0 and dy/dt = 0.
Find the equilibrium solution for the arms race problem. [Cramer’s rule
should make this really fast.]
3. Find the eigenvalues of the square matrix from part 1. What conditions
must be met so that both eigenvalues are negative? In class, we’ll pick
some positive values for a, b, c, m, n, p that satisfy the conditions you tell
us, and then graph the vector field d~ x
dt = A~ x + p~, along with some solution
curves.

3.4 Curve Fitting


3.4.1 Interpolating Polynomials
Through any two points (with different x values) there is a unique line of the
form y = mx + b. If you know two points, then you can use them to find the
values m and b. Through any 3 points (with different x values) there is a unique
parabola of the form y = ax2 + bx + c, and you can use the 3 points to find
the values a, b, c. As you increase the number of points, there is still a unique
polynomial (called an interpolating polynomial) with degree one less than the
number of points, and you can use the points to find the coefficients of the
polynomial. In this section we will find interpolating polynomials, and show
how the solution requires solving a linear system.
To organize our work, let’s first standardize the notation. Rather than
writing y = mx + b, let’s write y = a0 + a1 x (where a0 = b and a1 = m). For a
X2
parabola, let’s write y = a0 + a1 x + a2 x2 = ak xk . We can now write any
k=0
polynomial in the form
n
X
y = a0 + a1 x + · · · + an xn = ak xk .
k=0

By standardizing the coefficients, we can use summation notation to express


any degree polynomial by changing the n on the top of the summation sign.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 43

Problem 3.18 Answer the following by row reducing an appropriate matrix.


Please show us the steps in your row reduction. [Hint: Each point produces an
equation.]
1. Find the intercept a0 and slope a1 of a line y = a0 + a1 x that passes
through the points (1, 2) and (3, 5). [We could have use m and b, but I
chose to use a0 and a1 so you can see how this generalize quickly to all
dimensions.]
2. Find the coefficients a0 , a1 , and a2 of a parabola y = a0 + a1 x1 + a2 x2
that passes through the points (0, 1), (2, 3), and (1, 4). [Hint: The second
point produces the equation 3 = a0 + a1 (2) + a2 (2)2 .]

Problem 3.19 Give an equation of a cubic polynomial y = a0 +a1 x1 +a2 x2 +


a3 x3 that passes through the four points (0, 1), (1, 3), (1, 4), and (2, 4). Show us
the steps in your row reduction. [Hint: Each point produces an equation. You
should have a linear system with 4 equations and 4 unknowns.]

Problem 3.20 Solve the following. [Hint: Because the problem involves
variable points, Cramer’s rule will be much faster than row reduction.]
1. Find the intercept a0 and slope a1 of a line y = a0 + a1 x that passes
through the points (x1 , y1 ) and (x2 , y2 ).
2. Find the coefficients a0 , a1 , and a2 of a parabola y = a0 + a1 x1 + a2 x2
that passes through the points (x1 , y1 ), (x2 , y2 ), and (x3 , y3 ).
Under what conditions will your solutions above not be valid?

If we collect 2 data points, then we can usually find an equation of a line


that passes through them. If we collect 3 data points, we can usually find an
equation of a parabola passing through them. Continuing in this fashion, if we
collect n + 1 data points, then we can usually find an equation of a polynomial
of degree n that passes through them.

Problem 3.21 Suppose that we collect the 6 data points (1, 1), (2, 3), (−1, 2),
(0, −1), (−2, 0), (3, 1). We would like to find a polynomial that passes through
all 6 points. State the degree n of this polynomial. Then find the coefficients
a0 , a1 , . . . , an of this polynomial. Please use technology to do your row reduction.
When you present in class, show us the matrix you entered into a computer,
and then show us the reduced row echelon form together with the polynomial.

3.4.2 Least Squares Regression


Interpolating polynomials give a polynomial which passes through every point
listed. While they pass through every point in a set of data, the more points the
polynomial must pass through, the more the polynomial may have to make large
oscillations in order to pass through each point. Sometimes all we want is a simple
line or parabola that passes near the points and gives a good approximation of
a trend in the data. When I needed to purchase a minivan for my expanding
family, I gathered mileage and price data for about 40 cars from the internet. I
plotted this data and discovered an almost linear downward trend (as mileage
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 44

increased, the price dropped). Using this data I was able to create a line to
predict the price of a car. I then used this data to talk the dealer into dropping
the price of their car by over $1000. Finding an equation of this line, called
the least squares regression line, is the content of this section. In other words,
if you have 3 or more points, how do you find a line that is closest to passing
through these points? The least squares regression line is used to find trends in
many branches of science, in addition to haggling for lower prices when buying
a car. Statistics builds upon this idea to provide powerful tools for predicting
the future.
Problem 3.22 Consider the three points (2, 4), (0, 1), and (3, 5). We wish
to find a line y = a0 + a1 x that fits this data.

1. What 3 equations do the points and line give. Write the linear system as
a matrix equation by filling in A and ~b below:
   
1 2   4
A~x = ~b or ? ? a0 = ? .
a1
? ? ?

The first equation 4 = a0 + a1 (2) is already on the first row.


2. Row reduce the corresponding augmented matrix to show that this system
has no solution. The problem is that we have more equations than we do
unknowns. The system is overdetermined.

3. If we multiply both sides of the equation A~x = ~b by a 2 by 3 matrix C,


then the product CA will be a 2 by 2 matrix. We could then solve the
system CA~x = Cb, as it would then have 2 equations and 2 unknowns.
The only 2 by 3 matrix in the problem is the transpose of A. So compute
AT A and AT ~b. Then solve the system (AT A)~x = AT ~b.

The previous problem suggests the following theorem. One proof of this
theorem involves projecting ~b onto the plane spanned by the columns of A.
This proof leads to the ideas behind inner product spaces, the Graham Schmidt
orthogonalization process, and more, something you would study near the end
of math 341 (Linear Algebra).
Theorem 3.4 (Least Squares Regression). When we collect n data points
and notice the points follow a linear trend, the coefficients of the least square
regression line y = a0 + a1 x are the solutions to the equation AT A~x = AT ~b,
where we have
   
1 x1 y1
  1 x2   y2   
a  ~   1 1 ··· 1
~x = 0 , A =  . , b =  .  , and AT = .

. x1 x2 · · · xn
a1  .. ..   .. 

1 xn yn

Problem 3.23 Suppose you collect the n data points (x1 , y1 ), (x2 , y2 ), . . .,
(xn , yn ), and you wish to find the least squares regression line y = a0 + a1 x. Set
up the matrices A, ~x, ~b, and AT P. Multiply
P together and AT ~b (your result
AT AP
x2i ). Then solve the
P
should involve sums of the form xi , yi , xi yi , and
T T~
equation A A~x = A b and state the coefficients a0 and a1 . leas[Hint: Since the
system involves variable coefficients, try using Cramer’s rule. It will kick out
the solution almost instantly.]
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 45

The key to solving the overdetermined system A~x = ~b is to multiply each


side on the left by a matrix C, so that the produce CA is a square matrix.
We then solve CA~x = C~b. The least square regression model comes by letting
C = AT . We obtain alternate data fitting models by using a matrix other than
AT (though this is a topic for another course). The next problem has you find
the best fitting parabola, using the least square regression model.

Problem 3.24 Consider the 5 points (−2, 3), (−1, 1), (0, −1), (1, 2), (2, 4),
and . We would like to find an equation of a parabola y = a0 + a1 x + a2 x2 that
approximates the trend in the data, using the least square regression model.
1. The 5 data points produce 5 equations in the three unknowns a0 , a1 , a2 .
Write the linear system as a matrix equation by filling in A and ~b below:
   
1 −2 4   3
? ? ? a0 ?
A~x = ~b
   
or ? ? ? a1  = ? .
   
? ? ? a2 ?
? ? ? ?

2. Multiply both sides of the equation A~x = ~b by an appropriate 3 by 5


matrix C. Then solve the system (CA)~x = C~b. Feel free to use software
to ~
h obtain iyour answer. In class, just show us CA, C b, and the rref of
~
CA C b .

3. Plot the 5 data points and the parabola you found.

The next problem has the exact same solution as Problem 3.23, but does
not require you to use a matrix transpose, nor matrix multiplication. Instead,
it focuses on setting partial derivative equal to zero, which is the first step in
locating minimums. You then just have to solve a system of linear equations.

Problem 3.25 Suppose you collect the n data points (x1 , y1 ), (x2 , y2 ), . . .,
(xn , yn ), and you wish to find the least squares regression line y = a0 + a1 x.
Each point (xi , yi ) produces an error y − yi = (a0 + a1 xi ) − yi . The least squares
regression line is the line that minimized the sum of the squares of these errors,
which means we need to minimize
n
X 2
f (a0 , a1 ) = ((a0 + a1 xi ) − yi ) .
i=1

∂f ∂f
1. Compute and .
∂a0 ∂a1
∂f ∂f
2. Since we seek the minimum of f , solve the system = 0 and =0
∂a0 ∂a1
for a0 and a1 .
[Hint: Once you get each equation written in the form (?)a0 + (?)a1 =?, use
Cramer’s rule to kick out the answer almost instantly.]
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 46

3.5 Partial Fraction Decompositions


A partial fraction decomposition is a method of breaking a complex rational
function up into the sum of smaller simpler functions to work with. We will
be using partial fraction decompositions to rapidly solve differential equations
throughout the semester (using Laplace transforms). For now, we will start by
gaining practice with partial fraction decompositions by integrating rational
functions. To illustrate their value, let’s start with an example.
2x + 1
Problem 3.26 Our goal is to integrate the function f (x) = .
(x − 2)(x − 5)
The denominator is the product of two linear functions. Suppose we can write
2x + 1 A B
= +
(x − 2)(x − 5) x−2 x−5

for unknown constants A and B. Multiply both sides of the above equation
by the denominator (x − 2)(x − 5). Then solve for the constants A and B (try
plugging in some numbers to get a system of equations). Then compute
Z Z Z
2x + 1 A B
dx = dx + dx.
(x − 2)(x − 5) x−2 x−5

[Hint: Two lines are the same if and only if they have the same slope an
intercept. You should have an equation that says two lines are equal, so equate
the coefficients. Alternately, just pick two x values, plug them in, and you
should get two different equations relating A and B.]

Problem 3.27 We can write

2x − 3 Ax + B C A B C
f (x) = = + = + 2+ .
x2 (x− 3) x 2 x−3 x x x−3

Multiply both sides by the denominator x2 (x − 3), and then solve for the
constants A, B, and C (show us the matrix you row reduced, and the rref).
Then compute the integral of f (x). [Hint: To get three equations, you can (1)
equate the coefficients, or (2) pick 3 x values and plug them into the equation.]

Problem 3.28 We can write

x2 − 2 Ax + B C
f (x) = = 2 + .
(x2 + 4)(x + 1) x +4 x+1

Multiply both sides by (x2 + 4)(x + 1) and then solve for the constants A, B,
and C (show us the matrix you row reduced, and the rref). Then compute the
integral of f (x) (you’ll need a u-sub for one of the integrals). You’ll probably
want to split the numerator up, and then integrate three parts, instead two, as
we can write
Ax B C
f (x) = 2 + + .
x + 4 x2 + 4 x + 1
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 47

Problem 3.29 We can write


1
f (x) =
(x + 4)3 (x − 3)
A(x + 4)2 + B(x + 4) + C D
= +
(x + 4)3 x−3
A B C D
= + 2
+ 3
+ .
(x + 4) (x + 4) (x + 4) x−3
Multiply both sides by the denominator of the original, and then solve for the
unknown constants (show us the matrix you row reduced, and the rref). Then
compute the integral of f (x).

3.6 Linear Functions


We need one more bit of vocabulary before embarking on solving differential
equations. You’ve seen the concept of a linear function in many settings, without
knowing it. First let’s get the definition, see an example, and then we’ll discuss
it more.
Definition 3.5. When the domain D and range R of a function involves quan-
tities that can be added and multiplied by scalars, we say that the function
f : D → R is linear, provided the following occurs:
1. f (x + y) = f (x) + f (y) and
2. f (cx) = cf (x).
The function preserves addition and scalar multiplication.
The next examples shows that the concepts of differentiation and integration
are linear functions. Often when the domain is a group of functions, we’ll say
that the function is a linear operator (instead of a linear function).
d
Problem 3.30 Consider the linear operator dx . For simplicity, we’ll assume
the operator has as its domain the set of all differentiable functions that are
differentiable on the entire real line. The range (or codomain) is the set of all
d
functions. The operator dx requires a differentiable function as an input, and
returns a function as output.
d
1. Show that dx is a linear operator.
R
2. Consider the linear operator f (x)dx. What is the domain and codomain
of the integration operator? Is it linear?
3. Consider the linear operator L{f (t)}, the Laplace transform. Show it is a
linear operator, and state the domain and codomain. [We’ll tackle this
part together in class. Have a guess for the answers.]

In calculus you learned that you can differentiate a sum by differentiating


each piece separately (term-by-term differentiation), and that you can pull
constants out. Similarly, you learned that you can do integration term-by-term,
and constants come out. These are precisely the key properties behind a function
(operator, transformation) being linear.
We’ll now see that EVERY matrix represents a linear transformation, and
that every linear transformation between finite dimensional vector spaces is
really just a matrix product.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 48

Problem 3.31 Suppose that we have a linear transformation f : R3 → R2 .


We know that f (1, 0, 0) = (1, 3), f (0, 1, 0) = (−2, 4), and that f (1, 1, 1) = (3, 1).
1. Write (0, 0, 1) as a linear combination of (1, 0, 0), (0, 1, 0), and (1, 1, 1).
2. Use the fact that f is linear to compute f (0, 0, 1), and then f (x, y, z).
[Write (x, y, z) as a linear combination of the standard basis vectors.]
   
x x
3. Obtain a matrix A so that f y  = A y .
z z

4. Find the vectors ~x so that A~x = ~0.

 
1 3 4
Problem 3.32 Suppose that A = −2 0 −2, and consider the function
0 1 1
f~x = A~x.
1. What are f (1, 0, 0), f (0, 1, 0), f (0, 0, 1), and f (2, 3, 0)? What is f (x, y, z)?

2. Show that f~ is a linear function.


3. Find (x, y, z) such that f (x, y) = (5, −2, 1), or explain why it is not
possible.
4. The set of possible outputs of f is an object in 3D. Describe that object.
5. Find the vectors ~x such that f (~x) = ~0.
If you need to rref a matrix above, please use technology to do so. In class, only
show us the matrix, and its rref.

Make sure you ask me in class to visually show you a representation of the
linear functions above. There’s a ton more that we could study about linear
functions, and I’d like to introduce to you some of those ideas.
Matrices provide us with the key examples to understanding linear trans-
formations. However, a matrix by nature requires that we look at functions
between finite dimensional spaces. The key linear transformations we will study
throughout the semester will involve infinite dimensional spaces (like the space
of all differentiable functions). Most of the ideas we have learned will still
be useful to us as we explore functions between infinite dimensional vector
spaces. Near the end of the semester, we’ll even start discussing eigenvalues and
eigenfunctions of linear transformations. You’ll then explore these concepts in
greater detail in many of your future classes.
We now make one final definition as we wrap up this chapter. We want
a word that quickly tells us which vectors are mapped to zero. We’ll be
using this vocabulary often as we solve differential equations. In each of the
previous two problems, the last portion asked you to find the kernel of the linear
transformation.
Definition 3.6: Kernel. The kernel of a linear function f is the collection of
vectors that are mapped to zero, i.e. f (~x) = ~0.
Once you have a collection of vectors in the kernel of a linear function, you
can use those vectors to obtain lots of other vectors. Any linear combination of
vectors in the kernel will remain in the kernel. The next problem asks you to
show why.
CHAPTER 3. LINEAR ALGEBRA APPLICATIONS 49

Problem 3.33 Suppose that ~x and ~y are both in the kernel of a linear
function f . Show that any linear combination of ~x and ~y are also in the kernel of
f . [Hint: What is f (~x), f (~y ), and then what is f (a~x + b~y )? Be able to explain
every step in your work, by telling us what definition you are using.]

The previous problem shows us that the kernel is closed under linear com-
binations. You can’t get out of the kernel by performing linear combinations
of things that are in the kernel. We now end this chapter with an example
to illustrate how we will use the words “linear” and “kernel” throughout the
semester. Most of the remainder of this course deals with finding the kernel of a
linear function.
Problem 3.34 Consider the differential equation y 0 − 3y = 0. Let L be
the operator L(y) = y 0 − 3y. With the operator notation, we can rewrite the
differential equation as L(y) = 0 (so we need to find the kernel of L).
1. What is the domain of L?
2. Show that L is a linear operator by computing L(y1 + y2 ) and L(cy).
3. Solve the differential equation y 0 − 3y = 0 by using separation of variables.
4. Obtain a single solution (no unknown constants) to the ODE.
5. Using the single solution, can you obtain all solutions as a linear combina-
tion of the single solution?

The solutions to the first order ODE y 0 − 3y = 0 are linear combinations of a


single solution. This is precisely because the ODE is a linear first order ODE. If
we had a 2nd order linear ODE, then solution would be all linear combinations
of two independent solutions. The next problem introduces this idea.

Problem 3.35 Consider the differential equation y 00 + 3y 0 + 2y = 0. Let


L be the operator L(y) = y 00 + 3y 0 + 2y. With the operator notation, we can
rewrite the differential equation as L(y) = 0 (so we need to find the kernel of L).
1. What is the domain of L?
2. Show that L is a linear operator by computing L(y1 + y2 ) and L(cy).
3. Show that both e−2x and e−x are in the kernel of L.
4. Are e−2x and e−x linearly independent? Why?
5. Why is y = c1 e−2x + c2 e−x a solution to the differential equation y 00 +
3y 0 + 2y = 0?

3.7 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 4

First Order ODEs

This chapter covers the following ideas.

1. Be able to interpret the basic vocabulary of differential equations. In


particular, interpret the terms ordinary differential equation (ODE), initial
value, initial value problem (IVP), general solution, and particular solution.
2. Identify and solve separable and exact ODEs.
3. Use integrating factors and substitution to solve additional ODEs.
4. Use the three step modeling process (express, solve, and interpret) to
analyze exponential growth and decay, Newton’s law of cooling, mixing,
and the logistics equation.
5. Use Laplace transforms to solve first order ODEs.

The problems below come from Schaum’s Outlines Differential Equations


by Richard Bronson. If you are struggling with a topic from the problem set,
please use this list as a guideline to find related problems.

Concept Sec. Suggested Relevant


Separable Review 4 42 1-8,23-45
Exact 5 5,11,26,29,34 1-13,24-40,56-65
Integrating Factors 5 21,22,41,47 21,22,41-42,47-49,51,55
Linear 6 4,13,20,32,51 1-6,9-15,20-36,43-49,50-57
Homogeneous 4, 11,12,48 11-17,46-54
Bernoulli 6 16,53 16,17,37-42,53
Applications 7 4[27],6[33],1[38] 1-6 [26-44]
7 10[48],17[67],7[88] 8-10 [45-50],16-18[65-70], 7[87-88]
Laplace Review 21 19,32,33[use table] 4-7,10-12,27-35
Inverse Transforms 22 1,2,3,6,13,15 1-3,6,15,17,20-28,42,42,45-47
Solving ODEs 24 1,14,19(parfrac) 1,2,11,14,15,19-19,22,24,25,38-42

50
CHAPTER 4. FIRST ORDER ODES 51

4.1 Basic Concepts and Vocabulary


Let’s start this chapter with a review problem from the first chapter.

Problem 4.1 Solve the ordinary differential equation y 0 − 5y = 0. Then use


the initial condition y(0) = 7 to obtain the unknown constant.

Definition 4.1: Differential Equation Language. A differential equation


is an equation which involves derivatives (of any order) of some function.

• An ordinary differential equation (ODE) is a differential equation


involving a function y(x) whose domain is one dimensional. The function
only has ordinary derivatives.
• A partial differential equation (PDE) is a differential equation involv-
ing a function y(x1 , x2 , . . .) whose domain is more than one dimensional.
The function has partial derivatives.
• The order of an ODE is the largest order derivative that appears in the
ODE.
• A solution to an ODE on an interval (a, b) is a function y(x) defined on
the interval (a, b) which satisfies the ODE.

To verify that a function is a solution to an ODE, calculate derivatives and


put them in the ODE. If the resulting equation is an identity for all x ∈ (a, b),
then you have verified that you have a solution.
Typically a solution to an ODE involves an arbitrary constant C. There is
often an entire family of curves which satisfy a differential equation, and the
constant C just tells us which curve to pick.
Definition 4.2: Initial Value Problems (IVP). Often an ODE comes with
an initial condition y(x0 ) = y0 for some values x0 and y0 .
• A general solution of an ODE is all possible solutions of the ODE.

• A particular solution is one of infinitely many solutions of an ODE.


• We can use the initial conditions to find a particular solution of the ODE.
• An ODE, together with an initial condition, is called an initial value
problem (IVP).

This next problem has you practice with the vocabulary above. You’ll want
to use separation of variables to solve this problem.

Problem 4.2 Consider the IVP y 0 − 4y = 8, where y(0) = 3.


1. What is the order of the ODE?

2. Obtain a general solution of the ODE. State an interval on which your


general solution is valid.
3. Verify that your general solution is a solution to the ODE.
4. Solve the IVP.
CHAPTER 4. FIRST ORDER ODES 52

One of the key uses of differential equations is their ability to model the
world around us. If something is changing, then we can often use y 0 to represent
that change. If we know a force is acting on an object, then F = ma = my 00
allows us to build a differential equation that models the motion of the object.
As the semester progresses, we’ll be making these connections in each chapter,
and showing how to use differential equations to model the world. We’ll also see
that eigenvalues and eigenvectors are the connecting piece that allows us to see,
and obtain, the solution to differential equations. Many of the models we build
will depend on observing that a change is proportional to something, or that a
force is proportional to something. If you’ve forgotten what proportional means,
here’s a definition.
Definition 4.3: Proportional. We say that y is proportional to x if y = kx
for some constant k. We call the constant k the proportionality constant. When
two quantities are proportional, then doubling one will double the other, tripling
one will triple the other, and so on. A percentage change to one is matched by
the other.
The next problem has us build our first model. Suppose you go to the
doctor’s office to get a strep test done. They swab the back of your throat and
then put a sample of tissue from your body in a petri dish. If you have strep,
then the bacteria will grow inside the petri dish, and they’ll be able to see the
rapid growth of the strep bacteria in a fairly short amount of time.

Problem 4.3: Exponential Growth Suppose that you place some bacte-
ria in a petri dish. Initially, there are P mg of the bacteria in the dish, and
then the bacteria starts to reproduce, so the amount of the bacteria is changing.
Let y(t) represent the mg of bacteria in the dish after t days. Then y 0 would
represent the rate at which y is changing. The rate at which y grows depends on
how large y is. If you were to double y, then the growth rate y 0 should double
as well. Similarly, if you tripled y, then the growth rate y 0 would triple as well.
It seems reasonable to assume that y 0 is proportional to y.
1. Express the statement “y 0 is proportional to y” as a differential equation.
What are the initial values (if any)?
2. Solve the differential equation above, obtaining a general and particular
solution.
3. Interpret your solution in the context of the original problem. What does
a typical graph of your solution look like (it’s got some constants in it,
but you can show the general shape). If your solution is correct, what will
happen as t gets large?
4. If after 10 minutes you measure 5 mg of the bacteria, and then after 20
minutes you measure 8 mg of the bacteria, how much bacteria was present
initially? [If you apply the natural logarithm to both sides of your solution,
then you can solve a linear system of equations to obtain the unknowns
ln P and k. You can then use Cramer’s rule or RREF.]

The next problem is very similar to the previous, we’ll just change the setting
from growth of a bacterial culture, to growth of an investment.

Problem 4.4 Suppose you invest P = $10, 000 dollars in an account, and
that the money accumulates interest at a constant rate. Let A(t) represent the
CHAPTER 4. FIRST ORDER ODES 53

accumulated worth of your investment after the investment has had t years to
grow. No new deposits are made, rather the interest is just left in the account
to accumulate more interest.
1. Why is is reasonable to assume that A0 is proportional to A?
2. Express the connection between A and it’s growth as a differential equation.
What are the initial values (if any)?
3. Solve the differential equation, obtaining a general and particular solution.
4. Interpret your solution in the context of the original problem. What does
a typical graph of your solution look like (it’s got some constants in it,
but you can show the general shape). If your solution is correct, what will
happen as t gets large?
5. Suppose after 5 years that the value of the investment has reached $18,000.
How long will it take for the investment to reach $100,000.

Let’s look at one more application before introducing additional solution


techniques. Here’s the scenario. You decide to cook a turkey for Thanksgiving.
You turn the oven on to 350◦ F, and the package says that you need to get
the turkey heated up to an internal temperature of 165◦ F. You followed the
instructions and thawed the turkey so that currently it’s about 40◦ F. How long
will it take for the turkey to heat up? If instead of heating a turkey, you wanted
to heat a chicken patty, would the time vary? If you just wanted to heat a metal
pan up, how would the time vary? The next problem introduces a simplistic
model to examine this question. The model works best when you assume that
an increase in heat is evenly distributed throughout an object (such as heating
a metal pan). When you heat a turkey, the heat is not evenly distributed. This
uneven heat distribution complicates the following model, and we’d need to
explore PDEs to obtain a better model for heat flow. To simplify things, we’ll
assume that heat distributes itself evenly throughout the object.

Problem 4.5: Newton’s Law of Cooling Suppose that you place an ob-
ject in an oven. The oven temperature is set to A (you can use Fahrenheit, Celsius,
or Kelvin). I’m using A as the temperature of the surrounding “a”tmosphere.
The object’s initial temperature is T0 . Let T (t) represent the temperature of the
object t minutes after we place the object in the oven. If T (t) is really close to
A, then the rate at which T increases should be pretty small, as the temperature
of the object is almost the same as the temperature of the atmosphere. If T is
really far from A, then the rate of temperature change should be a lot larger.
Hence, it appears that T 0 depends on the difference A − T . Newton conjectured
that the rate at which the temperature changes is proportional to the difference
A − T.
1. Express the statement “the rate at which the temperature changes is
proportional to the difference A − T ” as a differential equation. What are
the initial values (if any)?
2. Solve the differential equation above, obtaining a general and particular
solution.
3. Interpret your solution in the context of the original problem. What does
a typical graph of your solution look like (it’s got some constants in it,
but you can show the general shape). If your solution is correct, what will
happen as t gets large? Does this seem reasonable.
CHAPTER 4. FIRST ORDER ODES 54

Problem 4.6 You should have obtained the solution to Newton’s law of
Cooling as
T (t) = A + (T0 − A)e−kt ,
where k is the proportionality constant. Suppose that T0 = 45◦ F and A = 350◦ F.
1. After 5 minutes, you check the temperature and observe T (5) = 80◦ F.
What is k, and how long will it take for the object to reach 165◦ F.

2. After 5 minutes, you check the temperature and observe T (5) = 120◦ F.
What is k, and how long will it take for the object to reach 165◦ F.
3. The number k depends on the material you are trying to heat. If k is
large, what does that mean about the material? Think of some examples
where k would be large, and where k would be small.

You’ve now seen a few examples of how differential equations are used to
model the world around us. You will most likely find that in your future
courses, you’ll be taking real world phenomenon and expressing the relationships
you see as differential equations. Solving those differential equations gives us
mathematical models we can use to interpret the world around us. There are
three parts to this process.
• Express real world phenomenon in terms of a differential equation.
• Solve the differential equation.
• Interpret the solution in the context of the problem, which often involves
using the results to predict behavior.
A main focus in this class will be the second portion, “Solve.” As we all come
from a different background, we won’t have time to develop the background
material that you’ll explore in your respective majors, so the “Express” portion
will often come in your major courses. You may find in some future courses that
they focus on the “Express” and “Interpret” portions, and then refer you to
some standard reference for the “Solve” part. The goal of our course is to help
you develop the key solution techniques. Along the way, we’ll occasionally add
some simpler problems that we can “Express” and “Interpret” without needing
a lot of background.

4.2 Solution Techniques


In the review chapter, we explored finding potentials of a gradient field. We also
introduced the language of differential forms. Recall the following definition.
Definition 4.4: Differential Forms. Assume that f, M, N are all functions
of two variables x, y.
• A differential form is an expression of the form M dx + N dy (just as a
vector field is a function F~ = (M, N )).
• The differential of a function f is the expression df = fx dx + fy dy (just
~ = (fx , fy )).
as the gradient is ∇F
CHAPTER 4. FIRST ORDER ODES 55

• If a differential form is the differential of a function f , then we say the A differential form is exact
differential form is exact (just as we say a vector field is a gradient field). precisely when the corresponding
The function f is called a potential for the differential form. Let me vector field is a gradient field.
reiterate. We say a differential form M dx + N dy is exact if and only if
there exists a function f such that

df = M dx + N dy.

The next problem provides the key idea need to solve almost every differential
equation we’ll encounter in this course. If you can rewrite the differential equation
in differential form, and the differential is exact, then solving the ODE requires
that you find a potential.

Problem 4.7 Consider the differential form (2x + 3y)dx + (3x)dy.


1. By taking derivatives, show that the differential form is exact. [See the
test for a conservative vector fields, problem 1.30.] Show that a potential
for this differential form is f (x, y) = x2 + 3xy.

2. Rewrite the differential equation 3xy 0 + 3y = −2x in the differential form

M dx + N dy = 0.

What’s the angle between the vectors (M, N ) and (dx, dy)?

3. Explain why the solution to M dx+N dy = 0 is a level curve of the potential


f (x, y).
4. Give the solution to 3xy 0 + 3y = −2x if y(2) = 1.

I’m trying to decide on a good name for the next theorem. We’ll see that
this theorem is crucial to solving just about EVERY differential equation we
encounter from here on out, and it also solves all the ones before now. The name
below might change, but something along the lines of “the sledgehammer,” or
“one tool to rule them all” would work. The theorem has no official name, so we
can make one up as we go. Basically, we’ll show that we can reduce almost every
ODE that we solve to a form which allows us to apply the following theorem.
Theorem 4.5 (The sledgehammer for ODEs - one tool to rule them all).
Suppose that M dx + N dy is an exact differential form with potential f (x, y).
If we can write an ordinary differential equation in the form M dx + N dy = 0,
then an implicit general solution to the ODE is f (x, y) = c. The level curves of
a potential are precisely the solutions to the ODE. Let me repeat that. The level
curves of a potential are precisely the solutions to the ODE.
Let’s use the previous theorem now to solve a couple of ODEs.

Problem 4.8 Give a general solution to each of the following ODEs. You
may give your solution implicitly, so don’t worry about solving for y. [Hint: Use
the previous theorem.]
1. (4x + 2y)dx + (2x + y)dy = 0

2. (x cos(xy) + y)y 0 = sin x − y cos xy


CHAPTER 4. FIRST ORDER ODES 56

4.2.1 Use integrating factor when the ODE is not exact


Let’s now return to a problem we’ve already solved, and show how we can use
the sledgehammer theorem to solve things we’ve already seen, provided we add
one more step.

Problem 4.9 Consider the ODE y 0 = −3y which we can write in differential
as 3ydx + 1dy = 0.
1. Show that 3ydx + 1dy is not exact. Then use separation of variables to
solve the ODE.

2. Multiply both sides of 3ydx + 1dy = 0 by y1 . Show that the resulting


differential form is exact, and use the sledgehammer theorem to obtain a
solution.
3. Multiply both sides of 3ydx + 1dy = 0 by e3x . Show that the resulting
differential form is exact, and use the sledgehammer theorem to obtain a
solution.

Any time we can write an ODE in the differential form M dx + N dy = 0, the


zero on right hand side gives us power. Our goal will be to multiply both sides
of the differential equation by some function F , called an integrating factor, so
that the resulting differential is exact. The general solution to the ODE is then
simply the level curves of a potential.

Definition 4.6: Integrating Factor. An integrating factor for a differential


form M (x, y)dx + N (x, y)dy is a function F (x, y) so that the product F M dx +
F N dy is exact.
In Problem 4.9, I gave you two different integrating factors. Where did
they come from? The next problem will show you how I obtained one of the
integrating factors. There many more options.

Problem 4.10 Let M (x, y)dx + N (x, y)dy be a differential form. For sim-
plicity, we just write M dx + N dy. Suppose F (x, y) is an integrating factor.
1. To be exact, explain why we must have
∂F ∂M ∂F ∂N
M +F = N +F
∂y ∂y ∂x ∂x

2. If we assume that F only depends on x, so that F (x, y) = F (x), show that


a possible option for an integrating factor is
Z 
R My −Nx
dx M y − Nx
F (x) = e N = exp dx .
N

3. If we assume that F only depends on y, so that F (x, y) = F (y), show that


a possible option for an integrating factor is
Z 
R Nx −My
dy Nx − M y
F (y) = e M = exp dy .
M

[In class, you may omit the last part in your presentation, as it’s almost an
exact replica of the 2nd part.]
CHAPTER 4. FIRST ORDER ODES 57

The problem above gives us a way of finding integrating factors for many
differential equations. It will not give an integrating factor for EVERY differential
equation, but it will provide an integrating factor for almost all the ODEs we
tackle in this course. Let’s now try using this technique on a problem we’ve
already solved.

Problem 4.11 Consider the ODE y 0 − 4y = 8, which we solved in Problem


4.2.
1. Rewrite the ODE in differential form M dx + N dy = 0.
R My −Nx R 
dx My −Nx
2. Find an integrating factor F (x) = e N = exp N dx .

3. Multiply both sides by the integrating factor, and then solve the ODE by
applying the sledgehammer theorem.

Problem 4.12 Solve each ODE by finding an appropriate integrating factor.


0
1. y + 4xy = 3x
2. 2ydx + (3x + 4y)dy = 0 (Doable now)
3. y 0 + 3y = e2x (Solve for y.)
4. y 0 − 4y = e4x (Solve for y.)
5. xy 0 − 4y = 2x (Solve for y.)

Let’s now look at an additional application. We will encounter mixing


model problems throughout the semester. They provide a simple way to see
applications of ODEs, without requiring much background.

Problem 4.13: Mixing Model Suppose a 2000 gallon tank contains a


solution of water which initially contains 50 lbs of salt. The tank has an inflow
valve, and an outflow value. We would like to change the salt content, so we
start pumping in 30 gallons of water (with 1/2 lb of salt per gallon) each minute.
We’ll assume that the mixture is evenly spread throughout the entire tank by
constant stirring. At the same time, 30 gallons of the evenly stirred mixture
flow through the outflow valve each minute. Let y(t) represent the lbs of salt
in the tank after t minutes. We currently only know y(0) = 50. Our goal is to
determine the amount of salt y(t) in the tank after t minutes.
1. (Express) The salt content changes in two ways. Salt is added through
the new solution (a flow in), and salt leaves through the outlet valve (flow
out). Explain how to obtain a formula for the flow in, and a formula for
the flow out. Then explain why
30
y 0 = 15 − y.
2000

2. (Solve) Obtain a general solution to the ODE, and then use the initial
value to obtain a particular solution.
3. (Interpret) Construct a graph of your solution. As t increases, what
happens to the salt content? Does your answer seem reasonable?
CHAPTER 4. FIRST ORDER ODES 58

The mixing model problem above, as well as the exponential model and
Newton’s law of cooling, all belong to a special class of ODEs which we call
linear ODEs.
Definition 4.7: Linear ODE. If we can write an ODE in the form y 0 +p(x)y =
q(x), then we say that the ODE is linear. This is precisely because the operator
L(y) = y 0 + a(x)y is a linear operator. If q(x) = 0, then we say the linear ODE
is homogeneous. Otherwise, we say the linear ODE is non homogeneous.
The next problem provides a way to obtain a solution to EVERY linear ODE.
Practice until you can develop this formula quickly, and then you’ll have the
key concepts needed for solving just about every ODE we encounter throughout
the semester.
Problem 4.14: A Linear ODE Solution Consider the linear ODE y 0 +
p(x)y = q(x), where p and q are differentiable functions of x on some interval.
Find an appropriate integrating factor, and then find a potential. Finish by
solving for y to show that on this interval, a general solution is
R R
Z  R 
y(x) = e− p(x)dx C + e− p(x)dx e p(x)dx q(x) dx,

where C is an arbitrary constant. If the linear ODE is homogeneous, what is a


general solution?

Problem: 14 and 1/2: Go back to problem solving ODEs by finding an


integrating factor, and decide which ODEs are linear. Then pick one of the
ODEs and solve it using the general solution from the previous problem.

Let’s tackle a couple more application problems. As you solve them, rather
than use the formula above, practice finding an appropriate integrating factor,
and then find a potential.
Problem 4.15 Suppose a 50 gallon tank contains a solution of fertilizer
which initially contains 10 lbs of fertilizer. We start pumping in 4 gallons per
minute, where the concentration of fertilizer is 1/3 lb per gallon. Assume that
the mixture is evenly spread throughout the entire tank by constant stirring.
The extra At the same time, 4 gallons of the evenly stirred mixture flow through
the outflow valve each minute. Let y(t) represent the lbs of fertilizer in the tank
after t minutes.
1. Express the mixing model as an IVP (give the ODE and the IV).
2. Solve the IVP.
3. Construct a rough graph of your solution. As t increases, what happens
to the salt content? Does your answer seem reasonable?from the

The next problem applies Newton’s law of cooling to examine what happens if
the temperature of the surrounding environment changes. Recall that Newton’s
law of cooling suggests that the rate of change of temperature of an object
is proportional to the difference between the current temperature and the
surrounding atmosphere, which we wrote earlier as

T 0 = k(A − T ).
CHAPTER 4. FIRST ORDER ODES 59

Problem 4.16 Suppose that during a summer day, the temperature outdoors
fluctuates between 70◦ F and 110◦ F. We’ll approximate this with a sine wave. If
we let t = 0 be noon, then we could obtain the temperature A outdoors after t
hours using the formula

A(t) = 20 sin( t) + 90.
24
Suppose that your air conditioner breaks at noon (your house was at 70◦ F at
noon), and then by 6pm in the evening, the temperature had risen to 90◦ F.
1. Express this heating problem as an IVP.
2. Show that the ODE is linear, and then use technology to solve the ODE.
You’ll need to use T (6) = 90 to obtain the proportionality constant k.
3. Graph your solution for 3 days. In the late evenings, which is hotter, the
house or the outdoors?

4.2.2 Use a substitution when you can’t get an integrating


factor.
We can solve most of the differential equations we tackle this semester by
obtaining an integrating factor using the formulas developed in the previous
section. Sometimes however, this won’t work. In these cases, we often just have
to make an appropriate change of coordinates (a u-substitution). Let’s illustrate
how this works with an example. Then we’ll tackle the logistics model and
introduce another application.

Problem 4.17 Consider the ODE y 0 = sin(x + y). There is no way that
you’ll get an integrating factor out of this by using our formulas for F (x) and
F (y). The problem is the x + y. We now do a substitution.
1. Write the ODE in the differential form
 
  dx
M N = 0.
dy

2. Let x = x and u = x + y (this is a coordinate transformation). Explain


why we have     
dx 1 0 dx
= .
dy −1 1 du

3. Show that the ODE can be written in the form (− sin u − 1)dx + du = 0.
Then use either separation of variables (or the sledgehammer) to solve the
ODE. Don’t forget to substitute back in when you’re done.

The last problem introduced the key idea. If you have an ODE in the form
 
  dx
M N = 0,
dy

then an appropriate substitution x = x, y = g(x, u) will give us the ODE


  
  1 0 dx
M N = 0.
gx gu du
CHAPTER 4. FIRST ORDER ODES 60

If we can find an integrating factor F (x) or F (u) which makes


  
  1 0 dx
F M N
gx gu du

exact, then we can use the sledge hammer to solve the ODE. The hard part here
is finding the correct transformation. If you can find the correct transformation,
then you can solve the ODE. This is not easy, and in general it can be really
tough.

Problem 4.18 Consider the ODE xyy 0 = 4x2 + 2y 2 . In this situation, if Notice that the coefficients xy,
you let u = y/x (so y = xu), show that you can rewrite the ODE as 4x2 , and 2y 2 , all are basically
second order monomial terms.
u 1 When the coefficients of the ODE
du = dx. are monomials with the same
4 + u2 x degree, the substitution u = y/x
will convert the ODE into a
This is a separable ODE, which we can solve. Solve the ODE. separable ODE. I’ll leave this to
you to prove. You do have the
tools to prove it.

Problem 4.19 Consider the ODE (x + 2y)dx + (3x + 4y)dy = 0. Use the
substitution u = y/x to convert this into a separable ODE and give a general
solution.

Consider the ODE y 0 + 3y = 4y 3 . This ODE is not linear (why?). We could


separate variables on this ODE and solve (we’ll do so in class, reminding you
about partial fractions). Instead, Bernoulli noticed that if the ODE is in the
form y 0 + a(x)y = b(x)y n , then the substitution u = y 1−n will always convert
the ODE into a linear ODE, and then we can use an integrating factor to solve
the ODE. It’s not easy to discover the right substitution that will convert an
ODE into something we can solve. We call them Bernoulli ODEs because his
discovery was quite clever. The u = y/x substitution above was not clever
enough to get a name attached to it.

Problem 4.20: Bernoulli ODE Consider the ODE y 0 + 3y = 4y 3 . Use


the substitution u = y 1−3 to convert this ODE into a linear ODE, and then
solve. [Hint: You know that u = y −2 . Use this to solve for y, and then compute
dy =?du. Then just substitute. You’ll probably have a really ugly term involving
u−3/2 , so multiply both sides by u3/2 and all the ugliness will disappear.]

We’ll come back to Bernoulli ODEs and see some applications of them after
we review Laplace transforms.

4.3 Laplace Transforms


Recall that the Laplace transform of a function y(t) defined for t ≥ 0 is
Z ∞
Y (s) = L {y(t)} = e−st y(t)dt.
0

• We call the function y(t) the inverse Laplace transform of F (s), and we
write y(t) = L −1 {Y (s)}.
• As a notational convenience, we describe original functions y(t) using a
lower case y and input variable t or x. We describe transformed functions
Y (s) using the same capital letter and input variable s.
CHAPTER 4. FIRST ORDER ODES 61

f (t) F (s) provided f (t) F (s) provided


1 s
1 s>0 cos(wt) s>0
s s2 + ω 2
1 ω
t s>0 sin(wt) s>0
s2 s2 + ω 2
2 s
t2 s>0 cosh(wt) s > |ω|
s3 s2 − ω 2
ω
n! sinh(wt) s > |ω|
tn s>0 s − ω2
2
sn+1
1 y L {y} = Y
eat s>a
s−a sL {y} − y(0)
y0
= sY − y(0)

Table 4.1: Table of Laplace Transforms

We’ve computed quite a few Laplace transforms already. For convenience, I’ve
placed the Laplace transforms we’ll use most often in Table 4.1. Feel free to use
this table as you find Laplace transforms and their inverses. With practice, you
will memorize this table.
We can use this table, and the linearity of the Laplace transform, to quickly
compute both forward transforms and inverse transforms. The next problem
asks you to do this.

Problem 4.21 Use the table of Laplace transforms to do the following:


1. Compute the Laplace transform of y(t) = 6 + 2t + 4t2 − 5e7t + 11 cosh(3t).
2. Compute the inverse Laplace transform of
5 4 3s 2
Y (s) = + + 2 − .
s s3 s + 16 s2 − 9
Once you have a guess for the inverse Laplace transform, verify that your
guess is correct by computing the Laplace transform (using the table of
course).

2s + 1
Problem 4.22 Find the inverse Laplace transform of F (s) = .
s2 + 5s + 4
[Hint: Use a partial fraction decomposition. Start by factoring the denominator.]

2s + 1 5s + 7
Problem 4.23 Find the inverse Laplace transform of F (s) = + .
s2 + 9 s2 − 9
[Hint: This can all be done using trig and hyperbolic trig functions.]

The real power behind the Laplace transform comes from the last formula
in the table.
Theorem 4.8 (The Laplace Transform of a Derivative). Suppose that y(t) is
y(t)
a differentiable function defined on [0, ∞) such that lim st = 0 for some s.
t→∞ e
We say that y(t) does not grow faster than some exponential, as the function est
CHAPTER 4. FIRST ORDER ODES 62

grows faster that y(t) (otherwise the limit would not be zero). If this is the case,
then the Laplace transform of y 0 is
L {y 0 (t)} = sL {y(t)} − y(0) = sY − y(0).

Problem 4.24 Prove the previous theorem. In other words, show that
L {y 0 (t)} = sL {y(t)} − y(0) = sY − y(0). [Hint, use integration by parts once,
and don’t forget to use the bounds.]

Before illustrating the key value of this theorem, let’s fill in the only remaining
rules in our Laplace transform table that we have not yet developed.
Problem 4.25 In the table of Laplace transforms it also states that the
s ω
transform of cos(wt) is 2 , and that the transform of sin(wt) is 2 .
s + ω2 s + ω2
Pick one of these rules, and then use the definition of the Laplace transform to
explain why it is true. [Hint: You’ll want to use integration by parts twice. See
the online text if you want more hints.]

We’ll now use Theorem 4.8 to solve some ODEs. You’ll see the power behind
this method.
Problem 4.26 Consider the IVP y 0 = 7y, y(0) = A.
1. Apply the Laplace transform to both sides of this ODE. You should have
an equation involving Y (s).
2. Solve for Y .
3. Now find the inverse transform of Y . This is y(t), the solution to the
ODE.
4. We already know how to solve this ODE using either separation of variables,
or by finding an integrating factor. Pick one of these methods and obtain
a general solution.

Did you see the process above? Rather than integrate, we just (1) computed
the Laplace transform of both sides, (2) solved an algebraic equation for Y , and
then (3) obtained the inverse Laplace transform to get Y .
Here’s a parable to compare to using Laplace transforms. You are inside a
house that has a single door leading to the downstairs. You are on the main
floor, and need to get downstairs. The door is locked and you don’t know where
the key is (you can’t figure out how to solve the ODE). You (1) decide to walk
out the front door (you apply the Laplace transform). Then you (2) walk around
the house and find the back door entrance to the basement (you solve for Y , and
maybe apply a partial fraction decomposition). Then (3) you walk up to the
locked door and unlock it from the other side (you find the inverse transform).
The Laplace transform replaces the problem of integrating with an algebraic
problem (often easier to solve). We’ll be using it throughout the semester to
help us see patterns, and unlock difficult problems. It works best when the ODE
is linear.
Problem 4.27 Consider the IVP y 0 + 3y = 5, y(0) = 7. (1) Apply the
Laplace transform to both sides of this ODE to obtain an equation involving
Y = L {y}. (2) Solve for the transformed function Y . You will need to use
A B
a partial fraction decomposition to write Y = + . (3) Use an inverse
s+3 s
transform to obtain the solution y(t).
CHAPTER 4. FIRST ORDER ODES 63

You’ll find that with most Laplace transform problems, we’ll need a partial
fraction decomposition before we can compute an inverse transform. The next
problem has you practice the Laplace transform inversion process to solve
multiple problems that you know the answer to using simple integration.

Problem 4.28 For each problem below, use a Laplace transform to solve
the ODE. Each problem could be solved with simple integration instead. The
point to this problem is to help you see how the Laplace transform gives you, in
a different way, information you already know how to obtain.
1. y 0 = 5t2 + 7t + 3, y(0) = C.
2. y 0 = eat , y(0) = C.

3. y 0 = cosh(3t), y(0) = 2.
4. y 0 = sin(3t), y(0) = 2.
s A
[Hint: You’ll need a partial fraction decomposition to write = +
s(s2 + 9) s
Bx + C
on part 4. You’ll need a similar idea on 2 and 3.]
s2 + 9

Let’s end this section with two more Laplace transform problems, where the
initial conditions are not given.

Problem 4.29 Solve the ODE y 0 + 4y = e3t by using a Laplace transform.


No initial condition was given, so you should use something like y(0) = C.
Because this initial condition involves an arbitrary constant, you may find that
Cramer’s rule helps you quickly obtain the partial fraction decomposition (rather
than row reduction).

Problem 4.30 Solve the ODE y 0 +3y = sin(2t) by using a Laplace transform.
See the previous problem for help about what to do when no initial condition is
given.

4.4 What Method Should I Use?


In this chapter, we’ve explored various different techniques to solve first order
ODEs. Here’s a list.
• Separation of variables: The easiest, if you can separate.
• Exact: The ODE has a potential. Use the sledgehammer.

• Integrating Factors: Make the ODE exact.


• Substitution: Change variables so you can make the ODE exact.
• Laplace Transforms: Dodge integration. Replace it with algebra.
CHAPTER 4. FIRST ORDER ODES 64

The Laplace transform works nicely on linear ODEs with constant coefficients. If
we’re missing an initial condition, the algebra gets a little uglier, but still doable.
We’ll be using the Laplace transform to discover solutions to higher order ODEs
as the semester progresses. However, we could have solved every one of the
problems we tackled with Laplace transforms by instead using our sledge hammer
tool (make the ODE exact, through substitutions and/or integrating factors,
and then find a potential). The sledgehammer tool will solve a much larger I’m working on writing a paper to
range of ODEs than the Laplace transform, and near the end of the semester extend the sledgehammer
approach to solve just about every
we’ll see it’s true power in terms of matrices, eigenvalues, and eigenvectors. ODE undergraduates tackle, and
So which method should you use? That depends on how much work you provide a uniform approach to
want to do. The sledgehammer tool will solve EVERY problem we see. If an working with ODEs. I’m just
ODE is separable, it’s generally much faster to just use separation of variables waiting for an interested student
to come and complete the project
(which is really just using an integrating factor). If the ODE is linear, with with me.
constant coefficients, and you have an initial condition, then a Laplace transform
might be faster. If all else fails, make the ODE exact and find a potential.

Problem 4.31 Which method would you use to solve each ODE below? If
you opt for separation of variables, then show us how to separate. If the ODE is
exact, show us how you know. If you decide to find an integrating factor, show
us the integrating factor. If you will use a substitution, what substitution will
you use? If you decide to use Laplace transforms, take the Laplace transform of
both sides. In all cases, don’t solve the ODE, rather just show us the first step
in the solution process.

1. x2 y 0 = 4xy 2 , y(2) = 1.
2. xy 0 = 3y + x, y(2) = 1.
3. y 0 + 8y = ex , y(0) = 1.
4. y 0 + 8y = y 2 , y(0) = 1.

Let’s end the chapter by considering another application. In Problem 4.3,


we considered the growth of bacteria in a petri dish. We could have applied this
to any other population (such as deer in a forest, people on the Earth, cancer
cells spreading through the bloodstream, number of cell phones users in Brazil,
speed of computer processors, etc.) There is a problem with this model. It
works great for a little while, but physical systems cannot grow exponentially
forever. Eventually the growth has to slow down. In the example with the petri
dish, eventually the bacteria will have gotten so large that it cannot support
more growth. This is where our final problem begins.

Problem 4.32 Suppose that bacteria grow in a petri dish (if you don’t like
bacteria, then pick something else to put in here that interests you). From
Problem 4.3, we used the model y 0 = ky to express that the rate of growth y 0 is
directly proportional to the size y of the population. We assumed that k was
constant. Here’s where we now make a change. Instead of assuming that k is
constant, let’s assume that as the population gets larger, that the constant k
decreases. In fact, if we let M represent a theoretical maximum population, let’s
assume that k is proportional to the difference between the current population
and this theoretical maximum.

1. (Express) Explain why y 0 = −a(y − M )y.


2. (Solve) Solve the ODE using separation of variables. You’ll need to perform
1
a partial fraction decomposition on y(y−M ).
CHAPTER 4. FIRST ORDER ODES 65

3. (Interpret) Pick some constants for a, M , and the initial size of the
population. Then graph your solution. You should obtain a logistics curve
(please use a computer to check your work).

Problem 4.33 The ODE y 0 = −a(y − M )y is a Bernoulli ODE. Rewrite it


in the form y 0 + a(x)y = b(x)y n , and then use Bernoulli’s substitution u = y 1−n
to solve the ODE.

Question 4.9. Why can’t we (yet) use a Laplace transform to solve y 0 =


−a(y − M )y?

4.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 5

Homogeneous ODEs

This chapter covers the following ideas.

1. Explain Hooke’s Law in regards to mass-spring systems. Construct and


solve differential equations which represent this physical model, with or
without the presence of a damper.
2. Understand the vocabulary and language of higher order ODEs, such as
homogeneous, linear, coefficients, superposition principle, basis, linear
independence.
3. Solve homogeneous linear ODE’s with constant coefficients (with and
without Laplace transforms). In addition, create linear homogeneous
ODE’s given a basis of solutions, or the roots of the characteristic equation.
4. Explain how the Wronskian can be used to determine if a set of solutions is
linear independent. Briefly mention the existence and uniqueness theorems
in relation to linear ODEs, and give a reason for their importance.

The problems below come from Schaum’s Outlines Differential Equations


by Richard Bronson. If you are struggling with a topic from the preparation
problem set, please use this list as a guideline to find related practice problems.

Concept Sec Suggestions Relevant Problems


Vocabulary of ODEs 8* 33-35 1-3,33-35
2nd Order Homogeneous 9* 1,7,12,21,27,40 1-15, 17-45
nth Order Homogeneous 10* 3,7,8,9,12,18,37,41,44,49 All
IVPs (Homogeneous) 13 9 4,9,13
Applications 14 2,3,5,29,31,34,41-43 1-8,26-43
Laplace Transforms 21* 26, 54 14(c),15(b),25,26,54-58,
Inverse Transforms 22* 7, 34-36,38,read 12 and 18,44 6-10,15-19,29-30,32-53
Solving ODES 24 26,44 5,26,31,36,43,44
Wronskian and Theory 8* 9,10,18,20,43,48,53,58 5-10, 13-20, 31,36-64

*The problems in these sections are quick problems. It is important to do


lots of them to learn the pattern used to solve ODEs. You may be able to finish

66
CHAPTER 5. HOMOGENEOUS ODES 67

7 or more problems in 15 minutes or less. Please do more, so that when you


encounter these kinds of problems in the future you can immediately give an
answer and move forward.

5.1 Some Physical Models


In this chapter, we’re going to learn how to solve a huge collection of higher order
differential equations. Before diving into the details, let’s make sure we know
WHY we would even want to do so. If I knew you all had the same background,
we could dive into lots of examples directly related to your field (you’ll do that
in future classes in your major). Since we have a diverse background in our class,
we’ll stick mostly to models that connect velocity, position, and acceleration.
Before the next chapter ends, we’ll add to this some information about electrical
circuits.
For our first model, let’s look at how we can obtain the position of an object
in projectile motion from knowledge about the acceleration and velocity. You’ve
solve this problem before, but the solution required neglecting air resistance.

Example 5.1. In multivariate calculus, we encountered the differential equation


y 00 = −g. In this differential equation, the only force FT = my 00 acting on an
object in projectile motion is the force of gravity FG = −mg. Equating these
two gives us the ODE my 00 = −mg, or just y 00 = −g. If we have initial position
y(0) = y0 and initial speed y 0 (0) = v0 , then the solution is y = − 21 gt2 + v0 t + y0 .
We found that solution by integrating twice.
We don’t have to neglect air resistance anymore. We could talk about sky
diving (risky), dropping bombs (deadly), throwing math books off a roof (illegal),
putting a satellite into geosynchronous orbit (useful), or dropping a pebble from
the top of a waterfall (head to Yellowstone and try it - sounds like we need a
field trip). The next problem asks you to revisit the example above, but now
add in air resistance.
Problem 5.1 Joe hikes up to the top of Lower Falls in Yellowstone. His
hope is to gauge the height h of the waterfall. He plans to drop a pebble from
the top, and time how long it takes for the pebble to hit the ground. He’ll need
a model that predicts the height of the pebble at any time t.
For this to work, Joe has to make some assumptions. His assumptions might
be way off, but that’s how science works. We start with assumptions and then
turn those assumptions into differential equations. Here’s what Joe assumes:
• He assumes Newton’s second law of motion, namely that F = ma (the
total force is the mass times the acceleration).

• He assumes that the total force is comprised of two parts.


• The first force FG comes from a constant acceleration due to gravity. He
assumes that gravity is constant a = −g. The negative sign comes because
the acceleration causes a decrease in height.

• The second part comes from air resistance. He assumes that the faster the
pebble goes, the greater this force will be. If the pebble’s speed were to
double, then this force should double. So he assumes that the force due to
air resistance FR is proportional to the pebble’s velocity.
Let y(t) represent the height, above ground, of the pebble after t seconds. Use
Joe’s assumptions to answer the following:
CHAPTER 5. HOMOGENEOUS ODES 68

1. Rewrite Newton’s second law of motion in terms of y, y 0 , and/or y 00 .


2. What is the constant force FG due to gravity?
3. Rewrite Joe’s assumption about air resistance in terms of y, y 0 and/or y 00 .
4. The total force F is the sum of the two forces, i.e. we can write F = FG +FR .
Use this fact, together with your answers from the previous two parts, to
obtain a second order ODE. You don’t have to solve the ODE, rather you
just need to obtain it.
If you need any hints, try searching the web for “modeling motion if we assume
that air resistance is proportional to speed.”

Congrats. You’ve just set up your first second order ODE.


Let’s now look at another position/velocity/acceleration model, but this
time related to springs. We’ll start by considering the following scenario. We
attach an object with mass m to a spring. We place the spring horizontally, In the next chapter, we’ll hang the
and put the mass on a frictionless track. We let go of the object, and allow it to spring from a ceiling. In this case,
we’ll have an additional force
come to rest. We’ll use the function x(t) to keep track of the position of the Fg = −mg acting on the spring.
spring at any time t, with x = 0 corresponding to equilibrium (the mass is at
rest). Robert Hooke (1635 – 1703) developed the following law, called Hooke’s
law:

The force needed to extend (or compress) a spring a distance x is


proportional to the distance x. Note that the force acts opposite the
displacement.

Problem 5.2 Read the preceding paragraph. Then answer the following:
• Draw a picture of a horizontal track. On the left end of the track, put a
wall. Put a on object, like a square block, in the center of your track and
draw a spring that connects the wall to the block.
• Explain why mx00 (t) = −kx(t). We generally just write mx00 = −kx (the
t is assumed).

• If it takes 8 N = 8kg m/s2 to move the object whose mass is 4 kg about


.3 m, what is the spring constant k? How far would a 12 N force cause
the object to move? Does the mass of the object matter?

Hooke’s law is not a perfect model for all springs, but it does a good job for
most, provided the displacement is not too large. If the displacements are too
large, then the spring may deform, which changes the properties of the spring in
all future computations. If you take your car out onto extremely bumpy roads,
and purposefully hit some nasty bumps, you could permanently damage the
shocks. In this case, you would want to replace your springs.
Every linear spring has a spring constant k. This constant has many names,
such as the spring modulus, Young’s modulus, Young’s constant, and more. The
next problem shows you how to obtain the spring constant k.

Problem 5.3 You attach a spring to the ceiling. You attach a mass of 10
kg on the end, and the spring elongates 3 cm.
1. You now attach a mass of 20 kg. How long will the spring elongate?

2. What is the spring constant k? Give the units.


CHAPTER 5. HOMOGENEOUS ODES 69

3. We attach a different spring, and hang the same 10 kg on the end, but this
time the spring elongates 2 cm. Is the spring constant larger or smaller?
4. If a spring has really large modulus, will it be easy or hard to elongate it?

We need one more model before we start solving some ODEs. We’ll use the
exact same spring model as before. Place a horizontal spring whose modulus is
k on a frictionless track. Attach an object whose mass is m to the end of the
spring. We now place the entire mass-spring system underwater. When it was We don’t have to place the spring
exposed to air, we neglected air resistance. Now we’ll have to take resistance underwater to get the same affect.
We could use a dashpot to resist
into account. the motion. One type of dashpot
is a cylindrical tube placed around
Problem 5.4 When we have no resistance, the mass-spring system ODE is a cylindrical object, so that as the
FT = FS , or mx00 = −km. Assume that the liquid applies a resistive force that object moves, it’s sides come in
is proportional to the velocity of the object. If the object is resting, the liquid contact with the dashpot,
doesn’t apply a force. If you double the speed, then the resistive force doubles. resulting in friction that resists
motion. See Wikipedia for more
If you triple the speed, the resistive force triples. Modify the ODE mx00 = −km info.
to account for the resistive force of water.

5.2 Notation, Vocabulary, and Solutions


We can write the ODEs from the previous section as

my 00 + ky 0 = −mg, mx00 + ky = 0, and mx00 + cy 0 + ky = 0.

If we divide each ODE by m, then we can write each ODE in the general form

y 00 + p(t)y 0 + q(t)y = r(t).

This introduces our next definition.


Definition 5.2: Linear, Constant Coefficient, and Homogeneous.
• If we can write an ODE in the form y 00 + p(t)y 0 + q(t)y = r(t), then we
say the ODE is a second order linear ODE.
• The functions p(t) and q(t) we call the coefficients of the linear ODE.
• If the coefficients are constant, the we say the ODE is a constant coefficient
linear ODE.
• If the right hand side r(t) = 0, then we say the linear ODE is homogeneous.
Otherwise we say it is non homogeneous.
• We use the words nth order linear ODE to talk about any ODE that we
can write in the form y (n) + an−1 (t)y (n−1) + · · · + a1 (t)y 0 + a0 (t)y = r(t),
where y (n) is the nth derivative of y.
We just introduces a few new words, so with each problem that follows, let’s
practice using those words. The next problem has you explain why we use the
word “linear.”
Problem 5.5 Consider the second order ODE y 00 + 7y 0 + 6y = 0.
• Why is this ODE linear? Modify it so it is no longer linear, and show us
in class what would make it non linear.
• Is this ODE homogeneous? Explain.
CHAPTER 5. HOMOGENEOUS ODES 70

• Let L(y) = y 00 + 7y 0 + 6y. Show that L is a linear operator. (See the end
of chapter 3 if you need to reread the definition).
• The solutions to the ODE are the solutions to L(y) = 0. In the language of
linear operators, what do we call the set of functions y such that L(y) = 0?
It was another key word near the end of chapter 3. Please look it up. The
set of solutions y is the of L.

To solve second order linear homogeneous ODE, we’ll use the Laplace trans-
form. In the previous chapter, we showed that

L (y 0 ) = sL (y) − y(0) = sY − y(0).

We need a rule for second derivatives. Repeated application of the single


derivative rule will give you all the rules you need.

Problem 5.6 Show that under suitable conditions, we can compute the
Laplace transform of the second derivative of y by using the formula

L (y 00 ) = s2 L (y) − sy(0) − y 0 (0) = s2 Y − sy(0) − y 0 (0).

Then show that

L (y 000 ) = s3 L (y) − s2 y(0) − sy 0 (0) − y 00 (0).

Conjecture a formula for the Laplace transform of the 7th derivative of y.


[Hint: As stated in the paragraph before this problem, apply the rule L (y 0 ) =
sL (y) − y(0) multiple times.]

We are now ready to solve a second order ODE with Laplace transforms.

Problem 5.7 Consider the IVP y 00 + 3y 0 + 2y = 0, y(0) = 7, y 0 (0) = 5.

1. Is the ODE linear? Is it homogeneous? Are the coefficients constant?


2. Compute the Laplace transform of both sides and solve for L (y) = Y .
3. Use a partial fraction decomposition to show that
A B
Y = + ,
s+1 s+2
where you give the constants A and B.

4. Find the solution y to this IVP by computing the inverse Laplace transform
of Y .
5. How are solutions to s2 + 3s + 2 = 0 connected to your solution?

Problem 5.8 Consider the IVP y 00 + 7y 0 + 10y = 0, y(0) = c, y 0 (0) = d.


1. Is the ODE linear? Is it homogeneous? Are the coefficients constant?

2. Compute the Laplace transform of both sides and solve for L (y) = Y .
CHAPTER 5. HOMOGENEOUS ODES 71

3. If we use a partial fraction decomposition, we would write


A B
Y = + .
s+2 s+5
Why is the solution y(t) a linear combination of e−2t and e−5t , i.e.
y(t) = Ae−2t + Be−5t ?
4. Now actually perform the partial fraction decomposition to obtain the
constants A and B. (Since you have variables a and b in your system,
you’ll want to use Cramer’s rule).
5. How are solutions to s2 + 7s + 10 = 0 connected to your solution?

In the previous two problems, we had initial conditions. When the initial
conditions are numbers, it made the partial fraction decomposition rather simple.
When the initial conditions are variables, finding the constants in the partial
fraction decomposition was a little trickier. The next problem has you work
through a problem when we have no initial conditions.

Problem 5.9 Consider the ODE y 00 + 7y 0 + 12y = 0. We would like a general


solution (no initial conditions are given).
1. Compute the Laplace transform of both sides and solve for L (y) = Y .
You’ll have y(0) and y 0 (0) in the numerator of your solution. It would be
nice if they weren’t there.
A
2. Factor the denominator of Y , and write your solution as Y = ? + B? . This
time DO NOT solve for A and B. You don’t need to.
3. Compute the inverse Laplace transform of Y . Your answer should involve
the unknown constants A and B. You’ve found the general solution.
4. The polynomial s2 + 7s + 12 showed up in your work above. How are the
zeros of this polynomial connected to the solution?

In the three examples above, we took an ODE y 00 + ay 0 + by = 0, applied


a Laplace transform, and obtained the polynomial s2 + as + b. The zeros of
this polynomial seem to be intimately connected to the solution. Let’s give this
polynomial a name.
Definition 5.3: Characteristic Polynomial (Equation). Consider the ODE
y 00 + ay 0 + by = 0.

• The characteristic polynomial is s2 + as + b. We could alternately use


λ2 + aλ + b.
• The characteristic equation is s2 + as + b = 0. We could alternately use
λ2 + aλ + b = 0.
With this new word, we now have the correct tool to discuss solving ODEs.
We noticed a pattern in the first few problems. From that pattern, we developed
a new word. Now we can use that word to simplify your solution techniques.

Problem 5.10 Consider the ODE y 00 + 9y 0 + 20y = 0. What is the charac-


teristic equation of the ODE? Find the zeros of the characteristic polynomial,
and then state a general solution to the ODE.
CHAPTER 5. HOMOGENEOUS ODES 72

The definition of characteristic equation allows us to alternately use the


variable λ instead of s. The next problem connects what we are doing to
eigenvalues.

Problem 5.11 Consider the ODE y 00 + 9y 0 + 20y = 0 from the previous


problem. If we let y1 = y and y2 = y 0 , then we can write the ODE in the form
y20 + 9y2 + 20y1 = 0. This becomes the system of ODEs

y10 = y2
y20 = −20y1 − 9y2 .
 0  
y1 y
Write the system above in the matrix form = A 1 . Then find the
y2 y2
eigenvalues of A, and use them to obtain a solution to the ODE.

Let’s now tackle a problem where the characteristic equation does not have
real zeros.
Problem 5.12 Consider the ODE y 00 + 16y = 0.
1. Compute the Laplace transform of both sides of the ODE and solve for
L (y) = Y . You’ll have y(0) and y 0 (0) in the numerator of your solution.
2. Compute the inverse Laplace transform of Y . Your answer will involve
y(0) and y 0 (0).
3. What is the characteristic polynomial, and what are its roots?
4. If a mass of 1 kg is attached to spring with modulus 16 kg/s2 on a
frictionless track, then graph the position x(t) at any time t. [What’s the
corresponding ODE? Didn’t you already solve this ODE?]

The previous problem showed us how to tackle a problem where the roots of
the characteristic polynomial are purely imaginary. What do we do if the roots
repeat, or if they are complex of the form a ± bi? The next problem addresses
this.
Problem 5.13 Consider the ODE y 00 + 6y 0 + 9y = 0.
1. What are the zeros of the characteristic equation? From these zeros, guess
a general solution. (It’s OK if you’re wrong.)
2. Compute the Laplace transform of both sides of ODE. Then solve for Y
and show that
A(s + 3) + B A B
Y = 2
= + .
(s + 3) (s + 3) (s + 3)2

3. Compute the inverse Laplace transform of each part that you are able to
compute, and explain why we can’t perform the inverse Laplace transform
of the other parts.
4. Use a computer to complete the inverse Laplace transform, and state the
solution.
CHAPTER 5. HOMOGENEOUS ODES 73

Problem 5.14 Consider the ODE y 00 + 4y 0 + 13y = 0.


1. What are the zeros of the characteristic equation?
2. Compute the Laplace transform of both sides of ODE. Then solve for Y
and complete the square to show that

A(s + 2) + B A(s + 2) B
Y = 2 2
= 2 2
+ .
(s + 2) + 3 (s + 2) + 3 (s + 2)2 + 32

s−a
3. Use the fact that L {eat cos(bt)} = and that L {eat sin(bt)} =
(s − a)2 + b2
b
to finish solving. [The next problem will show you where
(s − a)2 + b2
these came from.]

In both of the preceding problems, we encountered expressions that we


1
could not inverse transform. The first was , and the last two were
(s + 3)2
(s + 2) 1
2 2
and . In all cases, these look like shifted versions
(s + 2) + 3 (s + 2)2 + 32
of functions for which we know the inverse Laplace transform. For example,
s (s + 2)
we know L {cos 3t} = 2 . The expression resembles the
s + 39 (s + 2)2 + 32
(s)
expression , rather we just replaced s with s + 2, which is the same as
(s)2 + 32  
s−a
shifting s left 2. We were told that L −1
= eat cos(bt). What
(s − a)2 + b2
we need is a Laplace transform rule that would allow us deal with s shifting. If
we know how to invert Y (s), how do we invert Y (s − a)?

Problem 5.15: The s-shifting Theorem In this problem you’ll develop


a rule for the inverse transform of Y (s − a).
R∞
1. We know that Y (s) = L {y(t)} = 0 e−st [f (t)]dt. Replace s with s − a
and obtain a formula
Z ∞
Y (s − a) = e−st [?]dt.
0

This gives you a formula L {?} = Y (s − a).


2. What is the inverse Laplace transform of 1/s2 ? What is the inverse
Laplace transform of 1/(s − 4)2 ? What is the inverse Laplace transform
of 1/(s + 5)2 ?

3. What is the forward Laplace transform of cos(bt)? What is the forward


Laplace transform of eat cos(bt)? What is the forward Laplace transform
of e7t t3 and e−7t t3 ?
[Hint: The s-shifting theorem is now in Table 5.1. Try to tackle this problem
without referring to the table.]

To apply the s-shifting theorem, we’ll need to become good at completing


2
the square. If we know the transform is 2 , then the inverse transform is
s +4
CHAPTER 5. HOMOGENEOUS ODES 74

y(t) Y (s) provided y(t) Y (s) provided


1 s
1 s>0 cos(ωt) s>0
s s2 + ω 2
1 ω
t s>0 sin(ωt) s>0
s2 s2 + ω 2
s
n! cosh(ωt) s > |ω|
tn s>0 s2 − ω 2
sn+1
ω
1 sinh(ωt) s > |ω|
eat s>a s − ω2
2
s−a
y(t) Y (s)
y0 sY − y(0)
at
e y(t) Y (s − a)
y 00 s2 Y − sy(0) − y 0 (0)

Table 5.1: Table of Laplace Transforms

2
sin(2t). If we know the transform is , then the inverse transform is
(s + 3)2 + 4
e−3t sin(2t). However, we would normally have a characteristic polynomial in
the form s2 + 6s + 13, rather than the form (s + 3)2 + 4. Once we complete the
square, we can apply the s-shifting theorem.

Problem 5.16 Complete each of the following:


1. Consider the ODE y 00 + 2y 0 + 5y = 0. Find the characteristic polynomial,
complete the square, and state a general solution.
2. Consider the ODE y 00 + 6y 0 + 9y = 0. Find the characteristic polynomial,
complete the square, and state a general solution.
3. Consider the ODE y 00 + 4y 0 + 3y = 0. Find the characteristic polynomial,
complete the square, and state a general solution.

Before we get to far, let’s practice the s shifting theorem for Laplace trans-
forms.
Problem: 5.16 and 1/2 Complete the following:

1. Find the Laplace transform of the following:


(a) t3 and t3 e4t
(b) cos(2t) and e−3t cos(2t)
(c) 3 sin(7t) and 3e−5t sin(7t)
2. Find the inverse Laplace transform of the following:
3 3
(a) 4
and
s (s − 5)4
s+3 1
(b) 2
and
(s + 3) + 4 (s + 3)2 + 4
s
(c) .
(s + 3)2 + 4
CHAPTER 5. HOMOGENEOUS ODES 75

Problem 5.17 Consider the ODE y 00 + 6y 0 + 11y = 0.


1. Find the characteristic polynomial, complete the square, and then state a
general solution.
2. Find the characteristic equation, use the quadratic formula to solve the
characteristic equation, and then state a general solution.
3. Solve the ODE y 00 + 5y 0 + 12y = 0. Would you rather complete the square,
or use the quadratic formula?

Problem 5.18 Consider the ODE ay 00 + by 0 + cy = 0.


1. Obtain the characteristic equation. Complete the square. State the zeros
of the characteristic equation. [When you finish this problem, you will
have proved the quadratic formula.]
2. If we let y1 = y and y2 = y 0 , we obtain the system of ODE y10 = y2 and
 0  
y y
ay20 +by2 +cy1 = 0. Write this system in the matrix form 1 = A 1 ,
y2 y2
and obtain the eigenvalues of A.

We can now solve EVERY second order homogeneous constant coefficient


ODE. All we have to do is find the characteristic equation. The zeros unlock a
general solution of the ODE.
Problem 5.19 Consider the second order homogeneous constant coefficient
ODE y 00 + ay 0 + by = 0. Let λ1 and λ2 be the roots of the characteristic
polynomial s2 + as + b.
1. If the roots are real and λ1 6= λ2 , then y(t) = .
2. If the roots are real and λ1 = λ2 , then y(t) = .
3. If the roots are complex where λ = c ± di, then y(t) = .
If c = 0, then the solution is simply y(t) = .

Problem: 5.19 Improved Suppose that we have a second order ODE, and
we have already computed the roots of the characteristic polynomial to be λ1
and λ2 .
1. If λ1 = −3 and λ2 = −5, then y(t) = .
If the roots are real and λ1 6= λ2 , then y(t) = .
2. If λ1 = −3 and λ2 = −3, then y(t) =
If the roots are real and λ1 = λ2 , then y(t) = .
3. If λ1 = −2 + 3i and λ2 = −2 − 3i, then y(t) = .
If the roots are complex where λ = a ± bi, then y(t) = .
4. If λ1 = 5i and λ2 = −5i, then y(t) = .
If the roots are purely imaginary so that λ = bi, then y(t) = .

Have you noticed that every general solution above is a linear combination of
two independent solutions? Recall that we say a differential operator is linear if
L(y1 + y2 ) = L(y1 ) + L(y2 ) and L(cy1 ) = cL(y1 ) for functions y1 and coefficients
c.
CHAPTER 5. HOMOGENEOUS ODES 76

Problem 5.20: Superposition Principle Suppose that y1 and y2 are both


solutions to a linear differential equation ay 00 + by 0 + cy = 0. Consider the linear
operator L(y) = ay 00 + by 0 + cy. Prove that any linear combination of y1 and y2
is also a solution to the ODE L(y) = 0. (Hint: Look at the last few problems in
chapter 3, or just prove this directly.)
Many people refer to this fact as the superposition principle. To get a
solution to a second order homogeneous ODE, all you need is two independent
solutions. The general solution is any linear combination of them.

Now that we have a general solution, let’s show how to quickly obtain the
solution to an IVP. The key principle, is to first obtain a general solution.
Differentiate your general solution, and then use your initial conditions to find
the unknown constants.

Problem 5.21 Consider the IVP y 00 + 6y 0 + 5y = 0, with y(0) = 4 and


y 0 (0) = 5. Obtain a general solution. Then compute y 0 (t). Plug the initial
conditions into both y and y 0 to solve for the unknown constants in your general
solution.

Problem 5.22 Consider the IVP y 00 + 6y 0 + 9y = 0, with y(0) = 4 and


y 0 (0) = 5. Obtain a general solution. Then compute y 0 (t). Use the initial
conditions to solve for the unknown constants in your general solution.

Problem 5.23 Consider the IVP y 00 + 2y 0 + 5y = 0, with y(0) = 4 and


y 0 (0) = 5. Obtain a general solution. Then compute y 0 (t). Use the initial
conditions to solve for the unknown constants in your general solution.

5.3 Mass-Spring Systems


Recall from the introductory examples that we can model the position of a
spring using the ODE
mx00 + cx0 + kx = 0
The constants m, c, and k are physical constants related to the mass-spring
system.
• The mass of the object attached to the spring is m.

• The spring constant, or modulus, is k.


• The coefficient of friction of any attached dashpot is c. If no dashpot is
attached, then we just let c = 0.

Problem 5.24 Suppose we attach a mass of 4 kg to a spring with modulus


12 kg/s2 . We displace the object 1 cm from the equilibrium position of the
spring, and then hit the mass with a hammer. The impact causes the spring’s
initial velocity to be 3 cm/s back towards equilibrium. Use this information to
determine the position of the spring at any time t. Construct a graph of the
position. From your graph, show how you can the initial position and initial
velocity.
CHAPTER 5. HOMOGENEOUS ODES 77

Make sure you ask me in class to show you how the solution above graphically
changes, if we alter the initial position and initial velocity.

Problem 5.25 Suppose we attach a mass of m kg to a spring with modulus


k kg/s2 . We displace the object y0 cm from the equilibrium position of the
spring, and give the object an initial velocity of v0 cm/s away from equilibrium.
In the absence of friction, the mass-spring system will oscillate in a regular
pattern. Determine the position of the spring at any time t. What is the period
of oscillation? If you doubled the spring constant k, how would it affect the
period?

Problem 5.26 Suppose we attach a mass of m kg to a spring with modulus


k kg/s2 . We displace the object y0 cm from the equilibrium position of the
spring, and give the object an initial velocity of v0 cm/s away from equilibrium.
In the absence of friction, the mass-spring system will oscillate in a regular
pattern. Give a formula for the amplitude of the oscillation. [Hint: If you
write your solution in the form y(t) = C sin(ωt + φ), then you can quickly read
off the amplitude. How do you write y(t) = A cos(bt) + B sin(bt) in the form
C sin(ωt + φ)?]

Each of the problems above dealt with undamped motion, there was no
friction to slow down the motion. The remaining problems include a dashpot,
something placed around the mass-spring system that adds friction to the system.
Wikipedia has some excellent pictures of what a dashpot could look like. I like
to think of an old screen door, and the cylindrical tube at the bottom of the
door that helps close the door and prevent it from smashing closed on little
fingers. Ask me in class to show you a dashpot on our classroom door.

Problem 5.27 Recall from the introductory examples that we can model
the position of a spring using the ODE mx00 + cx0 + kx = 0. We now attach a
mass of 1 kg to a spring. The spring is placed inside a dashpot, to add friction
to the system, and the dashpot has a coefficient of friction equal to c = 8 kg/s.
The spring is rather large, so we extend it 1 m and then release it with no initial
velocity.
1. If the spring modulus is k = 15 kg/s2 , find the position x(t) of the spring,
and construct a rough sketch of x versus t.

2. If the spring modulus is k = 16 kg/s2 , find the position x(t) of the spring,
and construct a rough sketch of x versus t.
3. If the spring modulus is k = 17 kg/s2 , find the position x(t) of the spring,
and construct a rough sketch of x versus t.

4. What connection is there between c and k? If you had to describe what


you saw in the examples above to someone not in this class, what would
you say? You’ll probably have to explain this phenomenon to a boss
someday.
CHAPTER 5. HOMOGENEOUS ODES 78

5.4 Higher Order ODEs


In the previous sections, we focused mainly on second order ODEs. We started by
using Laplace transforms to find the exact solutions. The accompanying partial
fraction decomposition was sometimes rather ugly, so we opted for guessing the
form of the solution, and then taking derivatives to determine the unknown
constants.
Problem 5.28 Consider the ODE y 000 + 3y 00 + 3y 0 + y = 0. Compute the
Laplace transform of both sides. The characteristic equation is (s + 1)3 = 0.
Explain why the solution is y = c1 e−x + c2 xe−x + c3 x2 e−x .
For the ODE y 0000 + 4y 000 + 6y 00 + 4y 0 + y = 0, whose characteristic equation is
(s + 1)4 = 0, make a guess as to the solution. Then use a computer and dsolve
to check that your answer is correct. (Wolfram Alpha can solve this.)
If you encounter a repeated root, what does that contribute to the solution?
Explain this in a way that you and other can remember it.

Problem 5.29 You have a 6th order homogeneous ODE, and the charac-
teristic equation factors as (s2 + 4)(s2 + 9)2 = 0. What is the original ODE
(expand the polynomial)? The roots are ±2i, ±3i, ±3i (so ±3i are repeated
roots). Guess the general solution. Then use a computer to check if your guess
was correct.

Problem 5.30 In each problem below, you’ll be given the characteristic


equation of an ODE. State the general solution of the ODE.
1. (s + 3)(s + 2)(s + 1) = 0
2. (s + 3)(s + 3)(s + 1) = 0
3. (s + 3)3 (s2 + 9) = 0
4. (s + 3)2 (s2 + 9)2 = 0
5. (s + 3)2 (s2 − 9)2 = 0 (Note the sign change)

5.5 Existence and Uniqueness


One of the key theorems pertaining to ODEs is that under sufficient conditions
(see Wikipedia) an ODE must have a solution, and that solution must be unique.
This means that if two people come up with a solution in different ways, then
those solutions must agree. Let’s use this to build some connections between
trigonometry and complex exponentials.
Problem 5.31 Consider the ODE y 00 + 9y = 0. This models the undamped
motion of a spring where m = 1 and k = 9.
1. Show that yr (t) = c1 cos 3t + c2 sin 3t and yc (t) = c3 e3it + c4 e−3it are both
general solutions of this ODE.
2. If y(0) = 1 and y 0 (0) = 0, then find c1 , c2 , c3 , c4 .
3. If y(0) = 0 and y 0 (0) = 3, then find c1 , c2 , c3 , c4 .
4. Show that cos 3t + i sin 3t = e3it .
CHAPTER 5. HOMOGENEOUS ODES 79

5.6 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 6

Non Homogeneous ODEs

This chapter covers the following ideas.

1. Explain Hooke’s Law in regards to mass-spring systems, where there is an


external force. Construct and solve differential equations which represent
this physical model, with or without the presence of a damper and be able
to interpret how solutions change based on changes in the model.
2. Understand the theory which relates solutions of homogeneous linear
ODE’s to non homogeneous ODEs.
3. Use the method of undetermined coefficients to solve non homogeneous
linear ODEs.
4. Explain Kirchhoff’s voltage law, Ohm’s law, and how to model electrical
circuits using 2nd order non homogeneous linear ODEs. Illustrate how
results about circuits can be translated into results about mass-spring
systems.

The problems below come from Schaum’s Outlines Differential Equations


by Richard Bronson. If you are struggling with a topic from the preparation
problem set, please use this list as a guideline to find related practice problems.

Concept Sec Suggestions Relevant Problems


Theory 8 21,65 21-23,65-67
Undetermined Coef 11 1,2,3,8,10,24,26,34,36,41,46,47,48 All
IVP 13 1,7,14 1,3,7,8,10,11,14
Applications 7 19,76 19-22,71-81
Applications 14 10,11,13,14,17,46,50,51,52,54,57 9-18,44-65

6.1 Non Homogeneous Linear Systems


In the previous chapter, we focused on solving homogeneous ODEs of the form
L(y) = 0. We need to learn how to solve ODEs if the right hand side is not zero,
namely L(y) = r(t). Before solving these kinds of ODEs, let’s revisit solving
matrix equations of the form A~x = ~0 and A~x = ~b. As we compare the solutions
to these matrix equations (where solving is much easier), we just might glean
some patterns that help us with solving non homogeneous ODEs.

80
CHAPTER 6. NON HOMOGENEOUS ODES 81

I highly suggest you complete this review problem, and check your answer,
to make sure you are comfortable with how to express infinitely many solutions
in vector form.
Review You want to solve the system A~x = ~b. You row reduced the
augmented matrix and obtain
 
1 0 −3 4 0 5
0 1 2 1 0 −2
h i rref 
A ~b −−−→ 0
.
0 0 0 1 3
0 0 0 0 0 0
1
What is the solution ~x? See for an answer.

If the vector ~b above had been ~b = 0, what would the right most column have
been after row reduction? If you said, “A column of all zeros,” then congrats.
In this case, how would it have affected the solution? If you want a confirmation
that your answer is correct, ask me in class.

x + 2y − 3z = 0

Problem 6.1 Consider the homogeneous linear system 2x + 4y − 6z = 0 .

−x − 2y + 3z = 0

1. Solve this homogeneous system. Show us your rref, and then your solution
(in vector form). For matrix reduction problem, show the rref.

x + 2y − 3z = 4

2. Solve the non homogeneous system 2x + 4y − 6z = 8 .

−x − 2y + 3z = −4

3. Compare and contrast the two solutions.

 
 x
−2  1 
  
1 0 1 0
x2   
Problem 6.2 Consider the matrix equation −1 3 5 5 
x3  = 0 .
2 1 4 −3 0
x4
1. Solve this homogeneous matrix equation. Your answer will involve free
variables.
 
 x
1 0 1 −2  1 
  
−1
x2   
2. Now solve −1 3 5 5   x3  = 10 .
2 1 4 −3 1
x4
3. Compare and contrast the two solutions.

1 The free variables are x and x (as these columns don’t have a pivot). The three nonzero
3 4
rows of our matrix are the equations x1 − 3x3 + 4x4 = 5, x2 + 2x3 + x4 = −2, and x5 = 3.
We solve for each variable in terms of the free variable to obtain
x1 = 3x3 − 4x4 + 5 x1 3 −4 5
       
x2 = −2x3 − 4x4 − 2 x
 2 −2
  −1 −2
x3 = x3 or in vector form x3  = x3  1  + x4  0  +  0 .
       
x4 = x4 x 
4
 0   1   0 
x5 = x3 x5 0 0 3
CHAPTER 6. NON HOMOGENEOUS ODES 82
 
1 0 1
Problem 6.3 Let A = −1 3 5. Consider the linear function defined by
2 1 4
L(~x) = A~x. Let ~b = (−1, 10, 1). We wish to solve the linear equation L(~x) = ~b.
1. Find the kernel (L(~x) = 0) of this linear function. Your answer should
involve a free variable.
2. One solution to L(~x) = ~b is ~x1 = (−1, 3, 0). Give another solution, which
we’ll call ~x2 .
3. One solution to L(~x) = ~b is ~x1 = (−1, 3, 0). Give all solutions. How does
part 1 help?

Problem 6.4 Consider the matrix equation A~x = ~b. Suppose that ~x1 and
~x2 are both solutions to this non homogeneous equation.
1. Why is ~x1 − ~x2 a solution to the homogeneous equation A~x = 0?

2. If ~xp is a single particular solution to A~x = ~b, and we know that all
solutions to A~x = ~0 are given by ~xh , then give all solutions to A~x = b.
3. If we replace A~x with any linear function L(y), does this result still hold?

Look back at the last 4 problems. Do you notice how we solve a few problems
using matrices and noticed a pattern, namely that the solution to A~x = ~b is
simply ~xh + ~xp , where ~xh is the general solution to the homogeneous equation
A~x = ~0, and ~xp is a single solution to the original equation. The last problem
showed that this pattern continued for ANY linear function. So if we can show
something is linear, then the solution follows the same technique.
The next few problems have you practice finding the kernel of a linear
function, by asking you to find eigenvectors. You’ll also see how to use the
eigenvalues and eigenvectors of a matrix to get a solution to a homogeneous
ODE.
Problem 6.5 Consider the ODE L(y) = y 00 + 5y 0 + 6y = 0.
1. Find a general solution yh to the ODE. Is yp = 0 a solution to L(y) = 0?

2. If we let y1 = y and y2 = y 0 , explain why we can write this ODE in the


matrix form  0   
y1 0 1 y1
= .
y20 −6 −5 y2
 
0 1
3. Find the eigenvalues and eigenvectors of the coefficient matrix . Check your answer with this link
−6 −5 to Sage. You can use this link to
check your answers for ANY
4. A solution is matrix.

y = c1 eλ1 t + c1 eλ2 t , which means


y 0 = c1 λ1 eλ1 t + c2 λ2 eλ2 t
   
y ? λ1 t
Write this as a vector equation 0 = c1 e +· · · . Make a conjecture
y ?
about how to use the eigenvalues and eigenvectors to obtain a solution.
CHAPTER 6. NON HOMOGENEOUS ODES 83

Problem 6.6 This problem requires you have completed the previous. Con-
sider a horizontal mass-spring system with m = 2, c = 12, and k = 10 (the units
agree). Suppose the spring has been extended 4 units and released from rest.
1. State the IVP that corresponds to this system.
2. Write the second order ODE as a system of first order ODEs (let y1 = y
and y2 = y 0 ). Write the system in the matrix form
 0     
y1 ? ? y1 y1
= = A .
y20 ? ? y2 y2

3. Find the eigenvalues and eigenvectors of A, and use them to state a general
solution for y and y 0 . Check your answer with this link
to Sage. You can use this link to
4. Use the initial conditions to find c1 and c2 . check your answers for ANY
matrix.

Problem 6.7 Consider the third order ODE y 000 + 7y 00 + 14y 0 + 8y = 0. The
characteristic polynomial factors as (λ + 1)(λ + 2)(λ + 4).
1. If we let y1 = y, y2 = y 0 , and y3 = y 00 , then show how to rewrite this third
order ODE as the linear system
 0     
y1 0 1 0 y1 y1
y20  =  0 0 1  y2  = A y2  .
y30 −8 −14 −7 y3 y3

2. Compute the eigenvalues (how does the polynomial factor ... look above).
3. For each eigenvalue, give all the eigenvectors (what matrix did you rref,
what is the rref, and how did you obtain the solution). As there are
infinitely many eigenvectors, you’ll probably find the vectors are easiest to
work with if you scale them to get rid of all fractions. Check your answer with this link
to Sage. You can use this link to
4. Use the eigenvalues and eigenvectors to state a general solution for y, y 0 , check your answers for ANY
and y 00 . matrix.

6.2 Solving Non Homogeneous ODEs


From the last section, we now know that the solutions to a non homogeneous
ODE L(y) = r(t) must look like y = yh + yp where yh is the general solution to
the homogeneous ODE, and yp is a single particular solution. We’ve already seen
a couple of ODEs that are non homogeneous in the previous section. We have
the tools to solve them with Laplace transforms. Let’s look at a few examples,
discover some patterns, and then speed things up.
Review We’ll occasionally need to solve inverse transforms with rather
ugly coefficients. Let’s review this. Find the inverse Laplace transform of
f s2 + gs + h
. See 2 for an answer.
s2 (s + 3)
2 We use a partial fraction decomposition to write
f s2 + gs + h As + B C A B C
= + = + 2 + .
s2 (s + 3) s2 s+3 s s s+3
The inverse transform is A + Bt + Ce−3t . We can obtain A, B, and C in terms of f , g,
and h. Since f s2 + gs + h = (As + B)(s + 3) + Cs2 , we would solve the system f = A + C,
g = 3A + B, h = 3B, which gives B = h/3, A = g/3 − h/9, and C = h/9 − g/3.
CHAPTER 6. NON HOMOGENEOUS ODES 84

Problem 6.8 Consider the ODE my 00 = −ky 0 − mg from Problem 5.1. This Please use dsolve with
ODE models the position of a pebble (or any other object) as it falls through WolframAlpha to check EVERY
problem you do in this chapter.
the air. With this problem, we assumed that gravity pulls the object down (the Class will go much better if you
−mg term), and that air resistance is proportional to velocity (the −ky 0 terms). do.
1. For the homogeneous ODE my 00 + ky 0 = 0, what are the zeros of the
characteristic polynomial. Give a general solution yh to this homogeneous
ODE.
2. For simplicity, let’s have m = 1, k = 5, and g = −32. Use Laplace See WolframAlpha
transforms to solve the ODE y 00 + 5y 0 = −32 if y(0) = 0 and y 0 (0) = 0.
What part of your solution is not a term in yh ?
3. Now use Laplace transforms to solve the ODE y 00 + 5y 0 = −32 if y(0) = h See WolframAlpha
and y 0 (0) = v. Again what part of your solution is not a term in yh ?

For our mass spring systems in the last chapter, we assumed they were placed
the system horizontally so that we could ignore the force due to gravity. Let’s
now hang the mass-spring system vertically.
Problem 6.9 Consider a vertical mass-spring system inside a dashpot. The
object’s mass is m kg. The dashpot applied a frictional force proportional to
the velocity and has a coefficient of friction equal to c kg/s. The spring constant
is k kg/s2 .
1. Use Newton’s second law of motion to explain why my 00 = −cy 0 − ky − mg,
or my 00 + cy 0 + ky = −mg.
2. For simplicity, suppose m = 1 kg, c = 5 kg/s, and k = 4 kg/s2 . Give the
solution yh to the homogeneous ODE y 00 + 5y 0 + 4y = 0.
3. Using the same conditions, use Laplace transforms to solve the non homo- See WolframAlpha
geneous ODE y 00 + 5y 0 + 4y = −32. [You might want to use y(0) = h and
y 0 (0) = v, but remember they are arbitrary.]
4. As t → ∞, what happens to y(t)?

1
Review Find the inverse Laplace transform of . See 3 for an answer.
s(s2 + 9)

Problem 6.10 Consider a vertical mass-spring system without friction, so


the corresponding ODE is my 00 = −0y 0 −ky −mg, or my 00 +ky = −mg. Suppose
m = 1 kg and k = 16 kg/s2 .
1. Suppose m = 1 kg and k = 4 kg/s2 . Solve the homogeneous ODE
y 00 + 4y = 0.
2. Using the same conditions, use Laplace transforms to solve the non ho- See WolframAlpha
mogeneous ODE y 00 + 4y = −32. [You might want to use y(0) = h and
y 0 (0) = v, but remember they are arbitrary.]
3 The quadratic s2 + 9 does not factor over the reals, so we write
1 A Bs + C
= + 2 ,
s(s2 + 9) s s +9
whose inverse transform is A + B cos(3t) + C3
sin(3t). Multiplying both sides by s(s2 + 9)
gives 1 = A(s2 + 9) + (Bs + C)(s). Equating coefficients gives the system 0 = A + B, 0 = C,
1 = 9A. Solving this system yields A = 1/9, B = −1/9, and C = 0.
CHAPTER 6. NON HOMOGENEOUS ODES 85

3. Compare your solutions to the homogeneous and non homogeneous ODEs.

In all three problems above, we applied an external force to the physical


system. This constant force −mg showed up on the right had side of the ODE.
Whenever we apply an external force to a problem, it shows up on the right hand
side of an ODE. If all the forces are internal, then we are solving a homogeneous
ODE. Any external forces change it to a non homogeneous ODE.
The forces above are all constant. What do we do with a non constant force?
The same thing! It just might get messier. Because we know how to compute
Laplace transforms of polynomials, exponentials, cosines and sines, and products
of these, we’ll focus our attention on external forces that involve these kinds of
functions. In a future chapter, we’ll explore how to solve problems involving
arbitrary external forces.

6.2.1 Learning to Guess Appropriately


In the last chapter, we discovered that we can solve homogeneous ODEs by
simply finding the zeros of a polynomial. We gleaned all this information by
studying Laplace transforms. In this section, let’s tackle a few problems and look
for patterns that should greatly simply our ability to solve non homogeneous
ODEs.
In all these problems, we’ll be solving second order ODEs of the form
L(y) = r(t).

Problem 6.11 Consider the ODE y 00 + 5y 0 + 4y = r(t), which we could write


as L(y) = r(t), where L(y) is a linear operator.
1. Find yh , a general solution to the homogeneous ODE y 00 + 5y 0 + 4y = 0.
2. Let r(t) = 3t. Laplace transform both sides, and show that

sy(0) + y 0 (0) + 5y(0) 3


Y = 2
+ 2 2 .
s + 5s + 4 s (s + 5s + 4)

Explain why a solution to y 00 + 5y 0 + 4y = 3t must be

y = c1 e−4t + c2 e−t + At + B,

where c1 and c2 are arbitrary (depending on the initial conditions), but


A and B could be determined by doing a partial fraction decomposition
(just set the decompositions up, don’t spend time finding the constants).

3. Since c1 and c2 are arbitrary constants, let them be zero. This means
a particular solution to our ODE is yp = At + B. Substitute yp =
At + B, yp0 = A and yp00 = 0 into the ODE y 00 + 5y 0 + 4y = 3t to get
0 + 5(A) + 4(At + B) = 3t + 0. Use this to find A and B.
4. We now have yh and yp . State a general solution to the ODE. See WolframAlpha

5. If r(t) = 7t3 − 4t, make a guess as to what form yp would take. Use dsolve See WolframAlpha
to check if you are correct.
Did you notice that if the external force is a polynomial, then a particular
solution yp is a polynomial of the same degree?
CHAPTER 6. NON HOMOGENEOUS ODES 86

Problem 6.12 Again consider the ODE y 00 + 5y 0 + 4y = r(t), or L(y) = r(t).


We know the solution to L(y) = 0 (the kernel of L) is yh = c1 e−4t + c2 e−t .
1. Let r(t) = 2 cos 3t. Laplace transform both sides, and show that
sy(0) + y 0 (0) + 5y(0) s
Y = 2
+ 2 2
.
s + 5s + 4 (s + 9)(s + 5s + 4)
Explain why a solution to y 00 + 5y 0 + 4y = 2 cos 3t must be
y = c1 e−4t + c2 e−t + A cos(3t) + B sin(3t),
where c1 and c2 are arbitrary (depending on initial conditions), but A and
B could be determined by doing a partial fraction decomposition (just set
the decompositions up, don’t spend time finding the constants).
2. Since c1 and c2 are arbitrary constants, let them be zero. This means a
particular solution to our ODE is yp = A cos 3t + B sin 3t. Substitute yp ,
yp0 and yp00 into the ODE to get
(A cos 3t+B sin 3t)00 +5(A cos 3t+B sin 3t)0 +4(A cos 3t+B sin 3t) = 2 cos 3t.
1 3
Use this equation to show A = − 25 and B = 25 . [Hint: The right hand
side is 2 cos 3t + 0 sin 3t.]
3. We now have yh and yp . State a general solution to the ODE. See WolframAlpha

4. If r(t) = sin(7t), make a guess as to what form yp would take. Use dsolve
to check if you are correct.

Did you notice that if the external force is a trig function, then a particular
solution will be a linear combination of trig functions?
Let’s look at one more, but this time let’s have r(t) involve exponentials.
Something different happens when r(t) is actually part of the kernel of L.

Problem 6.13 Again consider the ODE y 00 + 5y 0 + 4y = r(t), or L(y) = r(t).


We know the kernel of L is yh = c1 e−4t + c2 e−t .
1. Let r(t) = 7e−3t . Compute the Laplace transform of both sides, and
solve for Y . Explain why a solution to y 00 + 5y 0 + 4y = 7e−3t must be
y = c1 e−4t + c2 e−t + Ae−3t , where c1 and c2 are arbitrary, but A could
be determined by doing a partial fraction decomposition (just set the
decompositions up, don’t spend time finding the constants).
2. Since c1 and c2 are arbitrary constants, let them be zero. This means a
particular solution to our ODE is yp = Ae−3t . Substitute yp , yp0 and yp00
into the ODE to get
(Ae−3t )00 + 5(Ae−3t )0 + 4(Ae−3t ) = 7e−3t .
Use this equation to find A.
3. We now have yh and yp . State a general solution to the ODE. See WolframAlpha

4. If r(t) = e−2t , make a guess as to what form yp would take. Use dsolve to
check if you are correct.
5. If r(t) = e−4t , make a guess as to what form yp would take. Use dsolve to
check if you are correct. You should notice that this answer is different
than the others. What makes it different? Why do you think this difference
occurred?
CHAPTER 6. NON HOMOGENEOUS ODES 87

Did you notice that when the external force is an exponential, then a
particular solution is an exponential. Also, did you notice that if the external
force matched the solutions to the homogeneous solution, then our particular
solution was multiplied by t?
The previous three problems developed some key ideas we need to expand.
Whenever we need to solve an ODE of the form L(y) = r(t), we have a few
things to consider.
• First, we need to get the solution yh to the homogeneous ODE L(y) = 0.
This is just the kernel of the linear function L.
• Then we need to find a particular solution yp to L(y) = r(t). The previous
3 problems suggested that we can guess a form for yp (based off r), and
then use our guess to determine the value of any coefficients.
• The last problem suggested that if r(t) is actually part of the homogeneous
solution, then we have to modify our guess slightly (multiply by t) to get
yp .
We need to make sure this pattern works on more problems. Here’s where
software comes in handy. We can use dsolve with WolframAlpha to kick out
solutions to ODEs really fast. What we need is to practice guessing a particular
solution with lots of ODEs, and make sure we build up the right patterns. Then,
we can start tackling every non homogeneous ODE in a consistent, fast, clean,
way. The next problem asks you to do this. Here’s a pattern of what I expect.
• For the ODE y 00 + 5y 0 + 6y = t + e−7t , the characteristic equation is
λ2 + 5y + 6 = (λ + 2)(λ + 3) = 0. This gives yh = c1 e−2t + c2 e−3t . Since
r(t) = t + e−7t , I’m going to guess yp = (At + B) + (Ce−7t ). I’m guessing
this because the Laplace transforms of t and e−7t would put s12 and s+7 1

in the problem. When setting up the partial fraction decomposition, we’d


have something like
c1 c2 A B C
Y = + + 2+ + .
s+2 s+3 s s s+7
Checking my guess with WolframAlpha shows I’m correct, where A = 1/6,
B = −5/36 and C = 1/20. See WolframAlpha

Problem 6.14 Consider the ODE y 00 + 6y 0 + 9y = sin(4t) + e−t .


1. Find the kernel of L(y) = y 00 + 6y 0 + 9y (i.e. state yh ).
2. Make a guess for yp (with undetermined coefficients), and explain why
you made this guess based on what the Laplace transform would yield.
3. Use software to find yp , and update your guess above (with any reasons
for the changes needed). Then state a general solution. See WolframAlpha

4. Repeat parts 2 and 3 if instead you needed to solve y 00 + 6y 0 + 9y = e−3t .


What makes this different?

Problem 6.15 For each problem below, (1) state yh , (2) make a guess for
yp (your guess will involve undetermined coefficients), and then (3) check your
answer using software (giving the value of any coefficients in your guess). If
your guess was wrong, please tell us your original guess, and why it was wrong.
CHAPTER 6. NON HOMOGENEOUS ODES 88

1. y 00 + 3y 0 + 2y = t + e−2t + e−5t See WolframAlpha

2. y 00 + 4y = 4t2 − 3 cos(3t) + 5 sin(2t) (Some constants could be zero.) See WolframAlpha

3. y 00 + 7y 0 + 10y = 5e−2t cos(3t) − 6e−5t See WolframAlpha

4. y 00 + 6y 0 + 25y = 7e−3t − 2 cos(4t) + 6e−3t cos(4t) (Wolfram’s solution is


factored. Expand it.) See WolframAlpha

Let’s try to summarize the patterns we’ve seen.

Problem 6.16 Suppose that L(y) = r(t) is a 2nd order constant coefficient
ODE.
1. If r(t) is in the table below, what would you guess for yp ?

Form of r(t) Guess for yp

keat
ktn
k cos(ωt)
k sin(ωt)
keat cos(ωt)
keat sin(ωt)

2. If r(t) involves a sum of terms in the table above, what do you guess for
yp ? (So if r(t) = 7 cos(2t) − 3 sin(2t) + 8e3t cos(2t), then yp =?)

3. If part of your guess is in the kernel of L, how should you modify your
guess? (So if yh involves c1 e−3t , and r(t) = 7e−3t + t3 , then yp =?)

The ideas above work with higher order ODEs as well. Let’s try this on a
5th order ODE.
Problem 6.17 Suppose we have a constant coefficient linear differential
equation of the form L(y) = r(t). It’s a 5th order ODE, and the characteristic
equation has zeros 2, −3, −3, −4 + 5i, −4 − 5i.
1. What do you guess for yp if r(t) = 3e−2t − 7e2t + 5e−3t + cos(5t) −
12e−4t sin(5t).
2. Use software to expand (λ − 2)(λ + 3)2 (λ − (−4 + 5i))(λ − (−4 − 5i)), and
then state a 5th order ODE that would have this characteristic polynomial.
3. Use software to check if your guess is correct. WolframAlpha won’t solve
this one, so please use Mathematica or Maple to solve it, and check if your
guess is correct. We’ll open up Mathematica in class and solve this.

At this point, we’ve got the basic idea to solve L(y) = r(t), provided L is
a constant coefficient linear operator. We find yh , and then guess a particular
solution yp , with undetermined coefficients. We then take a couple derivatives to
figure out the unknown constants. This is called “The Method of Undetermined
Coefficients.” Here’s a few observations:
CHAPTER 6. NON HOMOGENEOUS ODES 89

• We could just solve all the ODEs using Laplace transforms. The problem
is that if we need a general solution, the solution might get ugly really
fast. Laplace transforms work best when we have initial conditions.
• If we have initial conditions, maybe we should just do a Laplace transform
flat out. No guessing is needed. We’ll have to decide which is faster.
• These ideas work on higher order ODEs, in the exact same way they work
on second order ODEs.

6.3 Applications
At this point, we need to practice the method of undetermined coefficients.
Rather than just solve a bunch of ODEs with no application, let’s connect each
one to a physical problem.
Problem 6.18 Consider a vertical mass spring system with m = 1 kg, c = 5
kg/s, and k = 6 kg/s2 . Let’s assume g = −10 m/s2 (it makes the arithmetic
simpler). The 1 kg object is a magnetic brick. We turn on an electromagnet
underneath the brick, and then slowly ramp up the force of the magnet be 2t N.
When the magnet was turned on, the brick was motionless. How far has the
bricked dropped after t seconds.
1. Solve the ODE y 00 + 5y 0 + 6y = −10. Use this to state how much the brick
gets elongated by the magnet. See WolframAlpha

2. Solve the IVP y 00 + 5y 0 + 6y = −10 − 2t, where y(0) is the position from
the first part, and y 0 (0) = 0. See WolframAlpha

3. Solve the IVP y 00 + 5y 0 + 6y = −2t, where y(0) = 0 and y 0 (0) = 0. What


does this have to do with the problem above? See WolframAlpha

Problem 6.19 Solve the following IVPs. (This problem originally had some
other stuff at the beginning, but it all got changed - this is where my migraine
hit from dehydration.)
1. Assume r(t) = 20e−t . Solve the IVP y 00 + 5y 0 + 6y = 20e−t , y(0) = 0,
y 0 (0) = 0.
2. Assume r(t) = 20e−2t . Solve the IVP y 00 + 5y 0 + 6y = 20e−2t , y(0) = 0,
y 0 (0) = 0.
3. Check both your answers with Wolfram Alpha. You may have to expand
WolframAlpha’s solution to get it to match yours. See WolframAlpha

Problem 6.20 We build a rocket and attach an engine. In free fall, we Most rocket engines have a three
already know the ODE which models the motion is my 00 + ky 0 = −mg. The part thrust. The engine first
ramps up (linearly) to some
engine adds an external force r(t) to this system. Because the engine burns constant thrust, stays at that
fuel as it propels upwards, the mass m(t) now depends on time. This gives us constant thrust for a time, and
the ODE m(t)y 00 + ky 0 = −m(t)g + r(t). If we fire the rocket in space, then we then ramps down linearly. We’ll
could neglect the −m(t)g part (but then k would probably also be zero). We revisit this again in the next
chapter, when we have some
need a good model for engine thrust. powerful tools for working with
Let’s fire a toy rocket from the earth’s surface. Suppose m = .2 kg and piecewise defined functions.
k = .6 kg/s. For simplicity, use g = 10m/s2 . Let’s assume the rocket thrust
starts out fast, and drops to zero exponentially. We’ll also assume that the fuel
is extremely light, so that we can assume m(t) is just the constant .2 kg. This
gives us an external force f (t) = aebt for some known constants a and b.
CHAPTER 6. NON HOMOGENEOUS ODES 90

1. In this chapter, we are studying linear constant coefficient non homogeneous


ODEs. If we allowed m to change with t, why does the material in this
chapter no longer apply?
2. Why are the initial conditions y(0) = 0 and y 0 (0) = 0.
3. If r(t) = 7e−5t , determine the rocket’s height y(t) after t seconds. Here
I gave you some specific numbers to work with. This is often the key to
working on a problem with symbols.
4. If r(t) = aebt , determine the rocket’s height y(t) after t seconds.

For the next problem, let’s imagine attaching the left end of a spring to a
wheel, and then rotate the wheel. We’ll keep the mass-spring system horizontal,
so we can neglect gravity. Please look at the links to
• LearnersTV or 15

10

• Wolfram Demonstrations Project 5

to see a picture of such a system. This rotating wheel applies a periodic external 20 40 60 80 100 120 140

-5

force to the mass-spring system. This force is often called a driving force. -10

Problem 6.21 Let’s attach a mass-spring system to a wheel. Suppose m = 1


-15

and k = 4 (with no dashpot). The driving force, r(t), is periodic. Notice the beats. In this example,
1.1, c ≈ 0, and k = 4.
ω = 2, m =p
1. Assume the driving force is r(t) = 7 sin(5t). Solve the IVP y 00 + 4y = Since ω0 = 4/1.1 ≈ 2 = ω, the
solution results in large periodic
7 sin(5t), where y(0) = 0 and y 0 (0) = 0. oscillations. If the oscillations are
too large, they will destroy the
2. Assume m and k are now some p known constant, and the driving force is system.
r(t) = A sin(ωt), where ω =6 k/m. Solve the IVP my 00 + ky = F sin(ωt), 100

where y(0) = 0 and y 0 (0) = 0. [Because the coefficients are variables, you
might want to use Cramer’s rule when solving for any unknown constants.]
50

20 40 60 80 100 120 140

-50

Problem 6.22 Again, let’s attach a mass-spring system to a wheel. Suppose -100

m = 1 and k = 4 (with no dashpot). The driving force, r(t), is periodic.


When ω0 = ω and friction is
1. Assume the driving force is r(t) = 7 sin(2t). Solve the IVP y 00 + 4y = negligible, a system will oscillate
with an amplitude that grows
7 sin(2t), where y(0) = 0 and y 0 (0) = 0. without bound. Beware of this
situation, as any mechanical
2. Assume m and k are p now some constant, and the driving force is r(t) = system which undergoes this kind
A sin(ωt), where ω = k/m. Solve the IVP my 00 + ky = F sin(ωt), where of oscillation will self destruct.
y(0) = 0 and y 0 (0) = 0.

Make sure you ask me in class to graph your


p two solutions above in Mathe-
matica. The plots get interesting when ω ≈ k/m, and the solution produces
steady beats. You should
p see a rhythmic rise and fall in the amplitude of the
solution. When ω = k/m, the solution grows without bound, which many
people call resonance. The following YouTube videos show the collapse of the
Tacoma Narrows bridge, and airplane flutter. The points to these videos is to
show you the dangerous bad things that can (and do) happen to a structure
when the designer forgets to take into account how external driving forces might
interact with the internal frequencies of the mechanical system.
• The Tacoma Narrows bridge collapses.
• The tail of a small airplane begins to flutter.
CHAPTER 6. NON HOMOGENEOUS ODES 91

• Watch a collection of flutter examples.


• An RC airplane looses its wing midflight.
In both problems above, we assumed there was no friction (c = 0). Can we
produce beats or resonance when there is friction? Let’s analyze this problem
and show that YES, bad things can still happen when friction is involved. To
discover when disaster might occur, we have to work with symbolic answers and
then ask, “What would it take to produce large oscillations?” Let’s analyze
this first with some specific numbers (to notice patterns) and then we’ll analyze
what happens symbolically.

Problem 6.23 Consider the ODE y 00 + 2y 0 + 5y = 5 sin(3t).


1. Find a general solution to this ODE. See WolframAlpha

2. As t increases, what happens to the homogeneous solution?


3. If y(0) = 0 and y 0 (0) = 0, solve the IVP.

When friction enters a mass spring system, the homogeneous solution will
always die out over time. The particular solution yp is called “the steady-state”
solution, or “steady periodic solution.” As time moves on, friction will damp
out all oscillation except for the steady-state solution, yp .

Problem 6.24 Consider the ODE my 00 + cy 0 + ky = F sin(ωt).


1. What are the roots of the characteristic polynomial?
2. We guess the steady-state solution (particular solution) is yp = A cos(ωt) +
B sin(ωt). Why do we never have to multiplying the guess by t?
3. Find the steady-state solution. As a hint, you’ll probably find Cramer’s
useful when solving for A and B (because you’ll get a linear system with
variables as coefficients). See WolframAlpha

4. What would it take to get a really large amplitude for the steady-state
solution (thus destroying the mechanical system)?

6.3.1 Electric circuits


Remember that Kirchoff’s voltage law states that the voltage (electromotive
force) impressed on a closed loop is equal to the sum of the voltage drops across
the other elements of the loop. We’ve summarized this by saying “voltage in
equals voltage out.” Because we’ve been using complex numbers in our work,
we’ll use I(t) to represent the current in a loop instead of i(t). We’ve already
used Kirchoff’s voltage law in connection with resistors. Let’s now add an
inductor and a capacitor to a single loop. Each element (resistor, inductor,
capacitor) produces the voltage drop given in the table below.

Component Voltage drop Other


Resistor RI Ohm’s law, where R is in ohms
0
Inductor LI = L(dI/dt) L is in henrys
Q 1 dI
Capacitor = C dt Q is in coulombs, C in farads.
C
CHAPTER 6. NON HOMOGENEOUS ODES 92

L i L
i
E R E R E R
C C
i
An RLC-circuit An RC-circuit An RL-circuit
0
LI + RI + C1 I(t)dt = E(t) RI + C1 I(t)dt = E(t) LI 0 + RI = E(t)
R R

LQ00 + RQ0 + C1 Q = E(t) RQ0 + C1 Q = E(t)


LI 00 + RI 0 + C1 I = E 0 (t) RI 0 + C1 I = E 0 (t)

Table 6.1: Typical diagrams of RCL, RC, and RL circuits, and their corre-
sponding ODEs. The first row is an integro-differential equation for the current
I(t). The second row is the ODE for the charge Q on the capacitor. The third
row is the derivative of the first row.

The
R charge Q on a capacitor is related to the current by I(t) = dQ dt , or Q =
I(t)dt.
We’ll be studying RC, RLC, and RL circuits in the next few chapters. Table
6.1 shows the differential equations corresponding to each type of circuit.
In a circuit with one resistor, one inductor, and one capacitor (an RLC
circuit), if the electromotive force is E(t), then Kirchoff’s Voltage law gives the
integro-differential equation
Z
1 1
LI 0 + RI + Q(t) = E(t) or LI 0 + RI + I(t)dt = E(t).
C C
Differentiating both sides removes the integral and gives
1
LI 00 + RI 0 +I(t) = E 0 (t),
C
which is a 2nd order non homogeneous linear differential equation with constant
coefficients. However, the initial conditions are in terms of initial charge Q(0)
and initial current I(0). To solve the differential equation for I, we need I 0 (0,
which you can get from the equation LI 0 (t) + RI(t) + C1 Q(t) = E(t). Problem
14.13 in Schaum’s provides an excellent example that summarizes the solution
technique.
Problem 6.25 Consider an RLC circuit with L = 1/2, R = 2, and C = 2/3.
Let’s plug the circuit into an alternating current power source (like a wall outlet),
which means we might have something like E(t) = 2 cos(3t). Initially, assume
that the current is zero and the charge on the capacitor is zero. We’d like to
find the current at any time t in the circuit.
1. Explain why the current satisfies I 00 + 4I 0 + 3I = −12 sin(3t). Find a
general solution to this ODE. See WolframAlpha

2. We know that I(0) = 0 and Q(0) = 0. Use the equation LI 0 (t) + RI(t) +
1 0
C Q(t) = E(t) to find I (0).

3. Find the current in the wire at any time t by solving the corresponding
IVP. Use the initial conditions you found in the previous part.. See WolframAlpha

4. What is the steady-state current? (Which part of your solution above does
not vanish after sufficient time has passed? This would be the current
flowing through the circuit after the initial conditions have died out.)
CHAPTER 6. NON HOMOGENEOUS ODES 93

1
Problem 6.26 Consider an RLC circuit with L = 1, R = 8, and C = 25 .
Let’s plug the circuit into a 12 V battery, so we have E(t) = 12. Initially, assume
that the current is zero and the charge on the capacitor is zero. We’d like to
find the current at any time t in the circuit.
1. State the IVP whose solution would give the current at any time t. (What’s
the ODE, and what are the initial conditions I(0) and I 0 (0)). [Hint: Use
the equation LI 0 (t) + RI(t) + C1 Q(t) = E(t) to find I 0 (0).]
2. Find the current in the wire at any time t. Check your answer with
WolframAlpha (you’ll want to use y instead of I).

3. What’s the steady-state current?

Observation 6.1. Mechanical models are expensive to build. Electrical models


are fairly simple to build and measure. If you need to create a mechanical system,
it may prove beneficial financially to start with an electrical model. Engineers
spend another semester on this idea in system dynamics. Hydraulic systems are
also very closely related. In bridging between mechanical and electrical systems,
we compare the following variables.

Mechanical System m c k r(t) = F0 cos ωt y(t)


Electrical System L R 1/C E 0 (t) = E0 ω cos ωt I(t)

Solving a problem in one system (either mechanical or electrical) can provide


useful results in the other.

6.4 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 7

Laplace Transforms

This chapter covers the following ideas.

1. Explain how to compute Laplace transforms and inverse Laplace transforms.


Explain and use both shifting theorems, and be able to prove them.

2. Use Laplace transforms to solve IVPs.


3. Describe the Dirac delta function, and use it to solve ODEs. Illustrate
what the Dirac delta function does to a system by applying it to examples
in mass-spring systems and electrical networks.

4. Explain what a convolution is, and how it relates to Laplace transforms.

You can find additional practice problems in Schaum’s Outlines Differential


Equations by Richard Bronson. You’ll find relevant problems in chapters 21 -24,
as well as some extra practice problems at the end of this chapter. Do enough
of each type that you feel comfortable with the ideas.

f (t) F (s) provided f (t) F (s) provided


1 s
1 s>0 cos(wt) s>0
s s2 + ω 2
n! ω
tn s>0 sin(wt) s>0
sn+1 s + ω2
2

s
1 cosh(wt) s > |ω|
eat s>a s2 − ω 2
s−a
ω
y0 sY − y(0) sinh(wt) s > |ω|
s − ω2
2

y 00 s2 Y − sy(0) − y 0 (0) u(t − a) 1 −as


se
eat f (t) F (s − a) δ(t − a) e−as
f (t) ∗ g(t) F (s)G(s) f (t − a)u(t − a) L (f (t))e−as
f (t)u(t − a) L (f (t + a))e−as

Table 7.1: Table of Laplace Transforms. Note that the s shifting theorem
L (eat f (t)) = F (s − a) has a positive a in the exponent, while the t shifting
theorem L (f (t − a)u(t − a)) = L (f (t))e−as has a negative a in the exponent.

94
CHAPTER 7. LAPLACE TRANSFORMS 95

You must practice lots of problems to gain a feel for patterns. Many of the
problems in 21-23 are fast. Please take a few minutes every day to just flat out
practice with the basics (kind of like when you were learning the times tables -
they get really fast if you just practice them). When you feel like you have the
basics down, see if you can complete chapters 21 and 22 in less than an hour. If
one stumps you, skip it and come back later.
Once you feel confident, chapters 23 (on convolutions and the heaviside
function) and 24 (solving IVPS) will help you use the Laplace transforms to
solve ODEs. At the end of this chapter are some additional problems to help
you cement your understanding. Table 7.1 summarizes the transforms we use
most often.

7.1 Review
Our real goal in this chapter is to learn how to handle non differentiable changes
in an ODE. We’ll find that Laplace transforms provide us with extremely nice
tools to solve problems of this type. Before we jump in, let’s review how to solve
a couple ODEs with Laplace transforms, and perhaps make some connections
that we haven’t yet made.
3s+8
Review Compute the inverse Laplace transform of Y = (s+1)2 +16 . See 1 .

Problem 7.1 Compute the inverse Laplace transform of We’ve solve inverse transforms
such as this one multiple times. If
5 2s + 3 3s + 1 you need to refresh, please head to
Y = + + . chapters 21 and 22 in Schaum’s,
(s + 3)3 (s + 4)2 + 9 (s + 2)2 − 49 and just practice the problems
where answers are provided.
Use the rules for cosh and sinh to tackle the last terms, rather than doing a
partial fraction decomposition. The goal of this problem is to make sure you
have the s-shifting theorem mastered.

Problem 7.2 Consider the IVP y 00 + 6y 0 + 8y = 0, y(0) = 2, y 0 (0) = 3.

1. Use Laplace transforms to solve the IVP. Write your answer as a linear
combination of e−2t and e−4t .
2. Use Laplace transforms to solve the IVP. Note that we could complete the
square to write s2 + 6s + 8 = (s + 3)2 − 1. Write your answer as a linear
combination of e−3t cosh(t) and e−3t sinh(t).
et + e−t et − e−t
3. Remember that cosh(t) = and sinh(t) = . Use this to
2 2
show how your second solution is really the same as your first.

1 We can rewrite Y as
3(s + 1) − 3 + 8 3(s + 1) 5 4
Y = = + .
(s + 1)2 − 16 (s + 1)2 − 16 (s + 1)2 − 16 4
The inverse Laplace transform is then
5 −t
y(t) = 3e−t cosh(4t) + e sinh(4t).
4
CHAPTER 7. LAPLACE TRANSFORMS 96

Problem 7.3 Consider the IVP y 00 + 7y 0 + 10y = 0, y(0) = 4, y 0 (0) = −3.


1. Use Laplace transforms to solve the IVP. Write your answer as a linear
combination of e−2t and e−5t .
2. Complete the square on s2 + 7s + 10 and use the Laplace transform with
cosh and sinh rules to solve the IVP.
3. Which is easier?

The last two problems should have reviewed the main ideas used in solving
Laplace transforms. In addition, I hope you see how useful it is to know the
transforms for cosh ωt and sinh ωt. They can greatly simplify some computations.

7.2 Piecewise Defined Functions


We now turn to perhaps the key reason Laplace transforms were invented. We
can use them to obtain quick solutions to problems with discontinuous external
forces. Let’s start by examining a RL circuit with a battery, because it keeps
the computations simple.
Problem 7.4 Consider an RL circuit with R = 1 ohms and L = 1 Henry.
At time zero, there is no battery in the system. After 2 seconds, we connect a
battery E = 12V to the circuit. Two seconds after connecting the battery, we
disconnect it. Our goal is to determine the current in the wire exactly 2 second
after we disconnect the battery.
1. During the first two seconds, we need to solve the IVP I 0 + I = 0 where
I(0) = 0. Solve this IVP and use your solution to show that the current
after 2 seconds is I(2) = 0.
2. Between t = 2 and t = 4, we know E = 12. Solve the IVP I 0 + I = 12,
I(2) = 0. What is I(4), the current right when the battery gets removed?
Your answer will involve the constant e2 .
3. When we remove the battery, the ODE is I 0 + I = 0. We know the initial
condition I(4) from the last part. Solve the IVP, and state I(6).
4. We can now predict the current at any time t. Use piecewise function
notation to state the current in the form

0
 0≤t<2
I(t) = 12 − 12e e 2 −t
2≤t<4.

? 4≤t

In the previous problem, we found the current using the initial conditions
I(0) = 0, I(2) = 0, and I(4) =?. Another way to tackle this problem is to move
our reference frame, letting t = 0 correspond to the beginning of each change.
The computations are often simpler, and we then just have to shift the reference
frame back when we finish the problem.
Problem 7.5 Consider again the same RL circuit with R = 1 ohms and
L = 1 Henry. At time zero, there is no battery in the system. After 2 seconds,
we connect a battery E = 12V to the circuit. Two seconds after connecting
the battery, we disconnect it. Our goal is to determine the current in the wire
exactly 2 second after we disconnect the battery. We’ll solve this problem by
always making t = 0 the start of each IVP.
CHAPTER 7. LAPLACE TRANSFORMS 97

1. During the first two seconds, we need to solve the IVP I 0 + I = 0 where
I(0) = 0. Solve this IVP and use your solution to show that the current
after 2 seconds is I(2) = 0.
2. Between 2 and 4 seconds, we know E = 12. Letting t = 0 correspond to 2
seconds, solve the IVP I 0 + I = 12, I(0) = 0. What is I(2), the current
right when the battery gets removed?
3. When we remove the battery, the ODE is I 0 + I = 0. Let t = 0 correspond
to 4 seconds, and then we know the initial condition I(0) from the last
part. Solve the IVP, and state the current I(2) after 6 seconds.
4. Use piecewise function notation to state the current at any time t. Re-
member to shift your solutions from the 2nd and 3rd part. Your answer
will look like 
0
 0≤t<2
I(t) = 12 − 12e−(t−2) 2 ≤ t < 4 .

? 4≤t

The electromotive force in the previous problem (E(t)) was a piecewise


defined force. It was zero, then 12, then 0. Using piecewise notation, we would
write this as 
0
 0≤t<2
E(t) = 12 2 ≤ t < 4 ,

0 4≤t

and we could graph the function E(t) using the figure to the right. We need a
nice clean way to work with piecewise defined external forces. We also need to
become comfortable graphing and working with these kinds of forces.

Problem 7.6 Consider the functions


 

 2t 0≤t<2 
2t 0≤t<2
−t2 + 4t

2≤t<4 4 − (t − 2)2 2 ≤ t < 4

f (t) = and g(t) = .


 18 − 3t 4≤t<6 

6 − 3(t − 4) 4 ≤ t < 6
2
t − 12t + 35 6≤t<8 (t − 6)2 − 1 6 ≤ t < 8

1. Graph f (t) in the ty plane.


2. Graph g(t) in the ty plane.

3. Graph y = 2t, y = 4 − t2 , y = 6 − 3t, and y = t2 − 1 in the ty plane. What


does this have to do with the above?

7.2.1 The Heaviside function u(t − a)


We now define the key function that allows us to work with piecewise defined
functions. Some people call this the Heaviside function, some call it the unit
step function. This is a simple function that jumps up a single unit at a specified
value of t.
CHAPTER 7. LAPLACE TRANSFORMS 98

Definition 7.1: Heaviside or Unit Step Function. We define the Heaviside, In our work, it won’t matter what
or unit step function, to be the function we define u(0) to equal. Here, we
define u(0) = 1, but we could have
( just as easily define u(0) = 0 or
0 t<0 u(0) = 1/2. This last option, the
u(t) = .
1 0≤t 1/2, comes in handy when
working with Fourier series.

We’ll most often shift this function right a units (so we replace t with t − a,
which means we could write
( (
0 t−a<0 0 t<a
u(t − a) = = .
1 0≤t−a 1 a≤t

Why does this function matter. It’s like an on/off function. If you multiply
f (t) by u(t − a), then the function f (t)u(t − a) is zero to the left of a, and is
equal to f (t) after a. If a = 3, then look below for the graph of y = u(t − 3). Mathematica uses the name
“HeavisideTheta” for the Heaviside
function. You’ll see the symbol θ
y = u(t − 3) show up as the name of a function.

Problem 7.7 Construct a graph of each of the following:


1. f (t) = u(t − 4) − u(t − 7) WolframAlpha and I are having
issues when it comes to plotting
2. g(t) = (10 − t)(u(t − 4) − u(t − 7)) Heavisides. I can plot the first one
just fine, but as soon as I times it
3. h(t) = (10 − (t − 4))(u(t − 4) − u(t − 7)) (How does this differ from the by (10 − t), it tries to plot a
surface. As such, please use this
previous?) link to Sage to check your work.
Make sure you can explain how
4. k(t) = t2 (u(t − 3) − u(t − 5)) the graphs are made (not just give
them).
5. l(t) = (t − 3)2 (u(t − 3) − u(t − 5)) (How does this differ from the previous?)

Make sure you check your solution by following the link to Sage.

Problem 7.8 The graphs of f (t) = 9 − t2 for 0 ≤ t ≤ 3, and g(t) = 3t for


0 ≤ t ≤ 2, and h(t) = 6 − 2t for 0 ≤ t ≤ 2 are connected together (when one
ends, the others starts) to give the following graph.

1. Write this function using piecewise function notation.

2. Write this function using Heaviside notation. You’ll want to use the idea
that u(t − a) − u(t − b) turns a function on at a and off at b.
CHAPTER 7. LAPLACE TRANSFORMS 99

3. When you think you have the function, use this Sage link to check if you
are correct (you’ll have to type in your function).
Feel free to use Mathematica instead, if you have downloaded and installed
it. Remember that BYU-I students can now install Mathematica on their
personal machines for free. Please head to I-Learn for instructions. You
can then download the Mathematica Technology Introduction, and you’ll
see how to code HeavisideTheta functions in Mathematica.

Did you notice in your work above that it was a lot easier to graph a piecewise
defined function when everything was shifted to the starting point. It’s much
easier to graph f (t − a)u(t − a) than it is to graph f (t)u(t − a). We’ll find that
this remains true as well, when we start applying Laplace transforms.
It’s time to look at the Laplace transform of the Heaviside function. The
next problem is the key to why Laplace transforms work so nicely with piecewise
defined functions. We’ll compute the Laplace transform of both f (t − a)u(t − a)
and f (t)u(t − a). Then we’ll practice on a few problems.

Problem 7.9: t-shifting Theorem Suppose that y = f (t) is a function


for which you can find the Laplace transform. Show, using the definition of the
Laplace transform, that

L {f (t − a)u(t − a)} = L {f (t)}e−as .

In particular, this means that L {1u(t − a)} = 1s e−as . Then show that

L {f (t)u(t − a)} = L {f (t + a)}e−as .

[Hint: Just write down the definition of the Laplace transform. You’ll have to
do a u substitution, but you’ll probably want to use a different variable, like
w. Remember that u(t − a) = 0 if you are below a, which should allow you to
remove u(t − a) from any integral, after updating the bounds.]

Problem 7.10 Compute the Laplace transforms of each of the following


functions. See Schaum’s chapter 22 for lots
more practice. Please do a bunch
1. f (t) = 3u(t − 4) of these until you feel like you
have the idea down. Each problem
2. f (t) = 3(t − 4) u(t − 4) takes just a tiny bit of time.
Unless you practice this a bunch,
3. f (t) = 3t u(t − 4) [Hint: 3t = 3(t − 4) + 12] you’ll be lost and spend gobs of
time on the upcoming problems.
4. f (t) = (t − 3)2 u(t − 3)
5. f (t) = t2 (u(t − 2) − u(t − 5))

Problem 7.11 Compute the inverse Laplace transform of each of the follow-
ing functions.
4 −2s 4 2s + 1 −πs/6 3s + 4
1. e 2. e−2s 3. e 4. e−5s
s3 (s + 5)3 s2 + 9 (s + 2)2 + 16

We are now ready to solve Laplace transform problems with the Heaviside
function. The simplest example is an RL circuit. To get to RC and RLC
circuits, we’ll need to discuss the derivative of the Heaviside function (which
technically doesn’t exist).
CHAPTER 7. LAPLACE TRANSFORMS 100

Problem 7.12 Consider an RL circuit with R = 4 and L = 1. At t = 0


there is no current in the wire. Two seconds in, we connect a 9V battery to the
circuit. Three seconds later (t = 5) we remove the battery. This gives us the
electromotive force as E(t) = 9(u(t − 2) − u(t − 5)). We need to solve the IVP

1I 0 + 4I = 9(u(t − 2) − u(t − 5)), I(0) = 0.

Use Laplace transforms to predict the current I(t) at any time t. You’ll want to
ignore the e−as terms when you perform any needed partial fraction decomposi-
tions.

Problem 7.13 Consider an RL circuit with R = 5 and L = 1. We connected


a variable voltage source to the circuit and start to ramp up the power. Our
electromotive force is E(t) = t volts. After 12 seconds, we loose power and E(t)
drops to zero. Solve for the current in the wire at any time t.
[Hint: The electromotive force is E(t) = t − tu(t − 12), which means we solve

I 0 + 5I = t − tu(t − 12), I(0) = 0.

Use Laplace transforms and the t-shifting theorem to complete this.]

Problem 7.14 Consider a vertical mass spring system, where we attach a


magnetic brick to the bottom of the spring. Let y = 0 be the equilibrium height
of the brick after accounting for gravity (so we can ignore the force of gravity).
Suppose that m = 1, c = 0, and k = 4. The spring is pushed upwards 1 unit,
and then let go from rest. After 3 seconds, an electromagnet pulls down on
the spring with a force of 7 (the units all agree). We can model this using
r(t) = −7u(t − 3). Solve the ODE y 00 + 4y = −7u(t − 3). Check your solution
with Mathematica or Sage.

Problem 7.15 We decide to launch a rocket. We attach an engine to the


rocket, and light it. Neglect the mass of the fuel, or think “it’s a battery powered
rocket.”) The mass of the rocket and engine we’ll assume is 4 kg. Let’s launch
the rocket in space, so we can ignore the force due to gravity. Since we are in Ask me in class to show you how
space, we don’t have air resistance, so instead let’s assume that we’ve put some to modify this to add in gravity,
or come by and show me what you
Jello out in space, and the rocket plans to fly through the Jello (something to would do. It’s a pretty fun
slow it down). Assume that the force due to the Jello’s resistance is proportional switch.)
to the velocity of the rocket, with proportionality constant 8 kg/s. When we
light the engine, for the first 2 seconds the force ramps up, following a linear
path until it gives a force of 10 N after 2 seconds. Then for 15 more seconds the
rocket maintains a force of 10 N. The force then starts to ramp down linearly,
taking an additional 5 seconds until the force drops to zero. A picture of this
force is below.
CHAPTER 7. LAPLACE TRANSFORMS 101

1. Set up an initial value problem whose solutions is the position of the


rocket after any time t. The right hand side should be written in terms
of Heaviside functions, where the discontinuities occur after 2, 17, and 22
seconds.
2. Use Laplace transforms and technology to solve your IVP. Let the computer
do all the solving. The goal is to just GET a solution, and then we’ll
interpret it.
3. The rocket will eventually get stuck in the Jello. How far will it travel
before the rocket stops moving?

7.2.2 The Dirac-Delta distribution δ(t − a) and impulses.


We’ve been solving mass-spring problems with magnets. What if we instead hit
the system with a hammer? We could place a magnet underneath a magnet
brick, and pull the brick down. We’d have to leave the magnet on for a while
to get the brick to come down. Alternately, we could hit the brick with a
hammer. The blow occurs almost instantly, and yet could result in the exact
same downward pull as the magnet. The next problem has you develop the
connection between magnets and hammer blows. You should see that a hammer
blow is like having an infinitely strong magnet on for no time.

Problem 7.16 Consider a mass-spring system with m = 1 kg, c = 3 kg/s,


and k = 2 kg/s2 . Initially the system is at rest (so y(0) = 0 and y 0 (0) = 0). We
turn on a magnet underneath the brick. We’ll vary the strength of the magnet,
and the time we leave the magnet on, and then solve the IVP y 00 +3y 0 +2y = r(t),
y(0) = 0, y 0 (0) = 0.

1. Solve the IVP if the magnet pulls down with a force of 10 N for 1 second You can solve all of the IVPs in
so that r(t) = −10 + 10u(t − 1)). this problem all at once, if you are
willing to work with symbols. You
2. Solve the IVP if the magnet pulls down with a force of 20 N for 1/2 seconds just have to solve
so that r(t) = −20 + 20u(t − 1/2)). y 00 + 3y 0 + 2y = −
10 10
+ u(t − h).
h h
3. Solve the IVP if the magnet pulls down with a force of 40 N for 1/4 seconds because all the forces are constant,
so that r(t) = −40 + 40u(t − 1/4)). the forward transforms are quite
quick. Let s = 0, 1, 2 to get the
4. Use a computer to graph y(t) for each problem above for 0 ≤ t ≤ 10. On coefficients of any partial fraction
each graph, estimate how far down the spring moves before bouncing back decompositions.
up and coming to rest.

[Hint: If you use the Mathematica introduction, then you can quickly check all
your answers, and see the graphs instantly. Just open the Laplace transform
section, expand the “Springs” section, and then type in your IVP. You’ll see
all the steps involved in solving this by hand, as well as the plot of y(t). The
by-hand solution is not bad at all, but graphing by hand could be.]

(
1
0≤t<h
h
Problem 7.17 Consider the function fh (t) = . This function
0 otherwise
represents a pulse of strength 1/h for h seconds. We would like to examine what
happens to this function as h → 0 (so that we have a really strong pulse held
for almost no time).
CHAPTER 7. LAPLACE TRANSFORMS 102

R∞
1. For h = 1, draw the function f1 (t) for 0 ≤ t ≤ 2 and compute 0
f1 (t)dt.
2. Repeat the previous part if h = 1/2, h = 1/4, and h = 1/10.
u(h) − 0
3. If u(t) is the Heaviside function, then compute both and u(h) at
h
h = 1, 1/2, 1/4, 1/10.
4. What patterns
R ∞do you see? If someone asked you to compute limh→0 fh (t)
and limh→0 0 fh (t)dt, what would you give as answers?

Because of our work above, let’s make a definition


Definition 7.2: Dirac Delta Distribution (or function). We define the
Dirac delta distribution to be the “function”
(
0 t 6= a
δ(t − a) = .
∞ t=a

It’s not really a function, because the output is ∞ at a single point. We’ll
require that the Dirac Delta distribution satisfies the integral sifting properties
Z ∞ Z ∞
δ(t − a)dt = 1 and g(t)δ(t − a)dt = g(a).
0 0

When you time a function by the dirac delta and integrate, you eliminate
everything except the function at that single point.

Problem 7.18: L {δ(t − a)} = e−as Prove that the Laplace transform of
the Dirac delta distribution is L {δ(t − a)} = e−as (look at the definition above).
Then consider the IVP y 0 = δ(t − 5), y(0) = 0. Use L {δ(t − a)} = e−as
to solve this IVP and find the function whose derivative is δ(t − 5). Use your
solution to give a function whose derivative is 5δ(t − 3).

From the previous problem, you should have observed that the derivative of
the Heaviside function is the Dirac delta function.
Theorem 7.3. If u(t − a) is the Heaviside function, and δ(t − a) is the Dirac
delta function, then
d
u(t − a) = δ(t − a).
dt
The derivative of a Heaviside is a Dirac delta.
We now have all the tools we need to solve some pretty cool electricity and
mass-spring problems. We couldn’t tackle any capacitors in our problem before
now, because we need have to compute E 0 (t). Now that we have derivatives of
Heavisides, we can compute Laplace transforms.

Problem 7.19 Consider an RC circuit with R = 2 and C = 1/8. Suppose


that capacitor has no charge on it, and there is no current flowing at t = 0. At
t = 2, we connect a 12 V battery to the circuit. Then at t = 7 we remove the
battery. Set up an IVP that would give the current at any time t, and then solve
the IVP. Use software to construct a graph of your solution. [Hint: There are
no partial fraction decompositions in this one, so it should be REALLY fast.]
CHAPTER 7. LAPLACE TRANSFORMS 103

Problem 7.20 Consider a mass spring system with no friction. Let m = 1


and k = 9. We’ll examine what happens if a hammer hits the system. Suppose
the spring is initially at rest at equilibrium. After 3 seconds, a hammer hits the
spring downwards with a force of 10 N (so r(t) = −10δ(t − 3)). The mass-spring
system starts to oscillate. Set up and solve an IVP what would give the position
of the spring at any time t, and state the amplitude of the oscillation. [Again,
there are no partial fraction decompositions on this problem, so it should go
quite fast.]

Problem 7.21 Consider an RLC circuit, with R = 6, L = 1, and C = 1/10.


Suppose that at t = 0 there is no charge on the capacitor, and no current in the
wire. We attach a variable voltage source to the RLC circuit, E(t) = 2t, and
ramp up the power for the first 6 seconds. After 6 seconds, the voltage drops to
zero. This gives us E(t) = 2t(1 − u(t − 6)). Set up and solve an IVP that would
give the current in the wire after t seconds.

Problem If you have a beam, and you know there is a distributed load If you have had strength of
on the beam, with a point force applied at another spot on the beam, can you materials, then this problem
connects how you use use
compute the shear stress and the moment at any point in the beam? This is Heaviside and Dirac delta to
exactly the same question as finding the Velocity and position of an object, tackle all the problems in
provided you know the acceleration on the rocket (some external driving force strengths. You can also use this to
turned on/off based on time) and the rocket is hit by hammers, or meteors solve problems in Statics. You can
use it to solve any problem where
(dirac delta) at various points along its path. you have a distributed load (use
Come see me if you’ld like to see this application. We won’t have time to Heavisides to turn it on and off),
discuss this (we lost a day last Friday because so many of you were busy with and a point force (Dirac delta).
other exams).

7.3 Convolutions
We’ve already seen that the Laplace transform of the product f ·g of two functions
is not the product of the Laplace transform of each (L(f g) 6= L(f )L(g)). Is there
some kind of product rule for transforms? This question lead mathematicians to
invent what we now call a convolution. They discovered that the R t Laplace inverse
of H(s) = L(f )L(g) is equal to the quantity h(t) = f ∗ g(t) = 0 f (p)g(t − p)dp.
We call this the convolution of f and g. The last problem of this chapter has
you prove why. The variable p is a dummy variable of integration, and we could
call it anything else (some books use τ , but I find it really hard to distinguish
between t and τ when I’m writing on paper, so I use p instead).
Definition 7.4: Convolutions. If f (t) and g(t) are function, then we define
the convolution of f and g to be
Z t
(f ∗ g)(t) = f (p)g(t − p)dp.
0

Theorem 7.5 (The Convolution Theorem). If f (t) and g(t) have Laplace
transforms F (s) and G(s), then the inverse Laplace transform of F (s)G(s) is
the convolution
L {F (s)G(s)} = (f ∗ g)(t).
This is as close as we get to an inverse product rule for Laplace transforms.
CHAPTER 7. LAPLACE TRANSFORMS 104

We need to practice the convolution theorem. It’s just an integral.

Problem 7.22 Do the following:


Z t Z t
1. Show that 1 ∗ 1 = t. You’ll need to compute f (p)g(t − p)dp = 1 · 1dp.
0 0
Z t
2. Compute 1 ∗ t and t ∗ 1. You’ll need to compute f (p)g(t − p)dp =
Z t Z t Z t 0

1 · (t − p)dp and f (p)g(t − p)dp = p · 1dp.


0 0 0
1 1
3. Compute t ∗ t. Compare this to the inverse transform of s2 s2 .

4. Compute sin(t) ∗ t.

Problem 7.23 Compute t ∗ e−3t and e−3t ∗ t. Which is easier? What is the
1 1
Laplace inverse of 2 ?
s s+3

Problem 7.24 Complete each of the following:


1. Compute the convolution sin(2t) ∗ 1. Then solve the IVP y 00 + 4y = 1,
y(0) = 0, y 0 (0) = 0.

2. Compute the convolution sin(3t) ∗ t. Then solve the IVP y 00 + 9y = t,


y(0) = 0, y 0 (0) = 0.

Problem 7.25 We’ve been using the modification rule when we have double
complex roots. Use convolutions to find the Laplace inverse of
1 1 1
= 2 .
(s2 + 9)2 s + 9 s2 + 9

Problem 7.26 Consider the IVP y 00 + 5y 0 + 6y = 0, y(0) = 0, and y 0 (0) = 1.


Solve this IVP in three ways.

1. Laplace both sides, and then use a convolution (no partial fraction decom-
position) to obtain a solution.
2. Laplace both sides, but use a partial fraction decomposition.
3. Obtain the homogeneous solution using the characteristic equation, and
then use the initial conditions to obtain the constants.
We’ll compare your three solutions in class, and discuss why someone would care
about the convolution approach (if you don’t see why it’s so cool as you use it).

If you’d like to know WHY the convolution theorem works, please complete
the next problem. It requires that you can swap the order of integration on a
double integral.
CHAPTER 7. LAPLACE TRANSFORMS 105

Problem 7.27 Prove the convolution theorem (Theorem 7.5). Here are
some hints.
R∞ R∞
• Let F (s) = 0 f (t)e−st dt and then use G(s) = 0 g(w)e−sw dw. (Why
can I use w instead of t?)

• Explain why
Z ∞ Z ∞
F (s)G(s) = f (t)g(w)e−s(t+w) dw dt.
0 0

• Do a p substitution p = t + w on the inside integral. You should have


something like Z ∞Z ∞
F (s)G(s) = ?e−s(p) dp dt.
0 t

• Swap the order of integration so that t is inside and p is outside. This will
require that you draw the region of integration in the tp plane.
• Show that
Z ∞ Z p 
F (s)G(s) = f (t)g(t − p) dt e−sp dp.
0 0

Why does this complete the theorem?

7.4 Extra Problems


Make sure you try some of each type of problem from chapters 21-24 (except
for the last set of problems in 23). The new ideas involve convolutions and the
Heaviside (unit step) function in 23. Once you have tried some of each of these,
use this page to give you more practice.

I Find the Laplace transform of each of the following, and use Mathematica
to check your answer.
1. f (x) = 8e−3x cos 2x − 4e4x sin 5x + 3e7x x5

2. f (x) = xu(x − 4) + δ(x − 6)


3. f (x) = e3x u(x − 2) + 7δ(x − 4)
II Find the inverse Laplace transform of each of the following, and use
Mathematica to check your answer. Many of these will require you to use
a partial fraction decomposition.
s 2
4. + e−3s
(s + 3)2 + 25 (s − 2)4
s
5. e−4s
s2 + 4s + 13
1
6. e−5s
s(s2 + 1)
1
7. e−3s
s2 (s2 + 1)
CHAPTER 7. LAPLACE TRANSFORMS 106

2s + 1
8. e−7s
(s − 1)2 (s + 1)
1
9. e−4s
(s − 1)(s + 2)(s − 3)
III Use Laplace transforms to find the position y(t) of an object or current
current I(t) in each of the following scenarios. I will give you the constants
m, c, k and the driving force r(t), or I will give you the inductance L,
resistance R, capacitance C, and voltage source E(t), as well as any
relevant initial conditions. Your job is to use Laplace transforms to find
the solution. Use Mathematica to check your solution, and draw the graph
of y(t) or I(t) and the steady-state (steady periodic) solution to see how
the Heaviside and Dirac delta functions affect the graph. The point here
is to see these two new functions affect solutions. I suggest that you do all
of these problems with the computer, so you can quickly see the effects of
a Heaviside function or Dirac delta distribution.
10. m = 1, c = 0, k = 4, r(t) = u(t − 1), y(0) = 1, y 0 (0) = 0
11. m = 1, c = 0, k = 4, r(t) = δ(t − 3), y(0) = 1, y 0 (0) = 0

12. m = 1, c = 0, k = 4, r(t) = 7u(t − 3), y(0) = 1, y 0 (0) = 0


13. m = 1, c = 0, k = 4, r(t) = 7u(t − 3) + 11δ(t − 5), y(0) = 1, y 0 (0) = 0
14. m = 1, c = 0, k = 4, r(t) = 7tu(t − 3), y(0) = 1, y 0 (0) = 0

15. m = 1, c = 0, k = 4, r(t) = 7, y(0) = 1, y 0 (0) = 0


16. m = 1, c = 0, k = 4, r(t) = 7, y(π) = 1, y 0 (π) = 0
17. m = 1, c = 3, k = 2, r(t) = u(t − 2), y(0) = 0, y 0 (0) = 0
18. m = 1, c = 3, k = 2, r(t) = δ(t − 2), y(0) = 0, y 0 (0) = 0

19. m = 1, c = 3, k = 2, r(t) = 4u(t − 1), y(0) = 0, y 0 (0) = 0


20. m = 1, c = 3, k = 2, r(t) = 4u(t − 1) + 10δ(t − 2), y(0) = 0, y 0 (0) = 0
21. m = 1, c = 3, k = 2, r(t) = 4tu(t − 1), y(0) = 0, y 0 (0) = 0
22. L = 0, R = 2, C = 1/5, E(t) = 12u(t − 2), Q(0) = 0 (use first order ODE)

23. L = 1, R = 2, C = 0, E(t) = 12u(t − 2), I(0) = 0 (use first order ODE)


24. L = 1, R = 2, C = 1/5, E(t) = 12, Q(0) = 0, I(0) = 0 (first find I 0 (0).)
25. L = 1, R = 2, C = 1/5, E(t) = 12u(t − 2), Q(0) = 0, I(0) = 0

26. L = 1, R = 2, C = 1/5, E(t) = e3t u(t − 2), Q(0) = 0, I(0) = 0


27. L = 1, R = 2, C = 1/5, E(t) = 4 cos(3t), Q(0) = 0, I(0) = 0
28. L = 1, R = 4, C = 1/4, E(t) = u(t − 3), Q(0) = 0, I(0) = 0
29. L = 1, R = 4, C = 1/4, E(t) = e−2t , Q(0) = 0, I(0) = 0
CHAPTER 7. LAPLACE TRANSFORMS 107

7.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 8

Power Series

This chapter covers the following ideas. When you create your lesson plan, it
should contain examples which illustrate these key ideas. Before you take the
quiz on this unit, meet with another student out of class and teach each other
from the examples on your lesson plan.

1. Compute MacLaurin series for various common functions, either directly


by taking derivatives, or by solving ODEs.
2. Use the power series method to solve ODEs where x = 0 is an ordinary
point.

3. Explain how to use the ratio test to find the radius of convergence of a
power series.
4. Explain the Frobenius method and use it to solve ODEs where x = 0 is a
regular singular point.
5. Be able to classify x = 0 as an ordinary, singular, and/or regular singular
point of an ODE.
6. Define the Gamma function and show how it generalizes the factorial. Be
able to compute the Gamma function at any multiple of 21 .

You’ll find extra practice problems at the end of this chapter. You can use
these to gain practice with the ideas. Handwritten solutions are available online.
Click for solutions.

8.1 MacLaurin Series


8.1.1 MacLaurin Series and ODEs
As we proceed in this unit, we’ll be looking for patterns. When you are looking
for patterns, one key rule is to avoid simplifying. Instead of writing 2 · 3 = 6, just
leave it as 2 · 3. If notice a pattern, like 2 · 3 · 4 · 5, then write 5! instead of 120.
If you will resist the urge to simplify, you’ll find a lot of patterns immediately
pop out.

Problem 8.1 Consider the function f (x) = ex . In this problem we would


like to approximate f (x) using various polynomials. We’d like to make sure that
the function and its derivatives match the polynomial and its derivatives.

108
CHAPTER 8. POWER SERIES 109

1. Let’s approximate f (x) using a 4th degree polynomial. Write the polyno-
mial as
P4 (x) = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 ,
where the coefficients a0 , a1 , . . . , a4 are unknown (we’ll discover them in a
bit). Compute the first 4 derivatives of P4 (x) and the first 4 derivatives of
f (x). As there are 5 unknowns, we need 5 equations. Let’s require that f
and P4 , together with their derivatives, match at x = 0. This gives us the
5 equations

f (0) = P4 (0),
f 0 (0) = P40 (0),
f 00 (0) = P400 (0),
f 000 (0) = P4000 (0), and
f 0000 (0) = P40000 (0).

Use these equations to solve for the unknown constants.


2. If you wanted a 7th degree polynomial, what should the coefficients a5 ,
a6 , and a7 equal?

In this chapter, our goal is to solve ODEs where the coefficients are no
longer constant. We’ll learn how to solve a mass-spring problem where the mass
is changing, the spring constant errodes over time, or the friction coefficient
increases as we tighten a dashpot. We’ll also gain the key ideas need to deal
with rocket problems where the mass decreases because fuel burns up. To solve
these problems, we’re going to start approximating functions with polynomials.
We’ll be using really large polynomials. We’ll then solving the problems using
these polynomials. The only catch is that we’ll start using polynomials that are
arbitrarily large. These polynomials are called Taylor polynomials. When we
consider an infinitely long polynomial, we call it a Taylor series, or MacLaurin
series. We’ll get a formal definition in a bit.

Problem 8.2 We already know the solution to the ODE y 0 − y = 0 (see part
1). Let’s find this solution using a series approach. Suppose we write

y = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · ,

where the polynomial continues on for as long as we want (why not forever).
We’ll use this polynomial to find a solution.
1. Solve the ODE y 0 −y = 0 by any method you would like. The characteristic
equation might make this really fast.
2. Now consider the series (infinitely long polynomial) above. Compute y 0
by computing the derivative (so y 0 = 0 + a1 + 2a2 x + · · · ). Write out the
first 7 terms or so.
3. Now subtract y from y 0 . You can combine the two infinite sums by adding
coefficients that are multiplied by collecting the coefficients on the same
powers of x. You’ll get an infinitely long sum of the form

(a1 − a0 ) + (2a2 − a1 )x + (?)x2 + (?)x3 + · · · .

Carry this out 7 terms. What pattern do you see?


CHAPTER 8. POWER SERIES 110

4. Because y 0 − y = 0, and 0 = 0 + 0x + 0x2 + 0x3 + · · · , you should now have


an infinitely large system of equations by equating coefficients. The first
two equations are a1 − a0 = 0 and 2a2 − a1 = 0. If you let a0 = c, then
solve for a1 , a2 , a3 , and so on in terms of c. What is an in terms of c?

The last two problems dealt with the function ex . Let’s now turn our
attention to cos x and sin x.
Problem 8.3 Let f (x) = cos x.
1. Find a 6th degree polynomial to approximate cosine. So let

P (x) = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + a6 x6 .

Now require that f and P have the same values at x = 0, and that the
first 6 derivatives of both f and P have the same values at x = 0. You
might want to organize your work in table (keep track of f , its first 6
derivatives, and their values at x = 0, as well as P , its first 6 derivatives,
and their values at x = 0). What pattern do you see?
2. Guess what the 20th degree polynomial would be.
3. If x = 2, use a calculator to compute cos(2) as well as P (2) for your 6th
degree polynomial. We’ll compute P (2) for your 20th degree polynomial
in class.

Problem 8.4 We know the solution to the IVP y 00 + y = 0, y(0) = c,


y 0 (0) = d is y(t) = c cos(t) + d sin(t). Suppose that

y = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .

1. Compute both y 0 and y 00 by taking the derivative, term-by-term, of the


infinitely long series. REMEMBER, DO NOT SIMPLIFY. So you should
have something like

y 00 = 2 · 1a2 + 3 · 2a3 x + · · · .

Continue this out 7 terms.


2. We want to solve y 00 + y = 0, so add together y 00 and y. Group together
terms that are multiplied by the same power of x, so your answer will look
something like

y 00 + y = (2 · 1a2 + a0 ) + (3 · 2a3 + a1 )x + (?)x2 + (?)x3 · · · .

Carry this out 7 terms.


3. If y(0) = c, then what is a0 ? If y 0 (0) = d, then what is a1 ?

4. Write a2 , a3 , a4 , and so on, in terms of c and d. Can you guess the Taylor
series for sin x?

Problem 8.5: MacLaurin Series Suppose we write f (x) as the series

f (x) = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .
CHAPTER 8. POWER SERIES 111

1. Compute the first 4 derivatives of f and evaluate them at 0. What pattern


do you see? State the nth derivative of f evaluated at x = 0, which we
write as f (n) (0).
2. Solve for the coefficient an in terms of the nth derivative of f .
3. Let f (x) = sin x. Compute the first 8 derivatives of sin x and evaluate
each at x = 0. Then use the pattern you see to state what an equals for
each n if we write

sin x = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .

Carry out your sum until you hit x9 . If you continue forever, we call this
infinite polynomial the MacLaurin series of sin(x).

Based on your results to the previous problem, we make the following


definitions.
Definition 8.1: MacLaurin Series. Let f (x) be a function. We define the
MacLaurin series of f (x) to be the infinite series

X
a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · = an xn
n=0

f (n) (0)
where an = . We use the notation f (n) (x) to denote the nth derivative.
n!
Note that 0! = 1, and that f (0) (x) is the 0th derivative (so original function).
With this notation, we could write the MacLaurin series as

f 00 (0) 2 f 0000 (0) 3 f (4) (0) 4 f (5) (0) 5 X f (n) (0) n
f (0)+f 0 (0)x1 + x + x + x + x +· · · = x .
2! 3! 4! 5! n=0
n!

Definition 8.2: Power Series. A power series is an expression of the form



X
a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · = an xn ,
n=0

where an is any real number. It’s a power series because we create an infinite
series using powers of x.
A MacLaurin series is a power series. We’ll often start with a power series,
and then look for the function f (x) whose MacLaurin series is the power series
we started with.
The MacLaurin series of a function depends on the value of the function and
its derivatives at x = 0. Sometimes, you would rather compute the function and
its derivatives at another spot. We won’t have much use for doing this in our
course, but for completeness, you should see the full definition of a Taylor series
centered at x = c.
Definition 8.3: Taylor Series centered at x = c. Let f (x) be a function.
We define the Taylor series of f (x) centered at x = c to be the infinite series

X
a0 + a1 (x − c)1 + a2 (x − c)2 + a3 (x − c)3 + a( x − c)x4 + · · · = an (x − c)n
n=0

f (n) (c)
where an = . The MacLaurin series is the Taylor series centered at x = 0.
n!
CHAPTER 8. POWER SERIES 112

Let’s compute a few more MacLaurin series.


Problem 8.6: MacLaurin series for cosh x and sinh x Obtain the first
10 terms of the MacLaurin series for both cosh x and sinh x. Do so by using
f (n) (0)
the formula an = . Write out the two series. What patterns do you see.
n!
Write down a formula for the coefficient an for both cosh x and sinh x.

The next problem shows you how to obtain the MacLaurin series for cosh x
and sinh x in a different way.
Problem 8.7 Consider the IVP given by y 00 − y = 0, with y(0) = A and
y 0 (0) = B.
1. Show, using Laplace transforms, that the solution to this IVP is y(x) =
A cosh x + B sinh x.
2. We’ll now obtain the solution using power series. Suppose
y = a0 + a1 x1 + a2 x2 + a3 x3 + a4 x4 + a5 x5 + · · · .
Compute y 0 and y 00 . Substitute y and y 00 into the ODE y 00 − y = 0, and
group together terms that are multiplied by the same power of x. You
should have something of the form
(2a2 − a0 ) + (3 · 2a3 − a1 )x + (?)x2 + · · · = 0 + 0x + 0x2 .

3. Use the initial conditions to explain why a0 = A and a1 = B. Then solve


for a2 , a3 , and so on, in terms of A and B. Keep going until you see a
pattern for an .
4. You now have the solution y. Some of the coefficients depend on A. Some
depend on B. Group together the terms that involve A and the terms
that involve B, and write your solution in the form
1 2 1
y = A(1 + x + · · · ) + B(x + x3 + · · · ).
2! 3!
Please carry out each series at least 5 terms.

We have so far developed the following MacLaurin series:


1 2 1 1 1
ex = 1 + x + x + x3 + x4 + x5 + · · ·
2! 3! 4! 5!
1 1 1 1
cos(x) = 1 − x2 + x4 − x6 + x8 + · · ·
2! 4! 6! 8!
1 1 1 1
sin(x) = x − x3 + x5 − x7 + x9 + · · ·
3! 5! 7! 9!
1 1 1 1
cosh(x) = 1 + x2 + x4 + x6 + x8 + · · ·
2! 4! 6! 8!
1 1 1 1
sinh(x) = x + x3 + x5 + x7 + x9 + · · · .
3! 5! 7! 9!
Problem 8.8: Euler’s Formula Use the MacLaurin series above to show The equation
that we can express eix in the form eix = cos x + i sin x
ix
e = cos x + i sin x is called Euler’s formula.

and that
cosh(ix) = cos x.
Then use the first fact to compute eiπ . What does sinh(ix) equal, if written in
terms of sin x?
CHAPTER 8. POWER SERIES 113

We’ll return to Euler’s formula in a minute. Before we do so, let’s examine a


different function.
Problem 8.9 Consider the IVP (x + 1)y 0 = 1, y(0) = 0. Is it linear? Is
it homogeneous? Does it have constant coefficients? Solve the ODE first by
using separation of variables. Then solve the ODE using a power series (assume
y = a0 + a1 x + a2 x2 + · · · , compute y 0 , plug these into the ODE, and then solve
for the unknown constants a0 , a1 , a2 , etc.). From your answer, what are the
first 5 terms in the the MacLaurin series of ln(x + 1)?

Problem 8.10 Find a 9th degree polynomial to approximate ln(x + 1). Do


this by computing the first 9 derivatives of ln(x + 1) or by computing the
(n)
first 4 and noticing a pattern when you plug in 0. The formula an = f n!(0)
will give you to coefficients. Then use your polynomial to estimate ln 1.2,
ln(1 − .8) = ln(.2) and ln 2.5. Use a computer to draw ln(x + 1) and your 9th
degree polynomial. For which values of x do you think the polynomial will do a
poor job approximating ln(x + 1). Why do you think this? Will increasing the
degree of your approximation ever help you approximate ln 2.5?

We’ve now turned multiple functions into power series. Polynomials are
extremely easy to differentiate and integrate. What happens if we differentiate
or integrate a power series. Do we get the power series of the derivative of the
function?
Problem 8.11 For each function below, compute the derivative of the func-
tion, and the derivative of the power series. Write your solution in summation
notation. Then answer the question at the end.

1 2 1 1 1 X 1 n
1. ex = 1 + x + x + x3 + x4 + x5 + · · · = x
2! 3! 4! 5! n=0
n!

1 3 1 1 X (−1)n 2n+1
2. sin x = x − x + x5 − x7 + · · · = x
3! 5! 7! n=0
(2n + 1)!

1 1 1 1 X (−1)n n
3. ln(x + 1) = x − x2 + x3 − x4 + x5 + · · · = x .
2 3 4 5 n=1
n

What function has the MacLaurin series 1 + x + x2 + x3 + x4 + x5 + · · · . [Hint:


If you modify the derivative on part 3 slightly, you should get this.]

1
Problem 8.12 In the last problem you showed that = 1 − x + x2 −
1+x
x3 + x4 − x5 + · · · . Let’s obtain the MacLaurin series for arctan x.
1. Compute the first 3 derivatives of f (x) = arctan x. Use this to obtain the
third degree Taylor polynomial of arctan x, centered at x = 0.
1 1
= arctan x. Replace each x with x2 in
R
2. We know that 1+x2 dx =
1+x
2 3 4 5
1 − x + x − x + x − x + · · · , and then integrate to obtain a power series
for arctan x. Write your answer with summation notation. Does it match
your first answer?
CHAPTER 8. POWER SERIES 114

3. We know that arctan(1) = π/4. Plug in x = 1 to the 15th degree


polynomial to obtain an approximation of π. If you have software, put
x = 1 into the 1000th degree polynomial to obtain an approximation for
π. Don’t forget to multiply by 4, as arctan(1) = π/4.

Problem 8.13 Let’s solve the IVP (x2 + 1)y 0 = 1, y(0) = 0 in two ways.

X
1. Use the power series method. Let y = an xn , compute y 0 , plug these
n=0
into the ODE, collect coefficients of the same powers of x, and then solve
for the unknowns an .
2. Use separation of variables.
Compare your solution here with the previous problem.

Problem 8.14 Solve the ODE y 0 + 2xy = 0 by using power series. Your
initial condition will just be y(0) = a0 . After you have a solution, look at the
table of known power series and try to match the solution you got to one of our
known power series (you might have to replace x with something). Then use
separation of variables to solve the ODE, and check if you are correct.

In the previous problem, the power series solution results in a series that we
can match with a series we already recognize. We might have to replace x with
x2 , but the power series is still quite manageable. Things won’t always be this
nice.
Problem 8.15 Solve the ODE y 00 + 2xy 0 + y = 0 by using power series. Your
initial conditions are y(0) = a0 and y 0 (0) = a1 . When you’re done, write your
solution as You won’t find either y1 or y2 on
y(x) = a0 (y1 (x)) + a1 (y2 (x)) the list of power series we
recognize.
where y1 and y2 are power series. Just give the first 4 terms of y1 and y2 ,
together with a rule that would allow us to compute more terms if needed (so
how could I find a10 if I knew a8 and a9 , or better yet, how could I find an+2 if
I knew an and an+1 ).

The next problem suggests a sigma notation way to solve all the power
series problems. Some of you will immediately recognize the value of using this
approach, and start using it exclusively. Some of you would rather not use this
approach. I’m fine either way, though by the end of the chapter you’ll see the
need for this approach.
Problem 8.16 Complete each of the following:
6
X 3
X
2
1. Compute both (n − 3) and s2 . Which is easier?
n=4 s=1

10
X
2. Consider the sum xn−2 . If we let s = n − 2, then rewrite the sum as
n=3
?
X
xs (find the ?). Check your answer by writing out the first few terms,
s=?
and the last term, of both series. We call this index shifting.
CHAPTER 8. POWER SERIES 115


X
3. Rewrite the sum n(n − 1)xn−2 so that xn−2 is replaced with xs (i.e.
n=2
let n − 2 = s and then shift the index). Check you are correct by writing
out the first few terms of both.

Let’s introduce this method with a problem you’ve already solved using
power series.

Problem 8.17 Consider the ODE y 00 + 4y = 0. We know the solution is


y(x) = A cos(2x) + B2 sin(2x). However, let’s solve this using power series,
X∞
summation notation, and index shifting. We start by assuming y = an xn .
n=0

1. Compute both y 0 and y 00 using summation notation. Show that the second
derivative is

X ∞
X ∞
X
00 n−2 n−2
y = n(n − 1)an x = n(n − 1)an x = n(n − 1)an xn−2 .
n=0 n=1 n=2

Why can we allow the sum to start at 0, 1, or 2? We’ll most often have it
start at 2.
2. Plugging our sums into the ODE y 00 + 4y = 0 gives the equation

X ∞
X
n(n − 1)an xn−2 + 4 an xn = 0.
n=2 n=0

If all the powers of x in this equation were the same, we could easily collect
the coefficients of like powers of x. So let s = n − 2 for the first sum, and
let s = n for the second sum. Rewrite your summation formula now in
terms of s, giving

X ∞
X
?a? xs + 4as xs = 0 + 0x + 0x2 + · · · .
s=? s=0

3. When s = 0, we obtain the coefficients in front of x0 in both sums. Use


this to show a2 = − 42 . Let s = 1 to show a3 = − 3·2
4
. [Remember that
right hand side is zero.]
4
4. For any s ≥ 0, show that as+2 = − (s+2)(s+1) as . This is called a recurrence
relation. Then let s = 2, 3, 4, 5, 6, . . . to rapidly find a4 , a5 , a6 , . . ..
5. Write your solution for y in the form y = a0 (y1 ) + a1 (y2 ), where y1 and
y2 are power series. Show the first 4 terms of each series.

Let’s now solve a problem that we’ve never tackled before.

Problem 8.18 Consider the ODE y 00 + 2xy = 0. Solve this ODE using a
X∞
power series. We start by assuming y = an xn .
n=0

1. Compute y 0 and y 00 as you did in the previous problem. Plug them into
your ODE and obtain an equation with sigma notation. Your powers of x
will not match, so we index shift.
CHAPTER 8. POWER SERIES 116

2. Your left sum should have an n − 2 as a power of x. Your right sum should
have an n + 1. Let’s shift n − 2 to become s + 1. So in the left sum, let
n − 2 = s + 1, and then write your equation in the form

X ∞
X
?a? xs+1 + 2as xs+1 = 0 + 0x + 0x2 + · · · .
s=? n=0

3. When s = −1, the left sum should contribute a term, but the right sum
does not. Use this to find a2 .
4. When s ≥ 0, both sums contribute a term. Give a formula for as+3 in
terms of as (called a recurrence relation). Use this formula to compute a3 ,
a4 , a5 , a6 , a7 , a8 .
5. Write out the first 6 nonzero terms of your series solution.

Did you notice the pattern in the previous two problems? We assume y is
a power series. We then differentiate the series and plug in the derivatives to
our ODE. We then index shift so that each sum has the same power above x.
Often, it’s easiest if you index shift so that the lowest ones all match the largest.
Once the powers all match, we can start finding coefficients. If one series starts
at a different spot than another, we take care of those cases first. Once we start
getting a term from each series, we obtain a recurrence relation and use it to
get an for as many n as we want. Then we can write out as many terms of the
solution as requested.

Problem 8.19 Consider the ODE y 00 + 3xy 0 + 2y = 0. Solve this ODE using
power series methods. Write your answer by give the first 8 nonzero terms of
the series, and make sure you state a recurrence relation that will give more
coefficients of the series. [Hint: You’ll probably need to use s = n − 2 for one
series, and s = n for the others.]

Problem 8.20 Consider the ODE (1 + x3 )y 00 + 3x2 y 0 + 2xy = 0. Solve this


ODE using power series methods. Write your answer by give the first 6 nonzero
terms of the series. State a recurrence relation that will give more coefficients of
the series. What is a62 , the coefficient in front of x62 ? [Hint: I’d let s + 1 = n − 2
somewhere above.]

8.2 Radius of Convergence


You’ve now seen the power series technique used to solve many problems.
Sometimes the power series does a good job of approximating the function.
Sometimes, it does a really bad job. How can we determine the difference
between when a power series does a good job, and when it does a bad job?
That’s the content of this section.
Problem 8.21: Geometric Series Consider the infinite series This series is called a geometric
series. You can obtain the next

X terms in the series by multiplying
a + ar + ar2 + ar3 + ar4 + · · · + arn + · · · = arn . by the common ration r.
n=0
CHAPTER 8. POWER SERIES 117

If we add up the first k terms, we obtain the kth partial sum


k−1
X
Sk = a + ar + ar2 + ar3 + ar4 + · · · + ark−1 = arn .
n=0

Our goal on this problem is to determine for which a and r we can compute the
limit as k → ∞ of the partial sums, and obtain a value.
k
1. Show that Sk = a(1−r )
1−r . [Hint: Consider the difference sk − rsk . Just
write out each. Lots should cancel.]
2. Compute lim Sk . For which a and r does this limit exist, and for which
k→∞
does it not exist. Explain.
3. We have seen the power series given by

1 + x + x2 + x3 + x4 + · · · .

If we want to know what this infinite sum approaches, we could compute


the partial sums and then find the limit of the partial sums. The partial
sums are S1 = 1, S2 = 1 + x, S3 = 1 + x + x2 , etc. What is the limit as
k → ∞ of these partials sum? For which x does this limit not exist? [Hint:
What are a and r from part 2. You already did this in part 2.]

We now have a way to determine the sum of an infinite series. We just look
at the partial sums, and then compute their limit (provided it exists). This
means we can go back to all the power series we created and ask, “Which of
these power series actually have sum that matches the function we started with.”
Let’s make some definitions.
Definition 8.4: Converges and Diverges. Consider the infinite series

X
b0 + b1 + b2 + b3 + b4 + · · · = bn .
n=0

• The kth partial sum of this series is the sum of the first k terms. So we
have S1 = b0 , S2 = b0 + b1 , S3 = b0 + b1 + b2 , etcetera.
• We say the series converges if lim Sk exists. In this case, we say the series
k→∞
converges to this limit.
• We say the series diverges if lim Sk does not exist.
k→∞

This next problem helps you discover the Ratio test, which is one of the
most powerful tests for determining if a power series converges or diverges.

Problem 8.22 Consider again the geometric series



X
a + ar + ar2 + ar3 + ar4 + · · · + ark + · · · = ark .
k=0
P∞
1. If we write this series in the form k=0 bk , then what is bk ? Then For the geometric series, the
bk+1 number r is called the common
compute the quotient and explain why the series converges precisely ratio.
bk
bk+1
when < 1.
bk
CHAPTER 8. POWER SERIES 118

2. Consider now the infinite series


 2  3  n ∞  n
21 2 1 2 1 2 −1 X
2 −1
−1 + 2 −3 + ··· + n + ··· = n .
2 2 2 2 n=1
2

bn+1
for n = 1, 2, 3, and then show lim bn+1 = 1 .

Compute
bn n→∞ bn 2
3. Do you think this series will converge or diverge? Use the Mathematica As me in class to show you how to
code “Sum[n^2*(-1/2)^n, {n, 0, 10}] // N” to examine the 10th partial obtain this result exactly, by
taking derivatives of known power
sum, and then the 20th, and so on. Does the series appear to converge or series.
diverge?

If you’ve forgotten how to compute limits, use this to review.

Review Compute each of the following limits.

3n2 + 5n + 4 (1/2)2(n+1) 1/(n + 1)!


1. lim 2. lim 3. lim
n→∞ 2n2 + 8n + 7 n→∞ (1/2)2n n→∞ 1/n!

See1 for answers.

We’ll generalize the problem above into a powerful test used to determine
when a power series converges or diverges.

Theorem 8.5 (The Ratio Test). Consider the infinite series



X
b0 + b1 + b2 + b3 + b4 + · · · = bn .
n=0

bn+1
Compute the limit L = lim
, which represents the limiting ratio of
n→∞ bn
consecutive terms.
• If the ratio L is smaller than 1, then the terms in the series eventually
start shrinking so quickly that the series converges.
• If the ratio L is greater than 1, then the terms in the series eventually
start growing so quickly that the series diverges.
• If the limit L does not exist, or if the limiting ratio is 1, then the ratio
test fails.
1

1. The polynomials have the same degree, so you just have to divide their leading
coefficients. This gives the limit as 32 .
2. We compute
(1/2)2(n+1) (2)2n (2)2n (2)2n 1
2n
= = 2n+2
= = .
(1/2) (2)2(n+1) (2) (2)2n 22 4
Computing a limit gives 1/4.
3. We write
1/(n + 1)! (n)! n(n − 1) · · · 3 · 2 · 1 1
= = = .
1/n! (n + 1)! (n + 1)n(n − 1) · · · 3 · 2 · 1 n+1
The limit is 0.
CHAPTER 8. POWER SERIES 119

The ratio test basically says that as long as the ratio of consecutive terms
eventually stays below 1, then the series will converge. So if we have a power

X
series of the form an xn , then all we need to do is find for which x we have
n=0

an+1 xn+1

lim < 1.
n→∞ an xn

Problem 8.23 For each power series below, use the ratio test to determine
for which x the series with converge.
∞ ∞ ∞ ∞
X n2n n X (−1)n n X 3n 2n X n! n
1. x 2. x 3. x 4. x
n=0
3n+1 n=0
n! n=1
n2 4n n=0
10n

Each answer above should result in an interval, or single point, which we


call the interval of convergence. If the interval of convergence is (−3, 3), then
we say that the radius of convergence is R = 3. If the interval is (−∞, ∞), then
the radius of convergence is R = ∞. If you ended up with a single point, then
the radius is R = 0. The radius of convergence is half the width of the interval
of convergence.
Definition 8.6: Interval and Radius of Convergence. Analytic versus

X
Singular. Consider the power series an (x − c)n centered at x = c.
n=0

• The values of x for which the series converges is called the interval of
convergence. This interval may be the single point x = c, or it will be an
interval of real numbers whose center is at x = c, or it may be all real
numbers.
• The radius of convergence is half the width of the interval of convergence.
• We say that a function is analytic at x = c if it has a power series
representation centered at x = c with a nonzero radius of convergence. If
a function is not analytic at x = c, then we say the function is singular at
x = c.
Problem 8.24 Find the interval and radius of convergence for each power Make sure you read the definition
series below. Is the function analytic or singular at x = c. above. This problem has the exact
same instructions as the the
∞ ∞ previous, rather it just uses the
X n2 + 1  x 2n X n new vocabulary from the
1. ,c=0 3. (2n)! (x − 1) , c = 0 definition above.
n=0
n+2 3 n=0

∞ ∞
X 1 n
X 4n
2. (x − 2) , c = 2 4. n (2x − 3) , c = 3/2
n=0
n n=0

Problem 8.25 Find the radius of convergence of the MacLaurin series for
each of the following functions.
CHAPTER 8. POWER SERIES 120

1. cos x 2. e3x 3. arctan(x) 4. ln(1 + 2x)

8.3 Special Functions


We’ve seen the power series method work for many problems now where the
coefficients are not constants. Will this method work for every problem with
variable coefficients? No. Why would it fail? Let’s considering a few more power
series problems, and discover why it would fail. For some, the power series
method will work. For others, it will not. By the time we’re done with this
section, we’ll know what to look for. It all has to do with certain coefficients
being analytic at x = 0.

Problem 8.26: Legendre Polynomials Consider the ODE Legendre’s ODE is


(1−x2 )y 00 −2xy 0 +(n)(n+1)y = 0.
(1 − x2 )y 00 − 2xy 0 + 20y = 0.
This ODE shows up when solving
1. Use the power series method to solve this ODE. Give all the coefficients Laplace’s equation in spherical
coordinates (studying heat, waves,
up to a6 . What is a20 ? gravity, and/or electric/static
potentials). When n is an integer,
2. Write your solution in the form y(x) = a0 y1 (x) + a1 y2 (x). If y(0) = 1 and one of the solutions will terminate
y 0 (0) = 0, what is the solution? in a polynomial of degree n.
These polynomials are called
3. Now solve the IVP (1 − x2 )y 00 − 2xy 0 + 6y = 0, y(0) = 0, y 0 (0) = 1. Show Legendre polynomials.
that the solution is a polynomial.

As in the problem above, sometimes the power series method gives you a
polynomial, because the series stops. In the next problem, the power series
method will fail, but you should find that with a slight modification (multiply
the power series by xλ ), you quickly get two solutions that each have only one
term. The entire solution should then be a linear combination of these two
solutions.
Review Suppose that a 2nd order homogeneous ODE has a solution y1 (x) =
e−3x . Suppose that another solution is y2 (x) = e−2x . State a general solution
to this ODE. See 2 .

Problem 8.27: Euler-Cauchy Equation Consider the ODE Any ODE of the form
ax2 y 00 + bxy 0 + cy = 0, where
a, b, c are constants, is called an
2x2 y 00 + 5xy 0 + y = 0. Euler-Cauchy ODE.

X
1. Let’s first try the power series, so suppose y = a0 xn . Compute both
n=0
derivatives and plug them into the ODE. Use this to explain why the only
solution that the power series method will get you is y = 0.
2. Earlier in the semester we noticed that sometimes to get a solution, we Frobenius suggested that we
multiply a power series by xλ to
2 If the ODE is homogeneous, then the solution is a linear combination of two linearly get a solution. He also gave
independent solutions, namely conditions on the ODE that state
y(x) = c1 e−3x + c2 e−2x . when this method is needed, and
when it will succeed.
The solutions y1 and y2 are linearly independent, because the only solution to c1 e−3x +
c2 e−2x = 0 is c1 = c2 = 0. This is because it is impossible to write one of the functions
as a multiple of the other. We obtain solutions by summing together linearly independent
solutions.
CHAPTER 8. POWER SERIES 121

had to multiply by a power of x. Let’s see if this works with power series
as well. Suppose instead that

X ∞
X
y = xλ a 0 xn = a0 xn+λ .
n=0 n=0

Compute both derivatives and plug them into the ODE. Make sure you
explain why you cannot change your sum so that it starts at n = 1, as we
did in the power series method. With each derivative, your sums will still
start at 0.
3. If n = 0, you should get that either a0 = 0, or that a polynomial equals
zero. If we set this polynomial equal to zero, we call the corresponding
equation the indicial equation. Find the values of λ that solve the indicial
equation. You should get two values for λ. Let’s call the largest value λ1 ,
and the smallest value λ2 .
4. If you replace each λ with λ1 , show that an = 0 for every n ≥ 1. Then
repeat with λ = λ2 and show that an = 0 for n ≥ 1.
5. You should now have two solutions to this ODE. Use the superposition See Problem 5.20 if you forgot the
principle to state a solution to the ODE. Make sure you check your work superposition principle. You can
check your work with
with the link to WolframAlpha, or use Mathematica. Mathematica, or here’s a link to
WolframAlpha.
Why did the power series method fail in the previous problem? The answer
lies in a quick computation. If we take the ODE 2x2 y 00 + 5xy 0 + y = 0 and divide
by the leading coefficient of y 00 , we obtain
5 0 1
y 00 + y + 2 y = 0.
2x 2x
5 1
The coefficients of the ODE, namely and are now not defined at x = 0,
2x 2x2
hence not analytic at x = 0. To guaranteed that the power series method will
succeed and give the entire general solution, these coefficients must be analytic
at x = 0. Let’s try one more, and then introduce some vocabulary.
Problem 8.28: Bessel Equation Consider the ODE

x2 y 00 + xy 0 + (x2 − 9)y = 0.
1. Rewrite the ODE so that the coefficient in front of y 00 is a one. Then state
the other coefficients, and show that they are not analytic at x = 0. [Hint:
See the previous paragraph.]
2. Since the power series method may not give both solutions, let’s multiply
the series by xλ (Frobenius’s idea) and suppose that

X ∞
X
y = xλ a 0 xn = a0 xn+λ .
n=0 n=0

Compute both derivatives and plug them into the ODE. Multiply the
coefficients x2 , x, and x2 − 9 into the sums, splitting the x2 − 9 product
into two sums. You’ll want to index shift one sum, as you’ll have an
xn+λ+2 in one spot.
3. When n = 0, the equation (with coefficients a0 ) gives you the indicial
equation. Show that λ = ±3. We’ll let λ1 = 3 and λ2 = −3. Frobenius
always chose λ1 to be the larger of these roots.
CHAPTER 8. POWER SERIES 122

4. Let λ = 3, and then solve for the other coefficients a1 , a2 , a3 , a4 , etc.


State the solution, making sure to list the first 4 nonzero terms.
5. If you let λ = −3, show that all the coefficients are zero.

In the previous problem, we were only able to obtain one solution y1 to the
ODE. Frobenius showed how to obtain another linearly independent solution,
and gave an algorithm for obtaining that solution. If the roots of the indicial
equation have a difference that is not an integer, then our current method will
give the second solution. However with Bessel’s equation above, we got the
roots to be ±3, which differ by the integer 6. This is why we did not find a
second solution. You are welcome to study this topic more on your own, if and
when you need it.
Let’s now focus on when we should use the power series method, and when
we should use the Frobenius method. Let’s introduce some vocabulary, and
state some facts without proof.
Definition 8.7: Ordinary, Singular, Regular Singular. Consider the ODE
y 00 + b(x)y 0 + c(x)y = 0.
Notice that the coefficient in front of y 00 is one. Some people call this form of an
ODE the standard form.
• As a reminder, we say that a function is analytic at x = c if it has a power
series solution centered at x = c with a positive radius of convergence.
Polynomials, exponentials, trig function, and rational functions whose
denominator is not zero at x = c are all analytic.
• If b(x) and c(x) are both analytic at x = 0, then the solution y to the
ODE is analytic. We say that x = 0 is an ordinary point of the ODE. The
power series method will yield a complete solution.
• If either b(x) or c(x) are not analytic at x = 0, then we say that x = 0 is
a singular point of the ODE. The power series method is not guaranteed
to work. You can try it, and you might get lucky.
• If x = 0 is a singular point, and both xb(x) and x2 c(x) are analytic, then
we say x = 0 is a regular singular point of the ODE. We can use the
Frobenius method to solve ODEs at regular singular points. The big idea
X∞
is to guess a solution of the form y = xλ an xn and then solve for λ
n=0
and the remaining coefficients as in the power series method.
• The indicial equation is the first equation resulting from matching coeffi-
cients in the Frobenius method. It’s roots λ1 and λ2 are sometimes called
the exponents of the ODE.
We could also define ordinary, singular, and regular singular points at x = c by
considering power series representations centered at x = c instead of x = 0.
The next problem asks you to use the vocabulary above to determine which
method you should use to solve the ODE.
Problem 8.29 For each ODE, write the ODE in standard form. Then
determine if the point x = 0 is an ordinary point or a singular point. If it is an
ordinary point of the ODE, determine if it is a regular singular point. To solve
the ODE, should you use the power series method, the Frobenius method, or
neither?
CHAPTER 8. POWER SERIES 123

1. x2 y 00 + xy 0 + (x2 − v 2 )y = 0 where v is a constant.


2. x2 y 00 + ax3 y 0 + x2 ebx y = 0 where a and b are constants.
3. x2 y 00 + cy 0 + xn y = 0 where c is a constant, and n is a positive integer.
d
(1 − x2 )y 0 = −λy where λ is a constant. [Hint: Use the product rule Ask me in class about how this

4.
dx relates to eigenvalues and
to expand the derivative. Then write the ODE in standard form.] Legendre’s equation.

Let’s end this section with one final problem. In this problem, the difference
between the roots of the indicial equation will

Problem 8.30 Consider the ODE

8x2 y 00 + 10xy 0 + (x − 1)y = 0.

1. Show that x = 0 is a regular singular point of this ODE.

2. State the indicial equation, and obtain the zeros. You should have λ1 = 1/4.
What is λ2 ?
3. When λ = λ1 , obtain the first 3 nonzero terms of the solution, which we’ll The Mathematica technology
call y1 . introduction will help you check
your work. Just look in the
4. When λ = λ2 , obtain the first 3 nonzero terms of the solution, which we’ll Special Functions section.
call y2 .
5. State the general solution to this ODE.

There are a lot of special functions that we have not even touched on. You
could spend years studying all the special functions that have already been
discovered and classified. This section gave you an introduction to the techniques
needed to solve these ODEs.

8.3.1 The Gamma Function


We’ll end this chapter with one last special function, the Gamma function Γ(x). The symbol Γ is the uppercase
This function generalizes the factorial. We’ve already learned that the Laplace greek letter Gamma. That’s why
n! we capitalize the “G” in the
transform of tn is L {tn } = n+1 . This formula only works if we require n to be Gamma function.
s √
an integer. So what about the Laplace transform of something like t? Once
we’ve defined the Gamma function, we’ll have the formula

Γ(n + 1)
L {tn } = .
sn+1
Definition 8.8: The Gamma Function Γ(t). We define the Gamma function
to be Z ∞
Γ(t) = xt−1 e−x dx.
0
R∞
As x is a dummy variable, we could have also written Γ(t) = 0
pt−1 e−p dp or
R∞
Γ(x) = 0 px−1 e−p dp.

Problem 8.31 Do the following:


1. Show that Γ(1) = 1. You are welcome to skip to the last part right now.
CHAPTER 8. POWER SERIES 124

2. Show that Γ(2) = 1 and that Γ(3) = 2.


3. Compute Γ(4) and then make a conjecture for Γ(5), Γ(6), and Γ(7). Use
software to check if you are correct.
4. Now show that for any n, we know that Γ(n + 1) = nΓ(n). Now use this
rule to repeat parts 2 and 3 above.

The Gamma function is a generalization of the factorial function. In order


to evaluate the gamma function at non integers, we would need to compute the
integral that defines the Gamma function. This is in general a very nontrivial
task. The next problem shows you how to do this. If you’ve forgotten how to
√ √
Problem 8.32: Γ(1/2) = π In this problem we’ll prove that Γ(1/2) = pi.
First, notice that by definition we have
Z ∞
Γ(1/2) = x−1/2 ex dx.
0

1. Let u = x1/2 . Use this u-substitution to explain why


Z ∞ Z ∞
2
Γ(1/2) = x−1/2 e−x dx = 2 e−u du = 2I.
0 0
R∞ 2
If we could compute the integral I = 0 e−u du, we’d be done. There is
no way however to compute this integral exactly, unless we employ higher
dimensional tools.

2. Explain why we can write


Z ∞ 2 Z ∞ Z ∞ Z ∞ Z ∞
−u2 −x2 −y 2 2
+y 2 )
2
I = e du = e dx e dy = e−(x dxdy.
0 0 0 0 0

3. Convert this integral to a double integral in polar coordinates (what is


the Jacobian) and then evaluate the integral. This gives you I 2 . Solve for
Γ(1/2).


Problem 8.33 We know that Γ(1/2) = π, and we know that Γ(n + 1) =
nΓ(n). Use this to compute Γ(3/2), Γ(5/2), and Γ(11/2). Then state the
Laplace transform of t9/2 . [Hint: You may have to repeatedly apply the rule
Γ(n + 1) = nΓ(n), as we have 3/2 = 1/2 + 1, and 5/2 = 3/2 + 1, and so on.]
CHAPTER 8. POWER SERIES 125

8.4 Extra Practice Problems


Extra homework for this unit is right here. Make sure you try a few of each type of problem, ASAP. I suggest
that the first night you try one of each type of problem. It’s OK if you get stuck and don’t know what to do,
as long as you decide to learn how to do it and then return to the ones where you got stuck. Eventually do
enough of each type to master the ideas. The only section in Schaum’s with relevant problems is chapter 27.
Handwritten solutions are available online. Click for solutions.
Most engineering textbooks assume you have seen Taylor series and power series before (in math 113),
but many of you have not. If you have your old Math 215 book, you can find many relevant problems and
explanations in the section on the Ratio Test and Taylor Series.
Here are a few key functions and their Taylor series centered at x = 0 (their MacLaurin series).

f (x) MacLaurin Series Radius f (x) MacLaurin Series Radius


∞ ∞
X 1 n 1 X
ex x R=∞ xn R=1
n=0
n! 1−x n=0
∞ ∞
X (−1)n 2n X 1
cos(x) x R=∞ cosh(x) x2n R=∞
n=0
(2n)! n=0
(2n)!
∞ ∞
X (−1)n 2n+1 X 1
sin(x) x R=∞ sinh(x) x2n+1 R=∞
n=0
(2n + 1)! n=0
(2n + 1)!

(I) For each of the following, find a Taylor poly- 17. f (x) = ex 1
21. f (x) =
nomial of degree n centered at x = c of the 1+x
18. f (x) = cos x
function f (x).
19. f (x) = sin x 22. f (x) = cosh x
1
1. e4x , n = 3, c = 0 5. x, n = 3, c = 1 1
20. f (x) = 23. f (x) = sinh x
1−x
2. cos(x), n = 4, c = π 6. ln x, n = 3, c = 1
(IV) Prove the following formulas are true by consid-
3. cos(2x), n = 4, c = 0 7. ln(1 − x), n = 4, c = 0
ering power series. These formulas will allow us
4. sin( 21 x), n = 5, c = 0 8. ln(1 + x), n = 4, c = 0 to eliminate complex numbers in future sections.

24. eix = cos x + i sin x (called Euler’s formula)


(II) Find the radius of convergence of each power
series. 25. cosh(ix) = cos x 27. sinh(ix) = i sin x

∞ ∞ 26. cos(ix) = cosh x 28. sin(ix) = i sinh x


X 1 n X (−4)n n 2n
9. x 13. x
n=0
3n n=0
n2 + 1 (V) Use MacLaurin series of known functions to
∞ ∞ find the MacLaurin series of these functions (by
X (−1)n n X n 2n integrating, differentiating, composing, or mul-
10. x 14. x
n=0
4n+1 n=0
2n
tiplying together two power series). Then state
∞ ∞
the radius of convergence.
X n 3n X (−1)n n
11. x 15. x 29. f (x) = x2 e3x
n=0
2n n=0
n!
x2
X∞
3n + 1 n X∞
n! 2n 30. f (x) = e3x [hint, use negative exponents]
12. x 16. x
n=0
n2 + 4 n=0
10 n
31. f (x) = cos 4x

32. f (x) = x sin(2x)


(III) For each function, find the MacLaurin series and
x
state the radius of convergence. 33. f (x) = 1+x
CHAPTER 8. POWER SERIES 126

34. f (x) = 1
1+x2 43. y 0 = 3y
35. f (x) = arctan x [hint, integrate the previous] 44. y 0 = 2xy
36. f (x) = arctan(3x)
45. y 00 + 4y = 0
(VI) Shift the indices on each sum so that it begins
at n = 0. 46. y 00 − 9y = 0, y(0) = 2, y 0 (0) = 3

6 ∞
X 47. y 00 + 4y 0 + 3y = 0, y(0) = 1, y 0 (0) = −1
n
X
37. n+2 40. x
n=3 n=2 (VII) Determine whether the given values of x are
ordinary points or singular points of the given
8 ∞
X ODE.
nan xn
X
38. n2 41.
n=2 n=1 48. Chapter 27, problems 26-34 (these are really

X ∞
X quick).
39. 2n 42. n(n − 1)an xn−2
n=4 n=2
(VIII) Solve the following ODEs by the power series
method. State the recurrence relation used to
(VII) Solve the following ODEs by the power series generate the terms of your solution, and write
method. With some, initial conditions are given out the first 5 nonzero terms of your solution.
(meaning you know y(0) = a0 and y 0 (0) = a1 ).
Identify the function whose MacLaurin series 49. Chapter 27, problems 35-47 (or from the worked
equals the power series you obtain. problems).

8.5 Extra Practice Solutions


Handwritten solutions are available online. Click for solutions.

8.6 Special Functions


Here are some extra practice problems related to the Frobenius method and other special functions. Section
numbers correspond to problems from Schaum’s Outlines Differential Equations by Richard Bronson. The
suggested problems are a minimum set of problems to attempt.

Concept Relevant Problems


Frobenius Method* 28:1-4, 5-10, 12,14,16,18-20
Legendre Polynomials 27:11-13; 29:4,6,8,11,12,15
Bessel Functions 30:9,11,12,26, 27,
Gamma Functions 30:1-8, 24, 25
Substitutions 28:22-23, 34-38; 30:30,31

Click here for some handwritten solutions to many of the problems above.
CHAPTER 8. POWER SERIES 127

8.7 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
Chapter 9

Systems of ODEs

This chapter covers the following ideas. When you create your lesson plan, it
should contain examples which illustrate these key ideas. Before you take the
quiz on this unit, meet with another student out of class and teach each other
from the examples on your lesson plan.

1. Explain the basic theory of systems of linear ODEs and the Wronskian for
systems.
2. Convert higher order ODEs to first order linear systems.
3. Explain how to use eigenvalues and eigenvectors to diagonalize matrices.
When not possible, use generalized eigenvectors to find Jordan canonical
form.
4. Find the matrix exponential of a square matrix, and use it to solve linear
homogeneous and nonhomogeneous ODEs.
5. Give applications of systems of ODEs. In particular be able to setup
systems of ODE related to dilution, electricity, and springs (use the
computer to solve complex systems).

9.1 Bringing it all together


As you work on the problems in this section, you’ll want to have a computer
algebra system near by. I’ll put some links to Sage worksheets in the problem set,
but I strongly suggest you download the Mathematica Technology Introduction.
Our goal in this chapter is to learn how to solve systems of differential
equations. We have already discussed most of the ideas in this chapter (in
some context), but we have never brought all these ideas together. In this
chapter, we’ll try to connect everything we have done up to now. By the time
we end this chapter, we’ll have a tool that will solve almost every problem we
have encountered. We’ll see how vector fields, parametric curves, eigenvalues,
eigenvectors, potentials, and power series all combine together to give a beautiful
and elegant solution technique to solving ODEs.

Problem 9.1 Consider the IVP y 00 + 3y 0 + 2y = 0, y(0) = 5, y 0 (0) = 0. This


solution to this ODE will give the position of a mass spring system where m = 1
kg, c = 3 kg/s, k = 2 kg/s2 , where the object was lifted upwards 5 cm and then
let loose.

128
CHAPTER 9. SYSTEMS OF ODES 129

1. This is a homogeneous ODE. What is the characteristic equation? State a


general solution, and then use the initial conditions to get the solution.
(This is review.)
2. Let y(t) be the position and v(t) be the velocity, so v(t) = y 0 (t). This
means v 0 (t) + 3v(t) + 2y(t) = 0. Notice that this is a first order ODE with
two different functions y and v that are unknown. Explain how to write
this as the matrix equation
 0   
y 0 1 y
= .
v0 −2 −3 v
 
0 1
3. Find the eigenvalues λ1 and λ2 of the coefficient matrix A = .
−2 −3
Then for each eigenvalue, find a corresponding eigenvector, which we’ll
call ~x1 and ~x2 .
4. Look back at your solution on part 1. Compute y 0 and write your solution
from part 1 in the form
     
y ? −t ? −2t
= e + e .
y0 ? ?

What is the connection between the solution to the ODE and eigenval-
ues/eigenvectors?
5. Suppose you needed to find a general solution to the system of ODEs
 0  
y y
= A ,
v0 v

and you knew the eigenvalues λ1 and λ2 and a corresponding eigenvector


for each. Make a guess for what a general solution to the ODE is.

Problem 9.2 Consider again the IVP y 00 + 3y 0 + 2y = 0, y(0) = 5, y 0 (0) = 0.


We already have the solution above. In this problem, you’ll be constructing
various graphs.
1. Construct of graph of y verses t and a graph of v versus t. You should Please check your answer with
have two graphs that show you position and velocity at any time t. technology. You can use either
Sage or Mathematica. Click on
2. Now construct a graph of v versus y. We could call this a velocity-position this link to get some example code
that will help you with this
graph. Please use technology to do this. You just need to graph the problem. You should use this code
parametric curve ~r(t) = (y(t), y 0 (t)). You’ll need to use a parametric to check your answer with the
plotter. previous problem.

3. The matrix A represents a vector field F~ (y, v) = (0y + v, −2y − 3v).


Construct a graph of this vector field in the yv plane.
4. Put your vector field plot, and your velocity-position plot, on the same set
of axes. What does the vector field plot tell you about the velocity-position
plot?
5. Change the initial conditions to y(0) = 0 and v(0) = 5. On top of your Just change the initial conditions
vector field plot, draw what you think the solution should look like in the in either Sage worksheet or
Mathematica notebook, and
velocity-position plot. Then use software to solve the ODE, and plot your reevaluate.
solution.
CHAPTER 9. SYSTEMS OF ODES 130

6. Change the initial conditions to y(0) = 5 and v(0) = −5. On top of your
vector field plot, draw what you think the solution should look like in the
velocity-position plot. Explain why the solution must follow a straight
line in the velocity-position plane? [Hint: What are the eigenvalues,
eigenvectors?] Then state another set of initial conditions where the
solution will be a straight line towards the origin.

We’ll revisit the last two problems as part of every other solution find. Let’s
introduce a new type of application that shows us the need for linear systems of
ODEs.

Problem 9.3 Imagine for a moment that you have two tanks. The first tank
contains 6 lbs of salt in 10 gallons of water. The second tank contains no salt
in 20 gallons of water. Each tank has an inlet valve, and an outlet value. We
attach hoses to the tanks, and have a pump transfer 2 gallon/minute of solution
from tank 1 to tank 2, and vice versa from tank 2 to tank 1. So as time elapses,
there are always 10 gallons in tank 1 and 20 gallons in tank 2. Our goal is to
find the amount of salt in each tank at any time t.
1. We know there are initially 6 lbs of salt in tank 1, and no salt in tank 2. If
we allow the pumps to transfer salt for enough time, explain why the salt
content in tank 1 will drop to 2 lb, and the salt content in tank 2 should
increase to 4 lbs.

2. Let y1 (t) and y2 (t) be the lbs of salt in tanks 1 and 2, respectively. Explain
why
2 2
y10 = − y1 + y2 .
10 20
3. Obtain a similar equation for y20 . Write your ODEs in the matrix form
 0   
y1 −2/10 2/20 y1
=
y20 ? ? y2

4. Draw the vector field represented by the coefficient matrix. Sketch the
solution (y1 (t), y2 (t)) to your IVP (start at the point (6, 0) and follow the
field until the vectors no longer tell you to move). Show that you should
stop at (2, 4).
5. Compute the eigenvalues and eigenvectors of the matrix A, and draw two Don’t forget that you can check
lines through the origin to represent the eigenvector directions. your work with technology. Please
following this link

Problem 9.4 Again consider the mixing tank problem from before, with
the system of ODEs
 0   
y1 −2/10 2/20 y1
= .
y20 ? ? y2

Our goal is to determine the amount of salt in each tank at any time t.
1. Compute the eigenvalues and eigenvectors of this matrix. Use them to
write a general solution to this system of ODEs. Your solution should
involve arbitrary constants c1 and c2 .

2. Use the initial conditions y1 (0) = 6 and y2 (0) = 0 to solve for c1 and c2 .
CHAPTER 9. SYSTEMS OF ODES 131

3. Construct a graph that contains the the vector field representing the Don’t forget that you can check
coefficient matrix and the parametric plot (y1 (t), y2 (t)) of your solution. your work with technology. Please
following this link

Problem 9.5 Two tanks are connected with hoses and pumps so that 3
gallons/second flows back and forth between the tanks. The first tank is a 60
gallon tank, with 2 lbs of salt inside. The second tank is a 90 gallon tank with
23 lbs of salt in it. Please find the amount of salt in each tank at any time t.
1. Write a linear system of ODEs in the form
 0  
y1 y
=A 1 .
y20 y2

whose solution will give the amount of salt in each tank at any time t.
2. Compute the eigenvalues and eigenvectors of A, and then write a general
solution to this system of ODEs. Your solution should involve arbitrary
constants c1 and c2 .
3. Use the initial conditions to solve for c1 and c2 .
4. Construct a graph that contains the the vector field representing the Don’t forget that you can check
coefficient matrix and the parametric plot ~y (t) = (y1 (t), y2 (t)) of your your work with technology. Please
following this link
solution.

Problem 9.6 Consider the linear system of ODEs given by y10 = 2y1 + y2
and y20 = 3y1 + 4y2 . Let ~y = (y1 , y2 ). We can write this ODE in the form
~y 0 = A~y , where ~y = (y1 , y2 ).
1. Find the eigenvalues and eigenvectors of the coefficient matrix A.
2. We know that we can write a general solution to this system of ODEs as

~y = c1 ~x1 eλ1 t + c2 ~x2 eλ2 t .

Find a 2 by 2 matrix Q so that we can write this solution in the form


 λt  
e 1 0 c1
~y = Q λ2 t = QD~c,
0 e c2
 λt 
e 1 0
where we have the diagonal matrix D = and the vector
  0 eλ2 t
c
~c = 1 .
c2
3. We now have ~y = QJ~c. When we let t = 0, explain why D equals the
identity matrix. This means that ~y (0) = Q~c. Using an inverse matrix, we
~
have ~c = Q−1 ~y (0). Compute the inverse of Q.
4. Since we know ~y = QJ~c and ~c = Q−1 ~y (0), this means

~y = QDQ−1 ~y (0).

You have found Q, D, and Q−1 . If we let y1 (0) = a and y2 (0) = b which
means ~y (0) = (a, b), then multiply out the matrix product QDQ−1 ~y (0)
and state the solution to this IVP.
CHAPTER 9. SYSTEMS OF ODES 132

Do you notice that in the problem above, we solved the linear system of
ODEs in the form ~y 0 = A~y with initial conditions ~y (0) by just writing

~y = QDQ−1 ~y (0).

The columns of Q were the eigenvectors. The nonzero entries of the diagonal
matrix D contain eλt where λ is an eigenvalue. Does this pattern work in other
places?
 
6 2
Problem 9.7 Solve the system of ODEs ~y 0 = A~y where A = . Do
2 3
so by stating Q, D, and Q−1 , and then perform the matrix product QDQ−1 .
Finally, if we assume ~y (0) = (a, b), then give the solution to this system of
IVPs by stating what y1 (t) equals, and what y2 (t) equals (hint, multiply out
QDQ−1 ~y (0) ). Please use technology to perform as much of the computations
as you want. Just be prepared to tell us how you got each part.

Does the pattern above continue to work if we increase the size of the matrix?
 
2 1 1
Problem 9.8 Solve the system of ODEs ~y 0 = A~y where A = 1 2 0.
0 0 4
Do so by stating Q, D, and Q−1 , and then perform the matrix product QDQ−1 .
Finally, if we assume ~y (0) = (a, b, c), then give the solution to this system of
IVPs by stating what y1 (t) equals, what y2 (t) equals, and what y3 (t) equals.
Please use technology to perform as much of the computations as you want.
Just be prepared to tell us how you got each part.

Does the pattern even work if the eigenvalues are complex?


 
0 0 1
Problem 9.9 Solve the system of ODEs ~y = A~y where A = .
−1 0
1. Find the eigenvalues by hand. Then for each eigenvalue, compute an
eigenvector by hand. State Q and D from this information. You are
welcome to use eit in your work as needed.
2. Compute Q−1 by hand. Then compute the product QDQ−1 by hand.
3. Use Euler’s formula eit = cos t + i sin t to simplify the product QDQ−1 .
You should be able to simplify the product to remove all complex terms.
4. If y1 (0) = 5 and y2 (0) = 7, then what are y1 (t) and y2 (t). Then use
software to check your answer. You should see that the solution in the
y1 y2 plane, along with the appropriate vector field, gives circular motion.

Problem 9.10 Suppose that d~ y


dt = A~ y is a linear system of ODEs. Also
suppose that ~y = ~xect is a nonzero solution to this system. Explain, using
the definition of eigenvalues and eigenvectors, why we must have that c is an
eigenvalue, and ~x is an eigenvector corresponding to c. [Hint: Look up the
definition of eigenvalues and eigenvectors. If you compute d~ y
dt and then place
both ~y and d~y d~
y
dt into the system dt = A~y , you should see the definition appear.]
CHAPTER 9. SYSTEMS OF ODES 133

9.2 The Matrix Exponential


In the previous section, we saw that if ~y 0 = A~y , then the solution is ~y = QDQ−1~c,
where the initial conditions give us ~c = ~y (0) because D is the identity matrix
when t = 0. In the first week of class, we solved the differential equation y 0 = ay,
and obtained the solution y = eat c where c = y(0). In this section, we’ll show
that if we replace the constant a with a matrix of constants A, then the solution
is still ~y = eAt~c. To do this, we have to go back to power series.

Definition 9.1: The Matrix Exponential. We showed in the power series


chapter that
1 2 1 1 1
ex = 1 + x + x + x3 + x4 + x5 + · · · .
2! 3! 4! 5!
We define the matrix exponential of A to be the series
1 2 1 1 1
eA = I + A + A + A3 + A4 + A5 + · · · .
2! 3! 4! 5!
The matrix I is the identity matrix.

Problem 9.11 Use the definition above to complete the following:


 
0 0 0
1. We know that e = 1. If A = O = , then compute eA .
0 0
   1 
1 0 e 0
2. If A = I = , show that eA = .
0 1 0 e1
 
2 0 0
3. If A = 0 3 0, then compute eA . Make sure you show how you get
0 0 5
your answer from the definition.
 
2t 0 0
4. If At =  0 3t 0 , then compute eAt . You are welcome to just state
0 0 5t
an answer here.

When a matrix is diagonal, it’s matrix exponential is simple to compute.


Our main goal is to learn how to compute the matrix exponential of all matrices.
Let’s look at another type of matrix where it’s easy to compute the matrix
exponential.

Problem 9.12: Nilpotent Matrices Use the definition of the matrix ex-
ponential to compute the following. We say that a matrix A is
  nilpotent if An is the zero matrix
0 t for some n. It’s easy to compute
1. Let At = and then compute (At)2 and (At)3 . Use this to state the the matrix exponential of a
0 0
nilpotent matrix, because the
matrix exponential of At. infinite series stops, and then we
  just have to add up finitely many
0 t 0 terms.
2. Let At = 0 0 t  and then compute (At)2 and (At)3 . Use this to state
0 0 0
the matrix exponential of At.
CHAPTER 9. SYSTEMS OF ODES 134
 
0 t 0 0
0 0 t 0
3. Let At =  . Give the matrix exponential of At. You are
0 0 0 t
0 0 0 0
welcome to guess your answer by following any pattern you saw above.
 
0 t 0 0 0
0 0 t 0 0
 
0 0
4. Let At =  0 t 0 . Guess the matrix exponential of At. You can check your answer with
0 0 0 0 t technology. Follow this link.
0 0 0 0 0

With real numbers, we have the exponential rule ea+b = ea · eb . The


exponential of a sum is the same as the product of an exponential. Does this
rule work with matrices as well? Let’s try it and see.
     
2t t 2t 0 0 t
Problem 9.13 Let’s write At = = + = Bt + Ct,
0 2t 0 2t 0 0
   
2t 0 0 t
where Bt = and Ct = .
0 2t 0 0
1. Use software to compute the matrix exponential of At. Follow this link. Please use this
calculator to check your answers
2. State the matrix exponentials of both Bt and Ct (use the patterns devel- on the other parts of this problem,
oped from the previous problems). We know that At = Bt + Ct, so how but only after you first do them
by hand.
should we combine eBt and eCt to get the matrix exponential of At?
 
3t t 0 0
 0 3t t 0 
3. Without software, state the matrix exponential of 
 0 0 3t t  .

0 0 0 3t

 
2t t 0 0 0
 0 2t 0 0 0 
 
Problem 9.14 Consider the matrix At =   0 0 2t t 0 . There is

 0 0 0 2t t 
0 0 0 0 2t
supposed to be a zero instead of a t in the second row. That was done on
purpose.
1. Write At as the sum At = Bt + Ct, where Bt is a diagonal matrix, and
Ct contains nonzero terms above the diagonal.
2. Compute the matrix exponential of both Bt and Ct. Then compute their
product to get eAt . Check your answer with software.
 
3t t 0 0 0 0 0 0 0 0
 0 3t t 0 0 0 0 0 0 0 
 
 0 0 3t t 0 0 0 0 0 0 
 
 0 0 0 3t 0 0 0 0 0 0 
 
 0 0 0 0 3t t 0 0 0 0 
3. Guess the matrix exponential of 
 0 0 0 0 0 3t 0 0 0 0 Check your answer with software.

 
 0 0 0 0 0 0 4t 0 0 0 
 
 0 0 0 0 0 0 0 4t t 0 
 
 0 0 0 0 0 0 0 0 4t t 
0 0 0 0 0 0 0 0 0 4t
CHAPTER 9. SYSTEMS OF ODES 135

We can now compute the matrix exponential of any matrix that is either
diagonal, or has nonzero entries above the diagonal. We’ll soon see that this
means we can compute the matrix exponential of every matrix. The key is to
first find the correct form.
 
2 4
Problem 9.15 Consider the matrix A = .
4 2
1. Find the eigenvalues of A. For each eigenvalue, find a corresponding
eigenvector.
2. Let Q be a matrix whose columns are the eigenvectors from the previous
part. Compute AQ by hand.

3. If ~x is an eigenvector, then by definition we must have A~x = λx. Use this If you’re struggling with guessing
to write AQ = QJ where J is a diagonal matrix. What is the matrix J? what J should be, then compute
Q−1 AQ. Then try to explain why
Show that Q−1 AQ = J, and that QJQ−1 = A. J should be what you see from the
equation AQ = QJ.
4. Now suppose that A is a matrix with eigenvalues 2 and 3 and corresponding
Did you notice on this last part
eigenvectors (1, 3) and (−1, 2). Use this to state Q, J, and A. that you could construct A solely
from knowledge about eigenvalues
and eigenvectors.

Problem 9.16 Suppose we know that A = QJQ−1 where J is a diagonal


matrix. In this problem, we’ll compute the matrix exponential of A.
1. Explain why Ak = QJ k Q−1 .
2. Use the definition of the matrix exponential to explain why eA = QeJ Q−1 .
 
2 1
3. The matrix A = has an eigenvalue 3 with corresponding eigenvector
1 2
(1, 1), and has an eigenvalue 1 with corresponding eigenvector (1, −1).
Compute the matrix exponential of A.
4. Solve the system of ODEs y10 = 2y1 + y2 and y20 = y1 + 2y2 . State y1 (t).

If we know how to compute the matrix exponential of J and A = QJQ−1 ,


then the previous problem showed us that exp(A) = Q exp(J)Q−1 . We also saw
that multiplication by t doesn’t affect this result, so we have

exp(At) = Q exp(Jt)Q−1 .

This is the key tool we’ll use to solve systems of ODEs.


d~y
Problem 9.17 Consider the system of ODEs = A~y given by
dt
 0   
y1 2 1 0 y1
y2  = 1 2 0 y2  .
y3 0 0 3 y3

1. For the coefficient matrix above, state Q and J. You should have a
repeated eigenvalue, but you should also find two linearly independent
eigenvectors corresponding to this eigenvalue.
2. Compute eAt , and state a general solution ~y (t).
CHAPTER 9. SYSTEMS OF ODES 136

3. If y1 (0) = 1, y2 (0) = −2, y3 (0) = 2, then state y1 (t), y2 (t), and y3 (t).

Problem 9.18 Consider the system of ODEs y10 = y2 and y20 = −9y1 − 6y2 .
d~y
1. Write this system in the form = A~y . Find the eigenvalues of A. State
dt
all the eigenvectors of A.
2. Why are there not enough eigenvectors to form an invertible matrix Q?
3. The system of ODEs above is equivalent to the ODE y 00 + 6y 0 + 9y = 0.
Explain why.
4. State a general solution to this ODEs using methods from before.

We’ve now seen two examples with repeated eigenvalues. Sometimes when
we see a repeated eigenvalue, we’ll be able to get enough linearly independent
eigenvectors to form an invertible matrix Q. In this case, we’ll be able to write
A = QJQ−1 where J is diagonal. If we can’t get enough linearly independent
eigenvectors, then we’ll have to do something else. We’ll show that we can
always write A = QJQ−1 , where the only nonzero terms off the diagonal are
perhaps a few 1’s directly above the diagonal. Luckily, we know how to compute
the matrix exponential of this kind of matrix. The matrices Q and J are called
a Jordan decomposition for A.

Problem 9.19 Consider again the system of ODEs y10 = y2 and y20 =
−9y1 − 6y2 .
1. We already know the only eigenvalue of the coefficient matrix is λ = −3.
To find the eigenvectors corresponding to λ = −3, we solve (A + 3I)~x = ~0.
Solve this system, and state the solution.
2. Because the eigenvalue λ = −3 was repeated, we were hoping to find
two linearly independent eigenvalues, but we did not. Instead of solving
(A − λI)~x = ~0, let’s solve (A − λI)2 ~x = ~0.
Find the solutions to (A − λI)2 ~x = ~0. Show by hand how to solve this
system, and state the solution as linear combination of two independent
vectors.
3. Pick a nonzero vector from the previous part that is not an eigenvector, and
call it ~v2 . Compute ~v1 = (A − λI)~v2 , and show that ~v1 is an eigenvector.
 
4. Let Q = ~v1 ~v2 . Compute
 by hand AQ and show that it equals QJ
−3 1
where J = .
0 −3

5. Now that we have Q and J, compute eAt . The solution to the ODE is
~y = eAt~c, which you can now compare with your previous problem.

In three previous problem, we considered the linear system of equations


(A − λI)2 ~x = ~0. This system produced an extra vector we could use to get an
invertible matrix Q. The solutions to this system provide us with what we now
call generalized eigenvectors.
Definition 9.2: Generalized Eigenvectors. The nonzero solutions to the
linear system (A − λI)1 ~x = ~0 are the eigenvectors of the matrix A.
CHAPTER 9. SYSTEMS OF ODES 137

1. If a vector ~x satisfies (A − λI)2 ~x = ~0 but does not satisfy (A − λI)1 ~x = ~0,


then we say that ~x is generalized eigenvector of order 2.
2. If a vector ~x satisfies (A−λI)k ~x = ~0 but does not satisfy (A−λI)k−1 ~x = ~0,
then we say that ~x is generalized eigenvector of order k.

Problem 9.20 Suppose that A has an eigenvalue λ and has a generalized


eigenvector of order 3 which we’ll call ~v3 . Let v2 = (A − λI)~v3 and ~v1 =
(A − λI)~v2 .
1. Explain why ~v1 is an eigenvector of A and ~v2 is a generalized eigenvector
of order 2.
 
2. Let T = ~v1 ~v2 ~v3 . Show that Remember that (A − λI)~v3 = ~v2 ,
so we know that A~v3 = λ~v3 + ~v2 .
How will this help you show what
 
λ 1 0
is asked for?
AT = T  0 λ 1 .
0 0 λ
 
3. Let S = ~v3 ~v2 ~v1 . Show that
 
λ 0 0
AS = S  1 λ 0 .
0 1 λ

Definition 9.3: Jordan Canonical Form. Let A be a square matrix. Suppose


that AQ = QJ, where Q is an invertible matrix and J is a matrix whose only
nonzero entries off the diagonal are potentially 1’s above the diagonal. If there
is a one in J above the diagonal, then the entries below and to the left of the 1
must be the same. Under these conditions, we call J a Jordan canonical form
for A.
The 1’s appear in Jordan canonical form precisely when
It is a theorem that every matrix A admits a Jordan canonical form. The
matrix Q consists of eigenvalues and generalized eigenvalues. Once we have a
Jordan canonical form for A, the matrix exponential of At is eAt = QeJt Q−1 .
 
2 1 1
Problem 9.21 Consider the matrix A = 1 2 0 . Our goal is to find a
0 0 3
Jordan canonical form for A by stating Q and J so that AQ = QJ.
1. Show that the eigenvalues of A are λ = 1 and λ = 3. The eigenvalue 3 is
repeated. Find an eigenvector corresponding to λ = 1, and call it ~u.
2. Solve (A − 3I)~x = ~0 to find the eigenvectors corresponding to λ = 3. We’re
hoping for two independent vectors, but show you only get one.
3. Now solve (A − 3I)2 ~x = ~0. Pick a solution that is not an eigenvector and
call it ~v2 . Then compute ~v1 = (A − 3I)~v2 .
4. The vectors ~u, ~v1 , and ~v2 need to be placed in matrix Q. How should
you place them? Make an educated guess, and then compute Q−1 AQ to
verify if it equals J. If it does not, then try a different order on Q. You
know you’ve got the right J when it’s almost diagonal with potentially a 1
above and to the right of a repeated eigenvalue.
CHAPTER 9. SYSTEMS OF ODES 138

Have you noticed the pattern for finding Jordan form? Find the eigenvalues.
Then find the eigenvectors. If you don’t have enough linearly independent eigen-
vectors, then you look for generalized eigenvectors of order 2. Continue finding
generalized eigenvectors as needed until you get enough linearly independent
vectors. When you select a higher order generalized eigenvector ~v , make sure
you compute (A − λI)k~v for k = 1, 2, ... and use those as your lower order vectors.
This will get you Jordan form. I’ll demo some of this in class.
We’ve shown that you can start with A, and from it determine Q and J. We
know AQ = QJ, which means if we had Q and J, we could obtain A. The next
problem starts with a Q and J. You’ll then obtain A. After obtaining A, we’ll
find another Q and J so that AQ = QJ. The Q and J are not unique.
   
2 1 0 0 1 0 2 −1
0 2 0 0
 and Q = 1 0 0 2 .
 
Problem 9.22 Let J =  0 0 3 0 0 1 1 −1 Use software to help you complete
this problem.
0 0 0 2 0 −1 0 0

1. Compute A = QJQ−1 (make sure you use software). Why are the eigen-
values of A equal to 2 and 3? What’s the multiplicity of each eigenvalue?
For each eigenvalue, give all possible eigenvectors. (Show the appropriate
matrices you would rref, state the rref, and then state the eigenvectors.)
2. The eigenvalue 2 shows up three times, but only contributes two linearly
independent eigenvectors. Find a generalized eigenvector, which we’ll call
~v2 , of degree 2 for this eigenvalue (remember to solve (A − λI)2 ~x = ~0).
Then compute ~v1 = (A − 2I)~v2 , which should be an eigenvector. This
gives you two vectors corresponding to λ = 2. For ~v3 , pick an eigenvector
corresponding to λ = 2 that is not a multiple of ~v1 . Let ~v4 be an eigenvector
corresponding to the other eigenvalue.
3. You now have enough information to state Q. It will mostly likely be
different than the one you started with. State Q and then compute Q−1 AQ
(with a computer) to get J. You should have an almost diagonal matrix
with a single 1 above the diagonal.
4. State eAt (feel free to use a computer to perform any needed matrix
multiplications). Check your answer with a computer.

9.3 Solving Non Homogeneous ODEs


We now have the tools needed to solve every constant coefficient linear system
of ODEs, whether homogeneous or not. They key to solving these problems is
a formula we already developed earlier in the semester. If you have forgotten
how to find an integrating factor, you may want to review some problems from
chapter 4. Then tackle this problem.

Problem 9.23 Consider the first order ODE y 0 − ay = f (t). Find an


appropriate integrating factor, and then show that a general solution to this
ODE is Z t
y(t) = eat c + eat e−at f (t)dt,
0
where c is an arbitrary constant. If the ODE is homogeneous with f (t) = 0,
show that c = y(0).
CHAPTER 9. SYSTEMS OF ODES 139

The solutions above provides a theoretical way to solve every first order
linear constant coefficient ODE. If we replace y, c, and f with vectors, and we
d~y
replace a with a matrix, then the solution to = A~y (t) + f~(t) is simply
dt
Z t
~y (t) = eAt~c + eAt e−At f~(t)dt.
0

This equation solves just about every ODE we’ve encountered all semester, and It’s possible to rework through the
more. To use this solution, the system must have constant coefficients, but the details of the problem above to
show this is the solution. I’ll leave
function f only has to be integrable after multiplying by e−At . This greatly those details to you. Solving that
extends our ability to solve non homogeneous ODEs. problem was one of my most
exciting discoveries in the last 10
Problem 9.24 Consider the linear system of ODEs given by years of teaching. It’s amazing.

y10 = −3y1 + y2 + 3 and y20 = −3y2 + 6,

with initial conditions y1 (0) = 1 and y2 (0) = 0.

1. Write this linear system in the form d~


y
dt − A~y = f~(t). [Hint: The right
hand side might be constant.]
2. Explain how to compute eAt and e−At . What are [eAt ]−1 and eA(−t) ?
Rt
3. Compute, by hand, 0 e−At f~(t)dt, and then with a computer give the
t
product eAt 0 e−At f~(t)dt.
R

Rt
4. We know the general solution is ~y (t) = eAt~c + eAt 0 e−At f~(t)dt. Use the
initial conditions to find ~c. Show us what matrix you are row reducing.
5. You should have y2 (t) = 2 − 2e−3t . What is y1 (t)?

Problem 9.25 Consider the linear system of ODEs


   
d~y 2 3 0
= ~y + ,
dt 1 4 5t

with initial conditions y1 (0) = 4, y2 (0) = 0.

1. Use a computer to give the eigenvalues and an eigenvector for each eigen-
value. State Q and J so that AQ = QJ where J is a Jordan form for
A.
2. State eJt . What matrix product would you compute to get eAt ? State the
matrices you would multiply, and then state both eAt and e−At . Please
use a computer to do all this.
Rt
3. Compute, by hand, 0 e−At f~(t)dt, and then with a computer give the
Rt
product eAt 0 e−At f~(t)dt.
Rt
4. Show how to use the initial conditions to find ~c in ~y (t) = eAt~c+eAt 0 e−At f~(t)dt.
CHAPTER 9. SYSTEMS OF ODES 140

Problem 9.26 Consider the linear system of ODEs


   −t 
d~y 0 1 e
= ~y + .
dt −1 −2 0

1. Find Q and J so that J is a Jordan form for A. You’ll need to get a


generalized eigenvector. Show how you did this.
2. State eAt and e−At .
Rt
3. Compute, by hand, 0 e−At f~(t)dt, and then with a computer give the
t
product eAt 0 e−At f~(t)dt.
R

4. If you let ~c = ~0, then what are y1 and y2 . This is what we called yp in the
non homogeneous ODE section.

You’ve now seen the key ideas needed to solve any kind of system. The
computations can get quite intense, but we can program a computer to take
care of all the computations.

9.4 Applications
Let’s finish this chapter with some application problems. You don’t have to be
able to compute the matrix exponential problems to solve these problems, so if
you got stuck above, please do these.

Problem 9.27 Suppose we have three large tanks containing various amounts
of salt. The tanks have volumes V1 = 30 gal, V2 = 20 gal, and V3 = 50 gal. We don’t have to use salt. This
could represent 3 different
• An inlet valve pumps 5 gallons of water into tank 1 each minute. The countries and products they wish
water coming in contains 3 lbs of salt per gallon. This water is being to import/export. It could be
sewage at a waste transfer station.
added to the system from some external source. We might consider three countries
and the spreading of a virus. We
• Tank 1 has an outlet value that pumps 9 gallons per minute out to tank 2. could look at three cities and the
Tank 1 has an inlet value that receives 3 gallons per minute from tank 2, flow of traffic. The applications
and 1 gallon per minute from tank 3. In all, this mean that tank 1 has 9 are endless.
gallons coming in per minute, and 9 gallons going out per minute.
• Tank 2 receives 9 gallons per minute from tank 1. Of those 9 gallons, it
sends 3 gallons per minute to tank 1 and 4 gallons per minute to tank 2.
The other 2 gallons per minute leak out the top (through a crack).
• Tank 3 receives 4 gallons per minute from tank 2. It sends 1 gallon per
minute back to tank 1, and then the remaining 3 gallons per minute are
sent out a hose to some external spot.
Assume the initial salt content is zero in each tank. As time moves on, the salt
that is added to tank 1 will eventually reach the other tanks. After some time
has elapsed, how much salt will be in each tank?
1. Let y1 , y2 , and y3 be the lbs of salt in each tank after t minutes. Write this
tank mixing problem as a linear system of ODEs in the form d~ y
dt −A~y = f~(t).
2. Use software to completely solve the system. State y1 (t), y2 (t), and y3 (t).
3. Let t → ∞. What will be the salt content in each tank in the long run.
CHAPTER 9. SYSTEMS OF ODES 141

Problem 9.28 Consider the following mechanical system. Attach a spring


to the top of the ceiling. Add an object with mass m1 to the bottom of the
spring. We’ll assume the spring’s mass is negligible. The spring constant is
k1 , and the coefficient of friction is c1 . To the bottom of the first mass, we
attach a second spring, and hang another object to the end of the second spring.
The second object has mass m2 . The second spring has negligible mass, with
spring constant k2 and coefficient of friction c2 . Assume that this mechanical
system is currently stabilized, so neither mass is moving. We’ll let y1 (t) be the
position of the first mass, relative to this equilibrium position (so if y1 (t) = 3,
then we’d be 3 cm above the equilibrium point). We’ll let y2 (t) be the position
of the second mass relative to its equilibrium position. We displace the objects
from equilibrium, and let them go, so we have the initial conditions y1 (0) = a,
y2 (0) = b, y10 (0) = 0, and y20 (0) = 0. Our goal is to predict the future, namely
give the position of both springs at time t.
1. Start by assuming that both c1 = 0 and c2 = 0. Explain why m1 y100 =
−k1 y1 + k2 (y2 − y1 ). Obtain a similar equation for my200 .

2. Let v1 = y10 and v2 = y20 . This allows us to replace y100 with v10 , and y200
with v20 , and then we have a system of first order linear ODEs. Write this
system in the matrix form
 0   
y1 ? ? ? ? y1
y2 
  = ? ? ? ? y2  .
  
 v1  ? ? ? ? v1 
v2 ? ? ? ? v2

3. Now assume that c1 and c2 are not zero. How does this change the ODEs
from part 1? What’s the corresponding 4 by 4 matrix in part 2?

Our last application involves modeling the current in an electrical system


with two loops. A similar computation will work with any number of loops,
though the number of loops causes the size of the system to increase quite
rapidly. Remember that Kirchoff’s current law states that at each node, the R1 I3
current in equals the current out. In addition, Kirchoff’s voltage laws states
that along each loop, the voltage supplied equals the voltage suppressed. REach I1 I2
resistor contributes a voltage drop of RI ohms, each capacitor a drop of C1 Idt E R2 R3
farads, and each inductor a voltage drop of LI 0 Henrys.
L C
Problem 9.29 Consider the electrical network on the right. Kirchoff’s
current law states that I1 = I2 + I3 . On the left loop, Kirchoff’s voltage law
states that E = R1 I1 + RR2 I2 + LI10 . On the right loop, Kirchoff’s voltage law
states that 0 = I3 R3 + C1 I3 dt − R2 I2 . Solve this system for I10 , I20 , and I30 , and
dI~
then write the system in matrix form = AI~ + f~(t), i.e. in the form
dt
 0     
I1 ? ? ? I1 ?
I2  = ? ? ? I2  + ? .
I3 ? ? ? I3 ?

You’ll need to differentiate the first and last equation to get an I10 and I30 . Once
you’ve got the system set up, a computer will give the currents almost instantly.
This algorithm is coded into any electrical network software package.
CHAPTER 9. SYSTEMS OF ODES 142

9.5 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
CHAPTER 9. SYSTEMS OF ODES 143

9.6 Problems
The accompanying problems will serve as practice problems for this chapter. Handwritten solutions to
most of these problems are available online (click for solutions). You can use the Mathematica technology
introduction to check any answer, as well as give a step-by-step solution to any of the problems. However, on
problems where the system is not diagonalizable, the matrix Q used to obtain Jordan form is not unique (so
your answer may differ a little, until you actually compute the matrix exponential QeJt Q−1 = eAt ).
 
1. Solve the linear ODE y 0 = ay(t) + f (t), where 0 1 0 0 0
a is a constant and f (t) is any function of t. 0 0 1 0 0
 
You will need an integrating factor, and your 0 0 0 0 0t
(i)  
solution will involve the integral of a function.  0 0 0 0 1
0 0 0 0 0
2. For each system of ODEs, solve the system using  
the eigenvalue approach. Find the Wronskian 3 1 0 0 0
0 3 1 0 0
and compute its determinant to show that your  
(j) 0 0 3 0 0
solutions are linearly independent.  t
0 0 0 −2 1 
(a) y10 = 2y1 + 4y2 , y20 = 4y1 + 2y2 , y1 (0) = 0 0 0 0 −2
1, y2 (0) = 4
5. For each of the following matrices, find the ma-
(b) y10 = y1 + 2y2 , y20 = 3y1 , y1 (0) = 6, y2 (0) = trix exponential. You will have to find the Jor-
0 dan form.
(c) y10 = y1 + 4y2 , y20 = 3y1 + 2y2 , y1 (0) =    
0, y2 (0) = 1 0 1 0 1
(a) (e)
(d) y10 = y2 , y20 = −3y1 − 4y2 , y1 (0) = −3 4 −1 0
1, y2 (0) = 2
   
0 1 0 1
(b) (f)
−6 −5 −4 0
3. (Jordan Form) For each matrix A, find matrices    
−1 −1 0 1 0 1
Q, Q , and J so that Q AQ = J is a Jordan
(c) (g)
canonical form of A. −1 −2 0 3
   

1 2
 
1 2 2
 0 1 2 4
(a) (d) (h)
0 3 −4 −4 4 2
(d) 0 1 0

0 1
 0 0 1 6. Set up an initial value problem in matrix for-
(b) mat for each of the following scenarios (mixing
−1 −2
 
0 1
(e) tank, dilution problems). Solve each one with
−1 0
 
1 2 2
(c) 0 1 2
  the computer.
0 0 1 (a) Tank 1 contains 30 gal, tank 2 contains 40.
4. For each of the following matrices A which are Pumps allow 5 gal per minute to flow in
already in Jordan form, find the matrix expo- each direction between the two tanks. If
nential. Note that if t follows a matrix, that tank 1 initially contains 20lbs of salt, and
means you should multiply each entry by t. tank 2 initially contains 120 lbs of salt, how
much salt will be in each tank at any given
time t. Remember, you are just supposed
   
2 0 0 1
(a) (e) t to set up the IVP, not actually solve it (the
0 3 0 0
    eigenvalues are not very pretty).
2 0 4 1
(b) t (f) t (b) Three tanks each contain 100 gallons of wa-
0 3 0 4
    ter. Tank 1 contains 400lbs of salt mixed
2 0 0 0 1 0 in. Pumps allow 5 gal/min to circulate in
(c) 0 3 0 (g) 0 0 1t each direction between tank 1 and tank 2.
0 0 4 0 0 0 Another pump allows 4 gallons of water to
   
2 0 0 5 1 0 circulate each direction between tanks 2
(d) 0 3 0t (h) 0 5 1t and 3. How much salt is in each tank at
0 0 4 0 0 5 any time t?
CHAPTER 9. SYSTEMS OF ODES 144

(c) Four tanks each contain 30 gallons. Be- 8. Solve the following homogeneous systems of
tween each pair of tanks, a set of pumps ODEs, or higher order ODEs, with the given
allows 1 gallon per minute to circulate in initial conditions.
each direction (so that each tank has a
total of 3 gallons leaving and 3 gallons en- (a) y10 = 2y1 , y20 = 4y2 , y1 (0) = 5, y2 (0) = 6
tering). Tank 1 contains 50lbs of salt, tank (b) y10 = 2y1 + y2 , y20 = 2y2 , y1 (0) =
2 contains 80 lbs of salt, tank 3 contains 10 −1, y2 (0) = 3
lbs of salt, and tank 4 is pure water. How (c) y 00 + 4y 0 + 3y = 0, y(0) = 0, y 0 (0) = 1
much salt is in each tank at time t?
(d) y 00 + 2y 0 + y = 0, y(0) = 2, y 0 (0) = 0
(d) Tank 1 contains 80 gallons of pure water,
(e) y10 = 2y1 + y2 , y20 = y1 + 2y2 , y1 (0) =
and tank 2 contains 50 gallons of pure wa-
2, y2 (0) = 1
ter. Each minute 4 gallons of water con-
taining 3lbs of salt per gallon are added to (f) y10 = y2 , y20 = −y1 , y1 (0) = 1, y2 (0) = 2
tank 1. Pumps allow 6 gallons per minute
9. Solve the following nonhomogeneous systems of
of water to flow from tank 1 to tank 2, and
ODEs, or higher order ODEs, with the given ini-
2 gallons of water to flow from tank 2 to
tial conditions. Use the computer to solve each
tank 1. A drainage pipe removes 4 gallons
of these problems, by first finding the matrix
per minute of liquid from tank 2. How
exponential and R then using using the formula
much salt is in each tank at any time t?
~y = eAt~c + eAt e−At f~(t)dt. You’ll have to find
7. Convert each of the following high order ODEs the matrix A and function f .
(or systems of ODEs) to a first order linear sys- (a) y10 = 2y1 + t, y20 = 4y2 , y1 (0) = 5, y2 (0) = 6
tem of ODEs. Which are homogeneous, and
which are nonhomogeneous? (b) y10 = 2y1 + y2 , y20 = 2y2 − 4, y1 (0) =
−1, y2 (0) = 3
(a) y 00 + 4y 0 + 3y = 0 (c) y 00 + 4y 0 + 3y = cos 2t, y(0) = 0, y 0 (0) = 1
(b) y 00 + 4y 0 + 3y = 4t (d) y 00 + 2y 0 + y = sin t, y(0) = 2, y 0 (0) = 0
(c) y 00 + ty 0 − 2y = 0 (e) y10 = 2y1 + y2 − 2, y20 = y1 + 2y2 + 3, y1 (0) =
2, y2 (0) = 1
(d) y 00 + ty 0 − 2y = cos t
(f) y10 = y2 , y20 = −y1 + t, y1 (0) = 1, y2 (0) = 2
(e) y 000 + 3y 00 + 3y 0 + y = 0
10. Mass-Spring Problems - To be added in the
(f) y 0000 − 4y 000 + 6y 00 − 4y 0 + y = t
future.
(g) y100 = 4y10 + 3y2 , y20 = 5y1 − 4y2 .
11. Electrical Network Problems - To be added in
(h) Chapter 17, problems 1-20, in Schaum’s the future.
Chapter 10

Fourier Series and PDEs

This chapter covers the following ideas. When you create your lesson plan, it
should contain examples which illustrate these key ideas. Before you take the
quiz on this unit, meet with another student out of class and teach each other
from the examples on your lesson plan.

1. Define period, and how to find a Fourier series of a function of period 2π


and 2L.
2. Explain how to find Fourier coefficients using Euler formulas, and be able
to explain why the Euler formulas are correct.

3. Give conditions as to when a Fourier series will exist, and explain the
difference between a Fourier series and a function at points of discontinuity.
4. Give examples of even and odd functions, and correspondingly develop
Fourier cosine and sine series. Use these ideas to discuss even and odd
half-range expansions.

10.1 Fourier Series


In the power series unit, we showed how to write function f (x) as a power series
X∞
an xn . The radius of convergence tells us precisely for which x values the
n=0
power series will converge to the function f (x). We call it a power series because
we use powers of x as the functions we are summing. At any finite stage, we are
trying to approximate the function f (x) using linear combinations of power of
f ( n)(0)
x. We can find the coefficients an with the formula an = .
n!
Are there other kinds of series? Do we have to use powers of x? In class, we
discussed how to use Legendre polynomials to do the same thing. If we let Pn (x)

X
be the nth degree Legendre polynomial, then we could write f (x) = an Pn (x).
n=0
R1
We showed that on the interval [−1, 1], the integral −1 Pn (x)Pm (x)dx = 0 if
n 6= m. We then used this to show that we can compute the coefficients an
using the formula R1
f (x)Pn (x)dx
an = R 1−1 .
P (x)Pn (x)dx
−1 n

145
CHAPTER 10. FOURIER SERIES AND PDES 146

The key to using a Legendre series is the fact that


Z 1
Pn (x)Pm (x)dx = 0.
−1

This integral equation is a generalization of the dot product. In the dot product,
we multiply corresponding components together and then sum. That’s precisely
what the integral above does. Let’s make a definition.
Definition 10.1: Inner Product. Let f (x) and g(x) be bounded functions
over some interval [a, b]. The inner product of f and g over [a, b] is the integral
Z b
hf, gi = f (x)g(x)dx.
a

This inner product is a generalization of the dot product. We say that two
functions are orthogonal over [a, b] if their inner product over [a, b] is equal to
zero.
Problem 10.1 Consider the function f (x) = x and g(x) = x2 .
1. Compute the inner products hf, f i, hg, gi, and hf, gi. [For the first, you
R1
just need to compute the integral 0 x · xdx. ]
2. Recall that ~u · ~u = |u|2 . So the length of a vector is the square root of the
dot product of the vector with itself. We’ll define the length of a function
to be the square
p root of the inner product of a function with itself, and
write ||f || = hf, f i. What is the length of f and the length of g over the
interval [0, 1]. [Hint, you already did the inner products in part 1.
3. Recall that ~u · ~v = |~u||~v | cos θ, where θ is the angle between the vectors
~u and ~v . Use this idea to invent a definition for the angle between two
functions, and then use your definition to compute the angle between f
and g.

With the word inner product, we can now talk about the “dot product”
of functions. We can use the words Length and angle when talking about
functions. We obtained the Legendre series coefficients because the inner
product of any two different Legendre polynomials, over the interval [−1, 1],
is zero. The Legendre polynomials form an infinite collection of orthogonal
vectors. We’ve got a 90 degree angle between any two functions. We can
use these polynomials to approximate any other function by considering linear
combinations of these orthogonal functions. This is one of the big ideas in modern
science. Rather than working with complicated functions f , we can approximate
them with linear combinations of simpler functions. What constitutes a “simple”
function depends on the problem. Legendre polynomials show up when studying
spherically symmetric problems. Bessel functions shows up when studying
radially symmetric problems. Sometimes the hardest part about solving a
problem is trying to determine which “simple” collection of functions to use.
Fourier was one of the first to use something other than power series to
approximate a function. He did it while trying to understand how heat flowed in
a cannon. Napoleon asked Fourier to study this problem, because cannons were
exploding on his soldiers because the cannon balls would not leave a cannon
after heat had caused the barrel to expand. Fourier discovered that you can use
sine and cosine series to approximate a function. That’s what we’ll study in this
chapter. In the work below, the variable L will stand for the length of a cannon.
CHAPTER 10. FOURIER SERIES AND PDES 147
 nπx 
Problem 10.2 Let fn (x) = cos for n = 0, 1, 2, . . .. So we have
  L    
0πx  πx  2πx 3πx
f0 (x) = cos , f1 (x) = cos , f2 (x) = cos , f3 (x) = cos ,
L L L L
etc. This is an infinite collection of functions. Our goal is to show that on the
interval [0, L], the functions fn and fm are orthogonal, provided n 6= m. To do
this, you’ll need to prove that any pair has an inner product of 0.
 
0πx  πx 
1. Draw the functions f0 (x) = cos , f1 (x) = cos , and f2 (x) =
  L L
2πx
cos over the interval [0, L].
L
RL
2. Compute the integral 0 f0 (x)fn (x)dx for n 6= 0. What is hf0 , fn i?
RL
3. Now show 0 fn (x)fm (x)dx = 0 for n 6= m, with n, m > 0. As a hint,
you’ll want to look up a product-to-sum trig identity, after which this
integral is quickly doable.
 nπx 
We now know that the set of functions fn (x) = cos forms an orthog-
L
onal set of functions over the interval [0, L]. Let’s now make a Fourier cosine
series for a function.
Problem 10.3 Suppose that f (x) is defined on [0, L]. If we assume that

X  nπx 
f (x) = An cos ,
n=0
L

then show that RL  nπx 


0
f (x) cos dx
An = R L  nπxL .
cos 2 dx
0 L
Then compute the bottom integral to show that for n ≥ 1 we have

2 L
Z  nπx 
An = f (x) cos dx,
L 0 L
and if n = 0 then we have
Z L
1
A0 = f (x)dx.
L 0
 mπx 
[Hint: Multiply both sides by cos and then integrate from 0 to L. You
L
can use the orthogonality of cosines to solve for the coefficients. The integral of
the bottom will involve a cosine half angle formula.]

We could have repeated the previous two problems with the sine function,
and would have gotten very similar results. Based of the previous two problems,
let’s make a formal definition.
Definition 10.2: Fourier Sine and Cosine Series. Let f (x) be a function
defined on [0, L]. We define the Fourier sine series and Fourier cosine series of f
(on [−L, L]) to be the series

X  nπx  ∞
X  nπx 
Bn sin and An cos ,
n=1
L n=0
L
CHAPTER 10. FOURIER SERIES AND PDES 148

respectively. The coefficients above are given by the formulas

1 L
Z
Z L A0 = f (x)dx,
2  nπx 
L 0
Bn = f (x) sin dx and Z L
L 0 L 2  nπx 
An = f (x) cos dx.
L 0 L

Problem 10.4 Let f (x) = x over the interval [0, L]. Draw the function f .
Then compute the Fourier sine series of f (x) by computing the integrals
Z L
2  nπx 
Bn = f (x) sin dx.
L 0 L
Write out the first 4 nonzero terms of the series by writing
∞  nπx   πx     
X 2πx 3πx
Bn sin = B1 sin + B2 sin + B3 sin + ··· .
n=1
L L L L

Be prepared to explain how you use integration by parts to compute the integrals.

Problem 10.5 Let f (x) = x over the interval [0, L]. Draw the function f .
Then compute the Fourier cosine series of f (x) by computing the integrals
Z L Z L
1 2  nπx 
A0 = f (x)dx and An = f (x) cos dx.
L 0 L 0 L
Write out the first 4 nonzero terms of the series by writing
∞  nπx   πx     
X 2πx 3πx
An cos = A0 + A1 cos + A2 cos + A3 cos +··· .
n=0
L L L L

Be prepared to explain how you use integration by parts to compute the integrals.

Problem 10.6 In the previous two problems, you computed the Fourier
cosine and Fourier sine series of f (x) = x over the interval [0, L]. This problem
will repeat the above with technology, and then you’ll graph your results. To
allow software to create graphs, you’ll have to pick a length L that’s an actual
number (maybe try L = 7).
1. Use software to obtain the first 4 nonzero terms of the Fourier sine and
Fourier cosine series of f (x) = x over [0, L].
2. Use software to graph both f (x) = x and the first four nonzero terms of
the Fourier sine series. Have the bounds of your graph be over the interval
[−3L, 3L].
3. Use software to graph both f (x) = x and the first four nonzero terms
of the Fourier cosine series. Have the bounds of your graph be over the
interval [−3L, 3L].
4. Make some conjectures about what you see in your graphs.
To present this in class, you should come to class with your graphs already
printed out.
CHAPTER 10. FOURIER SERIES AND PDES 149

Definition 10.3: Piecewise Smooth. We say that function f (x) is smooth


on an interval [a, b] if the function and its derivative are both bounded and
continuous on (a, b). We say that a function f (x) is piecewise smooth on an
interval (a, b) if the interval can be partitioned into a finite number of pieces
and on each piece the function f (x) is smooth (so f 0 (x) may not exist at finitely
many points).
Definition 10.4: Fourier Series. Let f (x) be a function defined on [−L, L]
such that the Fourier coefficients
Z L
1
a0 = f (x)dx,
2L −L
1 L
Z  nπx 
an = f (x) cos dx, and
L −L L
1 L
Z  nπx 
bn = f (x) sin dx
L −L L

exist. We define the Fourier series of f over the interval [−L, L] to be the formal
infinite series

X  nπx  ∞
X  nπx 
a0 + an cos + bn sin .
n=1
L n=1
L

Regardless of whether or not the series converges, we will write



X  nπx  ∞
X  nπx 
f (x) ∼ a0 + an cos + bn sin .
n=1
L n=1
L

Remark 10.5. In the definition above, we do not require the Fourier series to
actually converge to f . The following theorem, which we will give without proof,
provides the needed conditions for the series to converge. We will use this proof
(which requires some real analysis) to prove other facts about Fourier series
throughout this chapter.
Theorem 10.6 (Fourier’s Theorem). Suppose f (x) is piecewise smooth on the
interval −L ≤ x ≤ L. Then the Fourier series of f (x) converges to the period
extension of f at the points where f is continuous. If the periodic extension of f
is not continuous at a point x, then the Fourier series converges to the average
f (x+) + (f (x−)
of the left and right limits at x, namely .
2
Problem 10.7 Let f (x) = x over the interval [−L, L]. Compute the Fourier
series of f (x) by computing the integrals for a0 , an , and bn . Show your integration
steps.

Problem 10.8 Let f (x) = x2 over the interval [−L, L]. Compute the Fourier
series of f (x) by computing the integrals for a0 , an , and bn Show your integration
steps.
CHAPTER 10. FOURIER SERIES AND PDES 150

Problem 10.9 Let f (x) = ex , g(x) = cosh(x) and h(x) = sinh(x) over
the interval [−L, L]. Use software to compute the Fourier coefficients for each
function. What patterns do you see? You are welcome to just state the Fourier
coefficients for each (you don’t have to show your integration steps).

Notice that there are other kinds of series. In class, I showed you how
to obtain a function as an infinite sum of Legendre polynomials. We also
introduced the concept of orthogonality of functions, and showed that the
Legendre polynomials formed an infinite collection of orthogonal functions. We
also showed how to write a function f as a series of Legendre polynomials.
We can do the exact same thing with trig functions. We’ll develop the cosine
series, the sine series, and then the Fourier series. We’ll compute these series for
a few functions. After that let’s look at how these were developed by Fourier,
as he studied the heat equation.
Maybe we should start with why we care about something that has length L.
Then get to the reason why we look at nπ/L. Let’s definitely do that.
Then prove orthogonality of the functions on these intervals.
Show that if we write a function as a series, and the functions are orthogonal,
then we know the coefficients through an integral formula.
Obtain a formula for the cosine series coefficients and the sine series coeffi-
cients.
Find the Fourier coefficients of a cosine series. Draw the function and several
terms of the series.
Find the Fourier coefficients of a sine series. Draw the function, and several
terms of the series.
What are the coefficients of a Fourier series. Find the coefficients for a
function.
If a function is odd or even, what can be said.
I can grab a lot of these problems from my PDE course notes.

10.2 Wrap Up
Once you have finished the problems in the section and feel comfortable with
the ideas, create a short one page lesson plan that contains examples of the key
ideas. You will get a chance to teach from this lesson plan prior to taking the
exam. Then log on to I-Learn and download the quiz. Once you have taken the
quiz, upload your work to I-Learn and then download the key to see how you
did. If you still need to work on mastering some of the ideas, please do so and
then demonstrate your mastery though the quiz corrections.
CHAPTER 10. FOURIER SERIES AND PDES 151

10.3 Problems
The accompanying problems will serve as practice problems for this chapter. Handwritten solutions to
most of these problems are available online (click for solutions). You can use the Mathematica technology
introduction to check all your answers. I will create a solutions guide as time permits.

1. Find the fundamental period of the following functions.

(a) sin x, sin 2x, sin x3 , sin kx, sin nπx


2
(b) tan x, tan 2x, tan x3 , tan kx, tan nπx
2

2. Show y = c is p-periodic for each positive p, but has no fundamental period.


3. Compute the Fourier series of each function below (assume the function is 2π-periodic). Write your
solution using summation notation. Then graph at least 3 periods of the function and compare the
graph of the function with a graph of a truncated Fourier series.

(a) f (x) = sin 2x (i) f (x) = x for −π < x < π


(b) f (x) = cos 3x (j) f (x) = |x| for −π < x < π
(c) f (x) = sin 2x + cos 3x (k) f (x) = x for 0 < x < 2π
(d) f (x) = 4 (l) f (x) = x2 for −π < x < π
(e) f (x) = 4 + 5 sin 2x − 7 cos 3x

( 0 −π < x < −π/2

0 −π < x < 0 (m) f (x) = 1 −π/2 < x < π/2
(f) f (x) = 
1 0<x<π 0 π/2 < x < π

( (
−1 −π < x < 0 0 −π < x < 0
(g) f (x) = (n) f (x) =
1 0<x<π x 0<x<π
( (
−2 −π < x < 0 π + x −π < x < 0
(h) f (x) = (o) f (x) =
3 0<x<π π−x 0<x<π

4. Compute the Fourier series of each function below (assume the function is p-periodic). Write your
solution using summation notation. Then graph at least 3 periods of the function and compare the
graph of the function with a graph of a truncated Fourier series.
(
−1 −2 < x < 0 (h) f (x) = 1 − x2 for −1 < x < 1, p = 2
(a) f (x) = ,p=4
1 0<x<2 (i) f (x) = x3 for −1 < x < 1, p = 2
(
0 −2 < x < 0 (j) f (x) = sin(πx) for 0 < x < 1, p = 1
(b) f (x) = ,p=4
2 0<x<2 (k) f (x) = cos(πx) for − 12 < x < 21 , p = 1
(
(c) f (x) = x for −1 < x < 1, p = 2 0 −1 < x < 0
(l) f (x) = ,p=2
(d) f (x) = |x| for −1 < x < 1, p = 2 x 0<x<1
(e) f (x) = 1 − |x| for −1 < x < 1, p = 2

0 −2 < x < 0

(f) f (x) = x2 for −1 < x < 1, p = 2 (m) f (x) = 1 0 < x < 1 , p = 4
(g) f (x) = x2 for −2 < x < 2, p = 4

0 1<x<2

5. Decide if each function is even, odd, or neither.


√ √
(a) x, x2 , x3 , x4 , x, 3 x, x2 + x + 1, x3 + x, x2 + 1, x4 + x5 .
(b) sin x, cos x, cos 3x, tan x, cot x, sec x, csc x, sin x cos x, sin2 x, sin x + cos 3x.
CHAPTER 10. FOURIER SERIES AND PDES 152

(c) If f is even and g is odd, f 2 , g 2 , f 3 , g 3 , f g, f + g, 3f, xf, xg, f n g m (where n and m are integers).
6. Rewrite each function f as the sum of an even fe and an odd fo function, so that f = fe + f0 . Make
sure you show that fe (−x) = fe (x) and fo (−x) = −fo (x). Then plot f , fe , and fo on the same axes.
(a) f (x) = ex (your answer should involve hyperbolic functions).
(b) f (x) = x2 + 3x + 2
1
(c) f (x) = (since f (1) is undefined, the even and odd functions are not defined at x = −1).
x−1
7. For each function defined on [0, L], find the Fourier cosine series of the even periodic extension to
[−L, L]. Write your solution using summation notation. Then graph at least 3 periods of the function
and compare the graph of the function with a graph of a truncated series.
(
(a) f (x) = 1 for 0 < x < 1 0 0<x<1
(j) f (x) =
(b) f (x) = 1 for 0 < x < π 1 1<x<2
(c) f (x) = x for 0 < x < 1 (
1 0<x<1
(d) f (x) = x for 0 < x < π (k) f (x) =
2 1<x<2
(e) f (x) = 1 − x for 0 < x < 1 (
(f) f (x) = 2 − x for 0 < x < 2 1−x 0<x<1
(l) f (x) =
0 1<x<2
(g) f (x) = π − x for 0 < x < π
(
(h) f (x) = x2 for 0 < x < 1 x 0<x<1
(m) (Sawtooth Wave) f (x) =
(i) f (x) = x3 for 0 < x < 1 2−x 1<x<2

8. For each function from 7, find the Fourier sine series of the odd periodic extension to [−L, L]. Write
your solution using summation notation. Then graph at least 3 periods of the function and compare
the graph of the function with a graph of a truncated series.
9. For a function f (x) defined on [0, L], a half wave rectifier extends f to be 0 on [−L, 0), and then
periodically extends the function to all real numbers. If fe and fo represent the even and odd periodic
fe + fo
extentsions, then g = represents the half wave rectifier. For each function from 7, find the
2
Fourier series of the half wave rectifier of f . Write your solution using summation notation. Then graph
at least 3 periods of the half wave rectifier and compare it to a graph of a truncated series.
10. Compute the following integrals, where n and m are positive integers. You will need the product to
sum trig identitites.
Z π
(a) cos(nx) sin(mx)dx.
−π
Z π
(b) sin(nx) sin(mx)dx.
−π
Z π
(c) cos(nx) cos(mx)dx.
−π

11. Use Fourier series to prove the following identities.

1 1 1 1
(a) sin2 x = − cos(2x) (d) cos2 x = + cos(2x)
2 2 2 2
3 1 3 1
(b) sin3 x = sin x − sin(3x) (e) cos3 x = cos x + cos(3x)
4 4 4 4
4 3 1 1 4 3 1 1
(c) sin x = − cos(2x) + cos(4x) (f) cos x = + cos(2x) + cos(4x)
8 2 8 8 2 8
CHAPTER 10. FOURIER SERIES AND PDES 153

12. (Gibb’s Phenomenon) Pick a discontinuous function from any of the previous exercises. Use a computer
to graph the partial sums
k 
X  nπx   nπx 
fk (x) = a0 + an cos + bn cos
n=1
L L

for k = 5, 10, 50, 100. What do you notice happening near the point where f is discontinuous? Does
increasing k make this “bump” disappear? Try letting k be 1000 (it may take little while for the
computer to construct your solution).

You might also like