You are on page 1of 255

18.

03 Class 1, Feb 8, 2006

Introduction: Geometric view of solving ODE's.

Vocabulary: Differential equation; solutions; ordinary; order; general


solution, particular solution, initial value; direction field;
integral curve; separable equation.

Technique: separation of variables.

[1] Welcome to 18.03.

I hope you've picked up an information sheet and syllabus and a problem

set when you came in. Read the information sheet. It contains a lot

of important information about how this course will work this term.

In addition to the textbooks (Quantum Books), you should pick up

two course packets from Graphic Arts in the basement of Building 11.

We'll use EP (5th or 4th ed) but not the freely bundled Polking.

You should have been assigned to a recitation, and have gone to it

yesterday (or this morning). We had to cancel some recitations,

by the way, and the registrar messed up this process. If you got

letters from the registrar and from the UMO, the UMO is right.

I also hope you went to recitation on Tuesday.

where these yellow sheets were handed out

I hope you've now manufactured little booklets of them.

We'll use them for a primitive but effective form of communication

between us. It's private; only I can see the numbers you put up, pretty

much.

I will not use them every lecture, but I will on Friday.

If you need to change recitation, go to the UMO. This is also

where

you hand in homework, due on Wednesdays or Fridays. The current PS is

due

a week from today, Feb 15, at 1:00.

Any questions?

[2] Notice the "Ten Essential Skills" at the back of


the Information Sheet. This is a kind of plot summary. There'll be one
problem on the each of these skills on the final exam.

Here's a list of some of the larger courses listing 18.03 as a pre-


requisite
or co-requisite. Teachers of these courses know the list of skills.
They expect you will know how to do these things.

2.001 Mechanics and Materials I

2.003 Dynamics and Vibrations

2.005 Thermal-Fluids Engineering

2.016 Hydrodynamics
3.23 Electrical, Optical, and Magnetic Properties of Materials

6.002 Circuits and Electronics

6.021 Quantitative Physiology: Cells and Tissues

6.630 Electromagnetics

8.04 Quantum Physics I

10.301 Fluid Mechanics

12.800 Fluid Dynamics of the Atmosphere and Ocean

16.01 Unified Engineering

18.100 Analysis I

18.330 Introduction to Numerical Analysis

18.353J Nonlinear Dynamics I: Chaos

[3] A DIFFERENTIAL EQUATION is a relation between a function and its


derivatives.

Differential equations form the language in which the basic laws of


science are expressed. The science tells us how the system at hand
changes "from one instant to the next." The challenge addressed by the
theory of differential equations is to take this short-term
information and obtain information about long-term overall behavior.
So the art and practice of differential equations involves the following
sequence of steps: one "models" a system (physical, chemical,
biological,
economic, or even mathematical) by means of a differential equation;
one then attempts to gain information about solutions of this equation;
and one then translates this mathematical information back into the
scientific context.

'Solving'
Differential Equation: _______________\ Behavior over time
Short term information /

/\
\ /
\ /
Model \ / Interpretation
\ /
\ /
\/

Physical World

A basic example is given by Newton's law, F = ma. a = acceleration,


the second derivative of x = position. Forces don't effect x
directly,
but only through its derivatives. This is a second order ODE, and we
will study second order ODEs extensively later in the course.

[4] In this first Unit we will study ODEs involving only the first

derivative:

first order: y' = F(x,y) .

Example 1: y' = 2x Solution by integrating: y = x^2 + c.

Example 2: y' = ky. Solution: y = Ce^{kt} . MEMORIZE THIS

It's easy to check; a nice feature of differential equations in general.

[5] Today: Graphical approach

In Example 1 the graphs are nested parabolas: vertical translates of


each
other.

In Example 2, graphs of solutions are no longer merely vertical


translates;
they form a spray, and include the solution x = 0. The constant of
integration is multiplicative, here: C.

We have written down the "general solutions." Their graphs fill up the
plane.
A "particular solution" arises from choosing a specific value for the
constant of integration. Often it occurs by specifying a point (a,b) you
want the solution curve to pass through. This is an "initial value."

The particular solution to y' = ky with y(0) = 1 is y = e^{kx} .


This is a good DEFINITION of e^{kx} .

The ODE y' = F(x,y) specifies a derivative - that is, a slope - at


every
point in the plane. This is a DIRECTION FIELD or SLOPE FIELD.

An INTEGRAL CURVE is a curve in the plane that has the given slope
at every point it passes through.

A SOLUTION is a function whose graph lies on an integral curve.

Example 3: y' = y^2 - x.

This equation does not admit solutions in elementary functions.


Nevertheless we can say interesting things about its solutions.

To draw the direction field, find where F(x,y) is constant, say m .


This is an ISOCLINE. Eg

m = 0 : x = y^2. I drew in the direction field.

m = 1 : x = y^2 - 1

m = -1 : x = y^2 + 1 .
I invoked the Mathlet Isoclines and showed the example.

I drew some solution curves. Many get trapped along the bottom
branch of the parabola. Can we explain this? I cleared the solutions
and called attention to the fact that everywhere, the direction
on the null-cline points into the region between m = 0 and m = -1 ,
and everywhere to the right of some point (actually it's (5/4,-1/2) )
on m = -1 the direction field also points into the region.

So solutions in that region stay in that region: they are trapped


between those two parabolas, which are asymptotic as x ---> infinity.
All these solutions become very close to the function - sqrt(x)
for large x . This is an ideal situation! - we know completely about
the long term behavior of these solutions, and the answer doesn't depend
on initial conditions (as long as you are in this range). This is
"stability."

[6] We have seen in action the

EXISTENCE AND UNIQUENESS THEOREM FOR ODEs:

y' = F(x,y) has exactly one solution such that y(a) = b ,

for any (a,b) in the region where F is defined.

(You actually have to put some technical conditions on F -- see EP.)

Example 3: y' = - x/y .

Take a point (x,y) . The slope of the line from (0,0) to it is y/x .

-x/y is the slope of the perpendicular. I drew the direction field.

You can visualize the solutions.

Everyone knows that the slope of a perpendicular

is given by negative reciprocal. So the slope field now goes around the

origin, and the solutions look to be concentric circles.

The E and U theorem says that there is just one integral curve through

each point: EVERY POINT LIES ON AN INTEGRAL CURVE, and NO CROSSING

ALLOWED.

Direction fields let you visualize this, but we also want to be able to

solve ODEs "analytically," that is, using formulas.

[7] METHOD: Separation of variables (from recitation):

Step 1: put all the x's on one side, y's on the other:

dy/dx = - x/y ====> y dy = - x dx .

(If this can't be done, the equation isn't separable and this method
doesn't
work.)

Step 2: Integrate both sides:

y^2/2 + c1 = - y^2/2 + c2
Clean up by combining constants of integration:

x^2 + y^2 = c

(where c = 2(c2 - c1) )

Yes, we got circles. This is an IMPLICIT SOLUTION. Separation of

variables

usually leads to an implicit solution - equations for integral curves,

satisfied by solutions, rather than an explicit expression for y as a

function of x . We can solve here:

y = sqrt(c - x^2) or y = - sqrt(c - x^2).

Each integral curve contains TWO solution functions: one above, one

below.

Your initial condition tells you which you are on. There is NO solution

with initial condition (x,0) , since the slope would be infinite.

You may be looking for a PARTICULAR SOLUTION to the differential

equation,

specified by giving an INITIAL CONDITION: when x = 1 , we want the

value

of the solution to be 2, say. We are looking for an integral curve

through

the point (1,2). We can get this by computing what c must be to make

it

happen: c = 5 works, and we find the solution y = sqrt(5 - x^2) .

A point to note here: solutions may not extend for ever.

This one exists only for x between -sqrt(5) and + sqrt(5).

18.03 Class 2, February 10, 2006

Numerical Methods

[1] The study of differential equations rests on three legs:

. Analytic, exact, symbolic methods

. Quantitative methods (direction fields, isoclines ....)

. Numerical methods

Even if we can solve symbolically, the question of computing values

remains.

The number e is the value y(1) of the solution to

y' = y with y(0) = 1. But how do you find that in fact

e = 2.718282828459045.... ? The answer is: numerical methods.

As an example, take the first order ODE y' = x - y^2 = F(x,y)

with initial condition y(0) = 1. Question: what is y(1) ?

I revealed a picture of the direction field with this solution sketched.

This is what we had on Wednesday but upside down: then we considered

y' = y^2 - x . The funnel is at the top

this time. This solution seems to be one of those trapped in the funnel,

so for large x , the graph of y(x) is close to the graph of \sqrt

(x) .
But what about y(1) ?

Here's an approach: use the tangent line approximation!

Since F(0,1) = -1 , the straight line best approximating the integral


curve
at (0,1) has slope -1 , and goes through the point (0,1) : so this
gives the estimate y(1) is approximately 0 .

Well, we know that the integral curve is NOT straight. What to do?

Approximate it by a polygon!

So use the tangent line approximation to go half way, and then check
the direction field again:

y(.5) is approximately 1 + (slope)(run) = 1 + (-1)(.5) = .5


(.5,.50) is a vertex on this polygon. The direction field there has
slope

F(.5,.5) = .5 - (.5)^2 = .25 .

We follow the line segment from there with this slope for a run of .5
to get to the point with x = 1 and
y = .5 + (slope)(run) = .5 + (.25)(.5) = .625 .

At this point I invoked the Mathlet Euler's Method. There t replaces


x .

[2] This is a general method for computing y(b) from y(a) and the
direction field. In fact, it approximates y(x) for all x between a
and b.
Pick a step size h (1 or 1/2 above). It should probably be so that

b = a + nh for some positive whole number n. We'll use n steps of

size h to get from a to b .

Successively compute the vertices of the polygon. Do this in an

organized way:

The x coordinates are easy:

x0 = a, x1 = a + h, x2 = a + 2h, ... , xn = a + nh, ... xN = b.

The y cooridinates you compute, using the direction field.

Write A0 = F(x0,y0), A1 = F(x1,y1) , and so on. Then

In the line n = 1 , y1 = y0 + h A0

In the line n = 2 , y2 = y1 + h A1

and in general y(k+1) = yk + h A2

This is "Euler's method."

[3] Keep this calculation organized in a talbe. We'll do our example


one more time: take n = 2, so h = 1/2

k xk yk Ak = xk - yk^2 h Ak
________________________________________________________________________
__

0 0 1 -1 -.5

1 .5 .5 .25 .125

2 1.0 .625

I showed some more Euler polynomials for this equation.

Euler's method is rarely exact. Let's identify some sources for error.
Much of numerical analysis is understanding and bounding potential
error.

(1) Round off accumulation. Each computation involves a small error,


from round off, and these errors accumulate. So you want to use the
fewest
number of steps possible. On the other hand making the stepsize small
keeps the polygonal approximation close to the actual solution. There is
a tension here.

Usually more important than this is:

(2) The Euler polygon is not an exact solution, and the direction field
at its vertices differs more and more from the direction field under the
actual solution. At places where the direction field is changing
rapidly,
this produces very bad approximations quickly.

For short intervals, at least, we can at least predict whether the Euler
method will give an answer that is too large or too small. In this
example, the direction field turns up secretly while the polygon is
running;
so the actual answer is TOO BIG. This is a general thing.

I invoked the example F(t,y) = -ty with the initial condition


(-2.2,0.10).

QUESTION: is the Euler approx for y(-1.2)

1. Too high

2. Too low

Blank. Not sure

A click shows: too small. [This was a poorly chosen example.]

If the integral curve is bending up, the Euler approximation is too low.
If it's bending down, the Euler approximation is too high.

[4] The way to address the the problem of variability of the direction
field
is to poll the values of the direction field in the area that the next
strut
in the Euler polygon plans to traverse, and use that information to give
a
better derivative for the next strut. These polling methods can be very
clever.

If you poll once at the midway point and simply take the average, you
get
the "improved Euler method" (also known as Heun's method).

If you poll four times sequentially (in a certain very clever way) you
get
"RK4."

It is interesting to compare these methods. Here's a comparison


using the ODE y' = y, y(0) = 1; the solution is y = e^x,
and we study y(1) = e.

Equal cost:

Method Steps Evaluations Error

RK1 = Euler 1000 1000 1.35 x 10^{-3}

RK2 = Heun 500 1000 1.81 x 10^{-6}

RK4 250 1000 7.99 x 10^{-15}

Each evaluation of the direction field costs money - it takes time.


Heun polls twice per step, and RK4 polls 4 times, so the cost of
Euler with 1000 steps is about the same as the cost of Heun with 500

steps or RK4 with 250 steps.

The error for the Euler method is around 1/1000, even using 1000

steps of stepsize 1/1000. This reflects a general theorem: the

expected error of Euler's method is proportional to the stepsize h.

For Heun the theory predicts error proportional to h^2. h = 2 x 10^{-

3}

here, so h^2 = 4 x 10^{-6} ; in the event we do better.

For RK4 it predicts error proportional to h^4,

which is 16 x 10^{-12} here; in the event RK4 is even more accurate.

The moral is that for good accuracy Euler is essentially useless,

and RK4 will always win. There are still higher order methods,

but they involve more overhead as well and experience has shown

that RK4 is a good compromise.

[5] There is a third source of error to keep in mind:

(3) Catastrophic overshoot.

Go back to the applet, with F(t,y) = -ty and initial condition (-


2.2,.10).
Follow the Euler polygon for h = 1 a little further. The Euler
polygon
goes WILD, even though obviously the solutions are all asymptotically
zero.

Another type of overshoot can be seen in the y' = y^2 - t example.


There, if you start at (-1.5, -3) , say, the actual solution enters the
funnel, but Euler with h as small as 1/4 will go off to infinity.
In fact, the actual solutions that go to infinity get there in finite
time, but these polygons never do that since the slope is finite
everywhere.

Beware! ODE solvers are tricky and avoid things like this. One trick:
when the direction field is steep, use smaller stepsizes.
18.03 Class 3, Feb 13, 2006

First order linear equations: Models

Vocabulary: Coupling constant, system, signal, system response,

Models: banks, mixing, cooling, growth and decay.

Solution in case the equation is separable;

general story deferred to Class 4.

[1] If I had to name the most important general class of differential


equations it would be "linear equations." They will occupy most of this
course.
Today we look at models giving first order linear equations.

Definition: A "linear ODE" is one that can be put in the "standard


form"

___________________________

| |

| x' + p(t)x = q(t)


|

|___________________________|

When t = time is the independent variable, the notation x-dot is often


used. In these notes I'll continue to write x' however.

[2] Model 1. Bank account: I have a bank account. It has x dollars


in it.
x is a function of time. I can add money to the bank and make
withdrawals.

The bank is a system. It pays me for the money I deposit! This is


called interest. In the old days a bank would pay interest monthly:
Then Delta t = 1/12 and

x(t + Delta t ) = x(t) + I x(t) Delta t [ + .... ]

I has units (year)^{-1} . These days I is typically about 2% = 0.02 .


You don't get 2% each month! you get 1/12 of that.

Then there is my deposit and withdrawal. We will measure these


as a RATE as well. So I might contribute $100 every month: or $1200 per
year.
In general, say I deposit at the rate of q(t) per year. q(t) might be
negative too, from time to time: these are withdrawals. So over a month
(assuming I can use q(t) as the average over the month):

x(t + Delta t ) = x(t) + I x(t) Delta t + q(t) Delta t

Now subtract x(t) and divide by Delta t :

x(t + Delta t) - x(t)


--------------------- = I x + q
Delta t

Now is the moment to let the interest period Delta t tend to zero:
x' = I x + q

Note: q(t) can certainly vary in time. The interest rate can too.

In fact the interest rate might depend upon x as well: a larger

account will probably earn a better interest rate. Neither feature

affects this derivation, but if I does depend upon x as well as t ,

then the equation we are looking at is no longer linear.

This situation is typical: the actual ODE controlling a bank account

is nonlinear, but it is well approximated by a linear one when the

variables are restricted in size. We'll make that assumption now:

so I = I(t) , q = q(t) .

[3] We can put the ODE into standard form:

x' - I x = q

The left hand side represents the SYSTEM: the bank.

The right hand side represents an outside influence on the system:


it's a "signal," the "input signal." A "signal" is just a function of
time.

The system responds to the input signal and yields the function x(t),
the "output signal." Here's a picture:

initial condition
|
|
|
V

______________

| |

----- q(t) -----> | System | ----- x(t) ----->

|______________|

input output

[4] Model 2: Diffusion, e.g. of heat.

I put my root beer in a cooler but it still gets warm.


Let's model it by an ODE.

T(t) = root beer temperature at time t .

The greater the temperature difference between inside and outside, the
faster T(t) changes.

Simplest ("linear") model of this:

T'(t) = k (Te(t) - T(t))

where Te(t) is the "external" temperature. When Te(t) > T(t),


T'(t) > 0
(assuming k > 0 ). We are also assuming that is independent of other
variables. We get a linear equation:
T' - k T = k Te

k could depend upon t but let's imagine it as constant.

This happens often: a the input signal is a product and one of the
factors
is p (which is k here). The other factor then has the same units as
the
output signal. k is a "coupling constant."

The system here is the cooler. The input signal is k times the
external
temperature.

Question 3.1: k large means


1. good insulation
2. bad insulation
Blank. don't know.

k is small when the insulation is good, large when it is bad.


It's zero when the insulation is perfect.

[5] There is a theory of linear equations, complete with an algorithm


for solving them. It's important to recognize them when you see them.

Question 3.2. Which of the following are linear ODE's?


(a) $\dot x+x^2=t$
(b) $\dot x=(t^2+1)(x-1)$
(c) $\dot x+x=t^2$

1. None
2. (a) only
3. (b) only
4. (c) only
5. All
6. All but (a)
7. All but (b)
8. All but (c)
Blank. Don't know.

Answer: (b) and (c) are linear: 6

[6] Important case: Null input signal: x' + p(t) x = 0

This reflects the system as it is in isolation, without outside

influence:

No deposit or withdrawal; or Constant temperature of zero outside.

"Homogeneous": note pronunciation.

A homogeneous linear equation is separable:

dx

---- = - p(t) dt

ln|x| = - integral p(t) dt [constant of integration is


incorporated into the indef integral]

Write P(t) for any primitive: P'(t) = p(t) , so

integral p(t) dt = P(t) + c

ln|x| = - P + c

|x| = e^c e^{-P}

x = +- e^c e^{-P}

+- e^c can be any number except zero; and x = 0 is a good solution


too,
but was eliminated when we divided by x . So we get to

x = C e^{-P(t)}

where P'(t) = p(t) .


18.03 Class 4, Feb 15, 2006

First order linear equations: solutions.

[1] Definition: A "linear ODE" is one that can be put in the "standard
form"

_____________________________

| |

| x' + p(t)x = q(t) | (*)

|_____________________________|

On Monday we looked at the Homogeneous case, q(t) = 0 :

x' + p(t) x = 0 .

This is separable, and the solution is xh = C e^{- integral p(t) dt}

Now for the general case.

Example: x' + kT = kT_ext, the (heat) diffusion equation.

k is the "coupling constant." Let's take it to be 1/3.

(This cooler cost $16.95 at Target.)

Suppose the temperature outside is rising at a constant rate: say

T_ext = 60 + 6t (in hours after 10:00)

and we need an initial condition: x(0) = 32 .

So the equation is x' + (1/3) x = 20 + 2t , x(0) = 32 .

This isn't separable: it's something new. We'll describe a method which

works for ANY first order liner ODE.

[2] Method: "variation of parameter," or "trial solution":

(1) First solve the "associated homogeneous equation"

x' + p(t) x = 0 (*)_h

Write xh for a nonzero solution to it.

(2) Then make the substitution x = xh u , and solve for u .

(3) Finally, don't forget to substitute back in to get x .

Let's see how this works in our example. The associated homogeneous
equation is x' + (1/3) x = 0, which has nonzero solution

xh = e^{-t/3}

Write x = e^{-t/3} u and plug into the differential equation:

x' = (-1/3) e^{-t/3} u + e^{-t/3} u'


(1/3) x = ( 1/3) e^{-t/3} u

__________________________________________

20 + 2t = e^{-t/3} u'

This cancellation is what makes the method work.

We can solve this for u by integrating:

u = int e^{t/3} (20 + 2t) dt = 3 . 20 e^{t/3} + ??

This is parts: int v dw = v w - int w dv [sorry, "u" is used]

v = 2t ,
dw = e^{t/3} dt
dv = 2 dt , w = 3 e^{t/3} [another place where we can take c = 0!]

int 2t e^{t/3} dt = 2t 3 e^{t/3} - int 3 e^{t/3} 2 dt

= (6t - 18) e^{t/3}

u = int e^{t/3} (20 + 2t) dt = 3 . 20 e^{t/3} + (6t - 18) e^{t/3}

= (42 + 6t) e{t/3}

Are we done? Not quite:

x = e^{-t/3} u = 42 + 6t

There! Want to check? x' = 6 , so x' + (1/3) x = 6 + 14 + 2t = 20 +


2t !

[3] Wait! Where's the constant of integration?

Answer: u had an additive constant attached:

u = (42 + 6t) e^{t/3} + c

x = e^{-t/3} u = 42 + 6t + c e^{-t/3}

That's the general solution. I sketched some solutions. The term


c e^{-t/3} is a "transient": it dies away as t gets large;
all solutions resemble 42 + 6t as t gets large.
Since T_{ext}(t) = 60 + 6t , this is saying that for large t,
the cooler is 18 degrees cooler than the outside.

We wanted x(0) = 32 : so c = -10 , and the solution to the


initial value problem is

x = 42 + 6t - 10 e^{-t/3}

Notice the structure of the set of solutions:

the constant of integration occurs as a coefficient of the homogeneous

solution. This always happens for first order linear equations,

and you can see why from this method of solution.

[4] Let's work out the general case,


x' + p(t) x = q(t) (*)

Write xh for a nonzero solution of the associated homogeneous


equation, so

xh' + p(t) xh = 0 (*)_h

Make the substitution x = xh u and solve for u:

x' = xh' u + xh u'

p x = p u xh
____________________

q = ( xh' + p xh ) u + xh u'

But xh satisfied (*)_h , so the parenthetical quantity is zero!

q = u' xh or u' = xh^{-1} q

which you can solve by integrating:

u = integral xh^{-1} q dt

And this determines x , so we have a solution,

x = xh integral xh^{-1} q dt

[5] Note about homogeneous solutions: the constant of integration


occurs as a
factor: all solutions are constant multiples of any nonzero solution.
Write xh for a nonzero solution. Notice that not only is it not always
zero; in fact it is never zero. Also notice the obvious fact that x = 0
is a solution.

One more example:

x y' + y = 1/x (x > 0)

Standard form: y' + y/x = /1x^2

yh = e^{-int dx/x} = 1/x

y = 1/x [ int x/x^2 dx + c ] = (ln x)/x + c/x

Check: y' = (x/x - ln x)/x^2 - c/x^2

x y' + y = (1 - ln x)/x - c/x + (ln x)/x + c/x = 1/x .

This one has an easier way: the left hand side is (xy)'

so we are solving (xy)' = 1/x .

Integrate: xy = ln x + c

so y = (ln x)/x + c/x

[6] The method of "integrating factors" finds a function that you can
multiply
both sides and get into this position.

It turns out that the right thing to multiply through by is

xh^{-1} = e^{ integral p(t) dt}

This is called an "integrating factor." Let's see how it works out


in an example

Solve x' + tx = 2t

The integrating factor is e^{ integral t dt } = e^{ t^2 / 2 }:

Let's check:

( e^{ t^2 / 2 } x )' = e^{ t^2 / 2 } x' + t e^{ t^2 / 2 } x

= e^{ t^2 / 2 } ( x' + t x )

as claimed. So we have

( e^{ t^2 / 2 } x )' = e^{ t^2 / 2 } 2t

Integrate both sides:

e^{ t^2 / 2 } x = 2 e^{ t^2 / 2 } + c

so x = 2 + c e^{ - t^2 / 2 }

In particular, x = 2 is a solution - as you can easily check!


18.03 Class 5, Feb 17, 2006

Complex Numbers, complex exponential

Today, or at least 2006, is the 200th anniversary of the birth of


complex numbers. In 1806 papers by Abb\'e Bul\'ee and by Jean-Robert
Argand established the planar representation of complex numbers.
They had already been in use for several hundred years, but they were
kept fairly secret and were regarded as perhaps not entirely real.

[1] Complex Algebra

We think of the real numbers as filling out a line.


The complex numbers fill out a plane. The point up one unit
from 0 is written i . Addition and multiplication by real numbers is
as
vectors. The new thing is i^2 = -1 . The usual rules of algebra apply.
For example FOIL:

(1 + i)(1 + 2i) = 1 + 2i + i - 2 = -1 + 3i.

Every complex number can be written as a + bi with a and b real.

a = Re(a+bi) the real part


b = Im(a+bi) the imaginary part: NB this is a real number.

Maybe complex numbers seem obscure because you are used to imagining
numbers
by giving them units: 5 cars, or -3 miles. Complex numbers do not accept
units.
Also, there is no ordering on complex numbers, no "<."

Question 1. Multiplication by i has the following effect


on a complex number.

1. It rotates the number around the origin by 90 degrees


counterclockwise.

2. It rotates the number around the origin by 90 degrees clockwise.

3. It takes a number to the number pointing in the opposite direction


with the same distance from the origin.

4. It reflects the number across the imaginary axis.

5. It reflects the number across the real axis.

6. None of the above.

Compute: i(a + bi) = -b + ai ,

which is rotated by 90 degrees counterclockwise.

[2] Complex conjugation

Division occurs by "rationalizing the denominator:


1/(1+2i) = (1/(1+2i)) ((1-2i)/(1-2i))

Now general

(a+bi)(a-bi) = a^2 - (bi)^2 = a^2 + b^2 (*)

so we can continue

... = (1-2i)/(1+4) = (1-2i)/5.

____
(*) encourages us to define the "complex conjugate" a+bi = a - bi
_
and in these terms it reads: z.z = |z|^2
_
Divide by |z|^2 and z to see 1/z = z / |z|^2 .
___ _ _ __ _ _
Conjugation satisfies w+z = w + z , wz = w.z

Proofs: (a+bi) + (c+di) = (a+c) + (b+d)i has conjugate (a+c) - (b+d)i


______ ______
which coincides with (a+bi) + (c+di) = (a-bi) + (c-di) = (a+c) - (b+d)i

(a+bi)(c+di) = (ac-bd) + (ad+bc)i is conjugate to

(a-bi)(c-di) = (ac-bd) - (ad+bc)i

_
Question 2: If z = - z , then

1. z is purely imaginary

2. z is real

3. z lies on the unit circle

4. z = 0

5. None of the above

[3] Polar multiplication

Being points in the plane, complex numbers have polar descriptions.


The distance of z from zero is

|z| = "absolute value" = "modulus" = "magnitude" of z.

The angle up from the positive real axis is

Arg(z) = "argument" = "angle" of z.

As usual, it's only well defined up to adding multiples of 2 pi.

- Magnitudes Multiply : |wz| = |w||z| .

proof: It's not pleasant to compute absolute values - they involve


square
roots - but it's easy to compute squares:
____ __ _ _
|wz|^2 = (wz)(wz) = wzwz = wwzz = |w|^2|z|^2 = (|w||z|)^2

It follows that |wz| = |w||z| since both sides are positive.

- Angles Add: Arg(wz) = Arg(w) + Arg(z)

I'll check this in case w and z are both on the unit circle. Then:

(cos a + i sin a)(cos b + i sin b) =

((cos a)(cos b) - (sin a)(sin b)) + i ((cos a)(sin b) + (sin a)(cos b))

= cos(a+b) + i sin(a+b)

using the angle addition formulas for cos and sin .

In fact multiplication of complex numbers contains in it the angle

addition formulas for sin and cos , and if you understand complex

numbers you'll never have to memorize those formulas again.

This checks with our question about multiplication by i above.

Question 3. (1+i)^4 =

1. - 1

2. 4

3. - 4

4. - sqrt(2)

5. 4 i

6. None of the above

You went straight to the answer, but let's tabulate some powers:

(1+i)^0 = 1 , (z^0 = 1 as long as z isn't zero)

(1+i)^1 = 1+i has modulus sqrt(2) and angle pi/4

(1+i)^2 has modulus 2 and angle pi/2 : 2i

(1+i)^3 has modulus 2 sqrt(2) and angle 3 pi/4 : 2(-1+i)

(1+i)^4 has modulus 4 and angle pi : -4

The powers all lie on a spiral emanating from the origin.

[4] Complex exponential. An expression

z(t) = a(t) + i b(t)

parametrizes a curve in the plane. For example


z = 1 + it parametrizes a line running vertically through 1 .

The derivative is computed for each component, and gives you the
velocity

vector. Here this is i : vertical.

Here's an ODE we can try to solve: z' = iz , z(0) = 1. (**)

In lecture 1 we saw that e^{kt} is the solution to x' = kx, x(0) =

1.
So we will write the solution to (**) as e^{it} .

On the other hand we found out that multiplication by i is rotation by


90 degrees; so the solution is a curve such that the velocity vector is
always perpendicular to the radius vector. This is a circle, and if we
add the initial condition it is the unit circle:

z = cos t + i sin t

To check, compute

z' = - sin t + i cos t

iz = i cos t - sin t

and they agree. Thus:

e^{it} = cos t + i sin t. "Euler's formula."

In fact, for any complex number a+bi you can compute that the solution
to z' = (a+bi)z , z(0) = 1 , is

e^{(a+bi)t} = e^{at} (cos(bt) + i sin(bt))

With this we can compute the general exponential rule

e^{wt} e^{zt} = e^{(w+z)t} .

See also the Supplementary Notes or the Notes.


18.03 Class 6, Feb 21, 2006

Roots of Unity, Euler's formula, Sinusoidal functions

[1] Roots of unity

Let a > 0 . Since i^2 = -1 , (+- i sqrt(a))^2 = - a :

Negative real numbers have square roots in C.

Any quadratic polynomial with real coefficients has a root in C ,

by the quadratic formula

x^2 + bx + c = 0 has roots (-b +- sqrt(b^2 - 4c))/2

In fact:

"Fundamental Theorem of Algebra":

Any polynomial has a root in C (unless it is a constant function).

Special case: z^n = 1 : "n-th roots of unity"

n = 2 : z = +- 1

In general, if z^n = 1 , then |z^n| = 1 , but Magnitudes Multiply,

so |z| = 1 : roots of unity lie on the unit circle.

n = 3 : Angles Add, so if z^3 = 1 then the argument of z is 0

.....

no, not quite: it could be 2 pi / 3 , since three times that is 2 pi.

It's better to think of the argument of 1 as a choice:

0, or 2 pi, or -2 pi, or 4 pi, or ....

This gives

( -1 + sqrt 3 i ) / 2 .

Or it could be 4 pi / 3 , which gives

( -1 - sqrt 3 i ) / 2

That's it, there's no other way for it to happen. The cube roots of
unity

start with 1 and divide the unit circle evenly into 3 parts.

In general, the nth roots of unity divide the circle into n equal

parts.

How about z^4 = 16 ?

Now the magnitude must be a positive real fourth root of 16, namely, 2:

all the 4th roots of 16 lie on the circle of radius 2. 2 itself is one.

The others have argument such that 4 times the argument is

0, or 2 pi, or ...: so you get +- 2i and +- 2 .

How about z^3 = -8i ?

Well, magnitude must be 2 again. The argument of -8i is 3pi/2, so


one argument of z would be pi/2 : 2i is a cube root of -8i .
The others will differ from that by 2 pi / 3 or 4 pi / 3 . You get a
peace symbol, with verticies at 2i , -sqrt(3) - i , and sqrt(3) - i
.

[2] We saw that z' = iz , z(0) = 1 , has solution

z = cos(t) + i sin(t)

We saw this geometrically but you can also just check it:

z' = - sin(t) + i cos(t) = i (cos(t) + i sin(t))

We agreed to write this complex-valued function as e^{it} .

This is "Euler's formula":

e^{it} = cos(t) + i sin(t) .

In fact the same easy check shows that for any complex number a+bi
the solution of z' = (a+bi) z with z(0) = 1 is

z = e^{at} (cos(bt) + i sin(bt))

so we also agree to define

e^{(a+ib)t} = e^{at} (cos(bt) + i sin(bt)) (*)

That is, the magnitude of e^{(a+bi)t} is e^{at}


and the argument of e^{(a+bi)t} is bt

This definition (*) satisfies the expected exponential rule:

e^{(z+w)t} = e^{wt} e^{zt}

You can see this using the usual rule for real exponentials together
with the angle addition formulas, or by using the uniqueness theorem
for solutions to ODEs. See the Supplementary Notes.

General fact about complex numbers:


_ _

z + z z - z

----- = Re(z) ----- = Im(z)

2 2 i

Proof by diagram.
______
Apply this to z = e^{it}. I will need to know what e^{it} is.
Reflecting across the real axis reverses the angle: so
______

e^{it} = e^{-it} .

From Euler's formula, (**), and the "general fact" at the start, we find
e^{it} + e^{-it} e^{it} - e^{-it}
cos(t) = ---------------- sin(t) = ----------------
2 2 i

Sometimes these are also called Euler's Formulas.

Anything you want to know about sines and cosines can be obtained from

properties of the (complex) exponential function.

[3] Sinusoids

A "sinusoidal function" f(t) is one whose graph is shaped like a

(co)sine wave.

I drew a large general sinusoidal function.

I drew the graph of cos(theta) ; this is our model example of a

sinusoid.

A sinusoidal function is entirely determined by just three measurements,

or parameters:

The height of its maxima = depth of its minima = "amplitude," A

The elapsed time till it repeats = the "period" P

or (if spatial) the "wavelength" lambda

Now,

f(t) = A cos( ??? )

For the moment let's suppose t = 0 gives a maximum for f(t) .


We need to relate t to theta. I drew t and theta axes,

and saw that the relationship is theta = (2pi/P) t .

2pi/P is the number of radians per unit time. It is called the

the "circular" or "angular" frequency of f(t) . It has a special

symbol,

omega. When P units of time have elapsed, so have 2 pi radians.

The "frequency" is simply 1/P .

The offset from the standard picture = "time lag," t_0 .

This is the time at which f(t_0) = A . Usually you make sure 0 =< t_0

< P .

In terms of the parameters A , omega, t_0 , the general formula for a


sinuosidal function is

f(t) = A cos(omega (t - t_0))

There's another way to express the lag behind the cosine:

= A cos(omega t - phi) where phi = omega t_0

phi is the "phase lag." It's measured in radians. For example

sin(omega t) = cos(omega t - pi/2) .


18.03 Class 7, Feb 22, 2006

Applications of C:

Exponential and Sinusoidal input and output:

Euler: Re e^{(a+bi)t} = e^{at} cos(bt)


Im e^{(a+bi)t} = e^{at} sin(bt)

[1] Integration

Remember how to integrate e^{2t} cos(t) ?

Use parts twice. Or:

Differenting a complex valued function is done on the real and imaginary

parts.
Same for integrating.

e^{2t} cos(t) = Re e^{(2+i)t} so

int e^{2t} cos(t) dt = Re int e^{(2+i)t} dt

and we can integrate exponentials because we know how to differentiate


them! -

int e^{(2+i)t} dt = (1/(2+i)) e^{(2+i)t} + c

We need the real part.

Expand everything out: 1/(2+i) = (2-i)/5

e^{(2+i)t} = e^{2t} (cos(t) + i sin(t))

so the real part of the product is

(1/5) e^{2t} (2 cos(t) + sin(t)) + c

More direct than the high school method!

[2] Sinusoidal signals:

Solve x' + 2x = cos(t) : toy model for a cooler responding to


oscillating
temperature.

Use Variation of Parameter.

Homogeneous solution is e^{-2t} so substitute x = e^{-2t} u

and solve for u:

2 x = 2 e^{-2t} u

x' = -2 e^{-2t} u + e^{-2t} u'


_________________________

cos(t) = e^{-2t} u'

so u = int e^{2t} cos(t)


This is exactly what we integrated above:

u = (1/5) e^{2t} (2 cos(t) + sin(t)) + c

Going back, x = (1/5) (2 cos(t) + sin(t)) + ce^{-2t}

This is a general thing: a linear ODE with p constant and sinusoidal


input signal has a sinusoidal solution. If p > 0, any solution differs
from this one by transients which die out as t ---> infty.

[3] Linear constant coefficient ODEs with exponential input signal

Let's try x' + 2x = 4 e^{3t}

We could use variation of parameter or integrating factor, but instead

let's use the method of optimism, or the inspired guess. The inspiration
here is based on the fact that differentiation reproduces exponentials:

d
-- e^{rt} = r e^{rt}
dt

Since the right hand side is an exponential, maybe the output signal x
will
be too: TRY x = A e^{3t} . I don't know what A is yet, but:

x' = A 3 e^{3t}

2 x = 2 A e^{3t}

-----------------

4 e^{3t} = A (3+2) e^{3t}

which is OK as long as A = 4/5: x = (4/5) e^{3t} is one solution.


The general solution is this plus a transient:

x = (.8) e^{3t} + c e^{-2t} .

[4] Replacing sinusoidal signals with exponential ones

Let'e go back to the original ODE

x' + 2x = cos(t)

This equation is the real part of a complex valued ODE:

z' + 2z = e^{it}

This is a different ODE, and I use a different variable name, z(t) .

We just saw how to get an exponential solution: k = 2 , r = i :

z_p = 1/(i+2) e^{it}

To get a solution to the original equation we should take the real part
of this! Expand each factor in real and imaginary parts:
z_p = ((2-i)/5) ( cos(t) + i sin(t) )

x_p = Re(z_p) = (1/5) (2 cos(t) + sin(t) )

as before!

[5] This exponential method is so useful that I'd like to do the


general case: to solve x' + kx = B e^{rt} , try x = A e^{rt} :

x' = A r e^{rt}

kx = k A e^{rt}

______________________

B e^{rt} = A (r + k) e^{rt}

A = B / (r + k) so:

The Exponential Response Formula (for first order linear ODEs)

The general solution to

x' + kx = B e^{rt} (*)

is x = (B/(r+k)) e^{rt} + c e^{-kt}

as long as r + k is not 0 .

[6] Rectangular expressions for sinusoidal functions.

I claim that

a cos(omega t) + b sin(omega t)

is sinusoidal. To see this I'll start with the general expression

f(t) = A cos(omega t - phi)

and try to find out what I should take for A and phi. Expand this
using the cosine difference formula:

f(t) = A cos(phi) cos(omega t) + A sin(phi) sin(omega t)

So I should try to find A, phi , such that

a = A cos(phi) and b = A sin(phi)

There's a name for such A , phi: they are the polar coordinates of
the point (a,b) in the plane. They do exist!

Example: cos(2t) + sqrt(3) sin(2t):

(a,b) = (1,sqrt(3)) which has polar cooridinates A = 2 , phi = pi/3

so cos(2t) + sin(2t) = 2 cos( 2t - pi/3 )

I used the Mathlet Trigonometric Id to illustrate this.

Remarkable fact: Any sum of sinusoidal functions with given period


is again sinusoidal (with the same circular frequency).
18.03 Class 8, Feb 24, 2006

Autonomous equations

I'll use (t,y) today.

y' = F(t,y) is the general first order equation

Autonomous ODE: y' = g(y) .

Eg [Natural growth/decay] Constant growth rate: so y' = k0 y .

k0 > 0 means the populuation (if positive) is growing; k0 < 0 means it

is falling, decaying.

Autonomous means conditions are constant in time, though they may depend

on the current value of y .

Eg [Logistic equation] Variable growth rate k(y), depending on the

current population but NOT ON TIME; so y' = k(y) y.

Suppose that when y is small the growth rate is approximately k0 ,

but that there is a maximal sustainable population p , and as y gets near to

p the growth rate decreases to zero. When y > p , the growth rate becomes

negative; the population declines back to the maximal sustainable

population. Simplest version:

A graph of k(y) against y , straight line with vertical intercept

k0 and horizontal intercept p :

k(y) = k0 (1 - (y/p)).

so k(0) = k0 , and k(p) = 0 .

The Logistic Equation is y' = k0 (1 - (y/p)) y = g(y) .

This is more realistic than Nat Growth for large populations. It is

nonlinear.

Autonomous equations are always separable, but we aim for a

qualitative grasp of solutions. Sketch direction field, isoclines first.

Values of y such that g(y) = 0, are called "critical points" for the

equation y' = g(y). The horizontal lines with these values of y form

the nullcline. They are also graphs of solutions, constant solutions

or "equilibria."

Isoclines are collections of horizontal lines.

In the logistic case, g(y) = 0 when y = 0 and when y = p ..

These are thus the only constant solutions.

To see the rest of the direction field, plot the graph of g(y).

It is a parabola opening downward, meeting the horizontal

axis at y = 0 and y = p .

This says that for y < 0 the slopes are negative


for 0 < y < p the slopes are positive
for y > p the slopes are positive.

I drew some isoclines and some solutions. This is the "Logistic" or "S"

curve. I showed a graph from the article "Thwarted Innovation," showing

the penetration of technological innovations.

If the population exceeds the maximal stable population, it falls back

towards it. The max stable population is a "stable equilibrium;"

the zero population is "unstable."

Since the direction field is constant horizontally, its essent content

can be compressed. Draw a vertical line. Mark on it the equilibria,

where g(y) = 0. In between them, draw an upward pointing arrow if

g(y) > 0 and a downward pointing arrow if g(y) < 0 . This simple

diagram tells you roughly how the system behaves. It's called the

"phase line."

Question 8.1. In the autonomous equation y' = g(y) , where g(y) has

a graph which I sketch, looking like g(y) = y^3 - y , is the rightmost

critical point stable or unstable?

This can be made clear by sketching the phase line.

In terms of the graph of g(y), the stable equilibria occur when

g'(p) < 0,

unstable when g'(p) > 0.

Now, suppose we model a fish population by means of a logistic equation.

In suitable units (megafish and years, perhaps) the equation is y' =

(1-y)y : the limiting population is p = 1.

Now fishing is allowed, at a rate of a megafish per year. The new

equation is

y' = (1-y)y - a

I invoked the Mathlet <Phase Lines> to visualize what happens.

As a increases, the graph of g(y) moves down; the equilibria move

closer together. This says that the range of populations which are

stable is declining: the maximum sustainable population decreases:

[ it's the larger root of y^2 - y + a = 0 ] ; a minimal sustainable

population also appears, and if the population falls below that it

crashes to zero.

If the harvest rate is pushed still higher, the two collide;

this is "semistable": the graph of g(y) is tangent to the horizontal

axis, and the population is declining on both sides of it.

Beyond that there are no equilibria.

I returned a to zero and opened the Bifurcation Diagram. and watched


what happened as a increased.

Let's compare autonomous equations with the


calculus case: y' = f(t) . Solutions given by the indefinite integral of
f(t): F(t) + c. Direction field constant in the vertical direction. Any
vertical translate of a solution is a solution.

In the autonomous case, y' = g(y) , the conditions represented by the


ODE are constant in time. Direction fields are constant in the horizontal
direction.
Any horizontal (time) translate of a solution is another solution.

Ex. y' = k_0y has three "fundamental solutions,"

y = e^{k_0 t} , y = 0 , y = - e^{k_0 t}

and any solution is a horizontal translate of one of them.


As we know, the C in Ce^t comes from e^{t-c} = e^{-c} e^t
with a sign or zero put in as well.

Question 1. Solutions of autonomous equations can never have


strict local maxima or minima.

(A strict local maximum for f(t) is a time t = a such that


f(a) > f(t) for all t near but not equal to a .)

1. True

2. False

Extreme points occur where y' = 0 , i.e. where g(y) = 0. These


are the constant solutions, and they don't have strict maxima or minima.
So it's true, solutions can't have strict extrema.

Question 2. Nonconstant solutions of the autonomous ODE y' = g(y)


have inflection points at y for which:

1. g(y)=0

2. g'(y)=0

3. g''(y)=0

y" = g'(y) y' by the chain rule. So if y" = 0 at y = c then either


g'(c) = 0 (constant solutions) or g'(c) = 0 there. So (2) is the
case.
You can see it on the S curve.
18.03 Class 9, Feb 27, 2006

Review: Linear v Nonlinear

[1] review of linear methods

[2] Comment on special features of solutions of linear first order ODEs


not shared by nonlinear equations.

[1] First Order Linear: x' + p(t) x = q(t)

system; input signal; output signal = system response.

General comment: for first order LINEAR equations,


the solutions always are of the form

x = x_p + c x_h

where x_p is SOME solution ("particular solution") and x_h is a


nonzero solution of the homogeneous equation. If p > 0 , c x_h
deserves to be called a "transient"; it dies away and leaves x_p.

Decision tree for solving first order linear equations

Separable? ( p and q are both constant, or if q = 0 )

- If yes, then solve by separation of variables.

- If no:

Is the "coefficient" p constant?: "constant coefficient"

- If yes, solution to homogeneous equation is e^{-pt} .

- Is the signal exponential? q(t) = B e^{rt} , r constant

If so, try x = A e^{rt} and solve for A.

- Is the signal sinusoidal? especially B cos(omega t)

If so, replace with z' + p z = B e^{i omega t} ,


solve that, and take the real part of the solution.

- Otherwise, use either

Variation of parameter or Integrating factor.

Note: VP and IF do work in general, they are just less efficient.

[2] Examples: x' + 2 x = e^{-2t} ( t + 1 )

Not separable; constant coefficient but signal neither exponential nor


sinusoidal. So:

VP: Homogeneous solution: e^{-2t} . Try x = e^{-2t} u


x' = - 2 e^{-2t} u + e^{-2t} u'

2 x = 2 e^{2t}
--------------------------------

e^{-2t} ( t + 1 ) = e^{-2t} u'

or u' = t + 1 so u = t^2/2 + t + c

and x = e^{-2t} ( t^2/2 + t + c )

IF: Multiply through by the inverse of the homogeneous solution, called


the "integrating factor":

t + 1 = e^{2t} ( x' + 2x ) = ( e^{2t} x )'

so t^2/2 + t + c = e^{2t} x

and x = e^{-2t} ( t^2/2 _ t + c )

[3] Review of exponential replacement:

eg x' + 2 x = 4 cos(2t) <----


| Re
z' + 2 z = 4 e^{2it} ----

Try z = A e^{2it}

z' = A 2i e^{2it}

2 z = 2 A e^{2it}
----------------------
4 e^{2it} = A ( 2 + 2i ) e^{2it}

so A = 4 / ( 2 + 2i ) = 2 / (1 + i )

z_p = ( 2 / ( 1 + i ) ) e^{2it}

There are two ways to get the real part out of this.
Which to use depends upon what you want.

(1) Solution as a cos(omega t) + b sin(omega t) :


Expand both factors into a + bi :

z_p = ( 1 - i ) ( cos(2t) + i sin(2t) )

so x_p = cos(2t) + sin(2t)

This gives the sinusoidal response in "rectangular form."

(2) Solution as A cos(omega t - phi): Expand both factors in polar


form:

1 + i = sqrt(2) e^{pi i/4}

so 2 / ( 1 + i ) = (2/sqrt(2)) e^{-pi i/4}


and z_p = sqrt(2) e^{i(2t - pi/4)}

The real part is

x_p = sqrt(2) cos (2t - pi/4)

The amplitude is sqrt(2) and the phase lag is pi/4 .

[4] Comparison with solutions of nonlinear equations:

e.g. x' = x^2 : separable, x^{-2} dx = dt ,

- x^{-1} = t + c

x^{-1} = c - t

x = 1 / (c - t)

The constant of integration is in a different place.

If I start with x(0) = 1 , 1 = 1/c so c = 1 and x = 1 / ( 1 - t


)

This reaches infinity at t = 1 ! This behavior does not happen for


linear
equations: if p(t) and q(t) are well behaved (eg don't zip off to
infinity themselves) then all solutions exist and stay finite for all
time.

This behavior leads to some danger. Once we've gone up to infinity on


this solution, the solution ENDS. There's no reasonable way to say
which branch you might come back on when t > 0 .

Properly speaking, solutions of differential equations are required to


have connected graphs.

1 / ( 1 - t ) actually describes TWO solutions: one for t < 0 ,


one for t > 0 .

This kind of explosion actually happens in the case of Newton's laws:

Jeff Xia showed that a certain 5-planet system moves off to infinity
in finite time!
18.03 Class 11, March 3, 2006

Second order equations: Physical model, characteristic polynomial,


real roots, structure of solutions, initial conditions

[1] F = ma is the basic example. Take a spring attached to a wall,

spring mass dashpot

|
|| |-------> F_ext ||
|| | ||
|| ___|___ _____________ ||
|| | | _____ | ||
||---VVVVVVV---| |------|_____| |-------||

|| |_______| _____________| ||
|| O | O ||
|| | ||
|------->

| x

Set up the coordinate system so that at x = 0 the spring is relaxed.

The cart is influenced by three forces: the spring, the "dashpot"


(which is a way to make friction explicit), and an external force:

mx" = F_spr + F_dash + F_ext

The spring force is characterized by depending only on position:


write F_spr(x).

If x > 0 , F_spr(x) < 0

If x = 0 , F_spr(x) = 0

If x < 0 , F_spr(x) > 0

I sketched a graph of F_spr(x) as a function of x .


The simplest way to model this behavior (and one which is valid in
general
for small x , by the tangent line approximation) is

F_spr(x) = -kx k > 0 the "spring constant." "Hooke's


Law"

This is another example of a linearizing approxmimation.

The dashpot force is frictional. This means that it depends only on the

velocity. Write F_dash(x'). It acts against the velocity:

If x' > 0 , F_dash(x') < 0

If x' = 0 , F_dash(x') = 0

If x' < 0 , F_dash(x') > 0

The simplest way to model this behavior (and one which is valid in
general
for small x', by the tangent line approximation) is

F_dash(x) = -bx b > 0 the "damping constant."

So the equation is
mx" + bx' + kx = F_ext

The left hand side represents the SYSTEM, the spring/mass/dashpot


system.
The right hand side represents the INPUT SIGNAL, an external force at
work.
The quantities m , b , k are the "coefficients." In general they may
depend
upon time: maybe the force is actually a rocket, and the fuel burns so
m
decreases. Maybe the spring gets softer as it ages. Maybe the honey in
the
dashpot gets stiffer with time.

The "standard form" of a second order linear ODE is gotten by dividing


by
mass. (This makes sure the x" is really there, instead of being
multiplied
by zero!)

x" + b(t) x' + k(t) x = q(t)

Most of the time we will assume that the "coefficients" b(t) and k(t)

are CONSTANT. This is another simplifying approximation.

But the input signal q(t) can certainly vary.

[2] Solutions. To get from x" to x we must integrate twice, so you


should
expect two constants of integration in the general solution.

Physically, you can release the spring at t = t0 from x(t0) , but


you also have to say what velocity you impart to it: x'(t0) is needed
as part of the initial condition. I drew some potential graphs of
solutions
through a single point.

So: In the case of second order equations, solutions can cross.


There is no concept of direction field.

Still, initial conditions (x(t0), x'(t0)) determine the solution.

[3] Today we'll find some solutions in the constant coefficient


homogeneous
case. This means F_ext = 0 : the system is allowed to evolve on its
own, without outside interference.

I displayed a rubber band with a weight on it. It bounced. I asked


whether
all solutions to systems like this bounce. Most people thought no. Let's
see.

Constant coeffient, homogeneous: mx" + bx' + kx = 0 (*)

This is a lot like x' + kx = 0 , which has as solutoin x = e^{-kt}


(and more generally multiples of this). It makes sense to try for
exponential
solutions of (*): c e^{rt} for some as yet undetermined constants c
and r.
To see which r might work, plug x = e^{rt} into (*). Organize the
calculation: the k] , b] , m] are flags indicating that I should
multiply
the corresonding line by this number.

k ] x = c e^{rt}

b ] x' = c r e^{rt}

m ] x" = c r^2 e^{rt}

___________________

0 = mx" + bx' + kx = c ( mr^2 + br + k ) e^{rt}

An exponential is never zero, so we can cancel to see that c e^{rt} is


a
solution to (*) for any c exactly when r is a root of the
"characteristic
polynomial"

p(s) = ms^2 + bs + k

Example A. x" + 5x' + 4x = 0

The characteristic polynomial s^2 + 5s + 4 . We want the roots. One


reason
I wanted to write out the polynomial was to remember that you can find
roots
by factoring it. This one factors as (s + 1)(s + 4)
so the roots are r = -1 and r = -4 . The corresponding exponential
solutions
are c1 e^{-t} and c2 e^{-4t} .

It's also true that the SUM

c1 e^{-t} + c2 e^{-4t}

is a soluion as well. This is because you can differentiate the two


solutions
separately....

[4] Here's the appearance of the general solution of a second order


homogeneous linear ODE

x" + b(t) x' + k(t) x = 0 (*)

For any pair of solutions x1 , x2 , neither of which is a constant


multiple
of the other, the general solution to (*) is

x = c1 x1 + c2 x2 "linear combination"

Just two solutions determine all solutions. This is like saying that
for any two vectors in the plane such that neither is a multiple of the
other,
every vector in the plane is a linear combination of them.

This depends strongly on LINEARITY and HOMOGENEITY but not on CONSTANT


COEFF.
So the general solution in our example is

x = c1 e^{-t} + c2 e^{-4t}

[5] Initial conditions. Suppose we start at t = 0 with x(0) = 1


and x'(0) = 2 .

x' = - c1 e^{-t} - 4 c2 e^{-4t}

1 = x(0) = c1 + c2

2 = x'(0) = - c1 - 4 c2

and we have to solve a pair if linear equations. Elimitate the unknowns,


here by adding the equations, for example:

3 = -3 c2 so c2 = - 1

and then c1 = 1 - c2 = 2:

x = 2 e^{-t} - e^{-4t}
18.03 Class 12, March 6, 2006

Homogeneous constant coefficient linear equations: complex or repeated

roots,

damping criteria.

[1] We are studying equations of the form

x" + b x' + k x = 0 (*)

which model a mass, dashpot, spring system without external forcing


term.

We found that (*) has an exponential solution e^{rt} exactly when


r is a root of the "characteristic polynomial"

p(s) = s^2 + bs + k

Example A. x" + 5x' + 4x = 0 . We did this:


The characteristic polynomial s^2 + 5s + 4 factors as (s + 1)(s + 4)
so the roots are r = -1 and r = -4 . The corresponding exponential
solutions
are e^{-t} and e^{-4t} . The general solution is a linear
combination
of these: x = c1 e^{-t} + c2 e^{-4t} .

All solutions go to zero: no oscillation here. When the roots are real
and
not equal to each other the system is called "Overdamped."

Example B. x" + 4x' + 5x = 0


The characteristic polynomial s^2 + 4s + 5 has roots

r = -2 +- sqrt(4-5) = -2 +- i

Our old friend i = sqrt(-1) appears, and we have exponential solutions

e^{(-2+i)t} , e^{(-2-i)t}

I guess we were expecting REAL valued solutions. For this we have:

Theorem: If x is a complex-valued solution to mx" + bx' + kx = 0,

where m, b, and k

are real, then the real and imaginary parts of x are also solutions.

Proof: Write x = u + iv and build the table.

k ] x = u + iv

b ] x' = u' + iv'

m ] x" = u" + iv"

___________________

0 = (mu" + bu' + ku) + i(mv" + bv' + kv)

Both things in parentheses are real, so the only way this can happen is
for
both of them to be zero.

So in our situation,

e^{(-2+i)t} has real part e^{-2t} cos(t)


and imaginary part e^{-2t} sin(t)

so we have those two solutions. Taking linear combinations, we get the


general solution

x = e^{-2t} ( a cos(t) + b sin(t) )

= A e^{-2t} cos(t - phi)

This is a "damped sinusoid," with "circular pseudofrequency" omega = 1.


When the roots are not real the system is called "Underdamped."

Note: I used only ONE of the two exponential solutions here.

If I had used the other, e^{(-2-i)t} = e^{-2t} e^{-it} , I would have

gotten real and imaginary parts

e^{-2t} cos(t) and e^{-2t} sin(-t} = - e^{-2t} sin(t)

The collection of linear combinations of these two functions is the


same as the set of linear combinations of the original two. It makes
no difference which exponential function you use; you end up with
the same set of solutions.

Example C: x" + kx = 0 , k > 0 : no damping : "Harmonic Oscillator."

Roots are +- sqrt(k) give e^{i sqrt(k) t} and e^{-i sqrt(k) t}

with real and imaginary parts cos(sqrt(k) t) and sin(sqrt(k) t)

sqrt(k) is called the "natural circular frequency" of the


harmonic oscillator, and is written omega_n. To recap:

x" + omega_n^2 x = 0 has independent real solutions

cos(omega_n t) and sin(omega_n t)

and so has general solution

x = a cos(omega_n t) + b sin(omega_n t)

= A cos(omega_n t - phi)

You can check easily and directly that this is a solution.

[2] Remark on roots and coefficients: If the roots of s^2 + bs + k = 0


are r1 and r2 then

s^2 + bs + k = (s - r1)(s - r2) = s^2 -(r1+r2)s + k

so
-- sum of the roots is - b : so the average of the roots is -b/2 .

-- product of the roots is k

Question 1: If k and b are both positive, then all


solutions of x" + bx' + kx = 0

1. oscillate

2. die away as t --> infinity

3. are exponential (though perhaps complex)

4. are damped sinusoids

5. none of the above

1 and 4 are violated by Ex A.


3 is not right; in Ex A , e^{-t} and e^{-4t} are both exponential
functions, but their sum is not. Generally solutions are built up out of
exponentials, but they are not all exponential.

2: This is tricky: If the roots are not real, then the solutions
are e^{-bt/2} times a sinusoid, so they die away. If they are real,
then the solutions are combinations of e^{r1 t} and e^{r2 t}

Notice that (r1)(r2) = k implies that r1 and r2 are of the same


sign.
Then r1 + r2 = - b , so that sign is negative. Thus all these
solutions
die off too.

[3] We have not yet considered the critically damped case.

This is transitional;

k = (b/2)^2 so the equation is x" + bx' + (b/2)^2 x = 0 . There is

just

one characteristic root, r = -b/2 , and so just one exponential

solution,

e^{-bt/2}.

The fact is that we can write down another solution, namely t e^{-bt/2}

You can check that this is a solution.

The general solution is (at+b) e^{-bt/2} and it dies away in that case

too.

So the correct answer is 2.

Here is a summary table of unforced system responses. One of three

things must

happen. I'll take m = 1

Name* b,k relation Char. roots Exp. sol's Basic real

solutions

Overdamped b^2/4 > k Two diff. real e^{r1 t}, e^{r2 t} same

Critically b^2/4 = k Repeated root e^{rt} e^{rt},

te^{rt}

damped

Underdamped b^2/4 < k Non-real roots e^{r1 t}, e^{r2 t} (see

below)

* The name here is appropriate under the assumption that b and k are
both
non-negative. The rest of the table makes sense in general, but it
doesn't
have a good interpretation in terms of a mechanical system.

The quadratic formula is

r = (- b +- sqrt(b^2 - 4k)) / 2

= -b/2 +- sqrt((b/2)^2 - k) so

-- the roots are real if b^2 >= 4k


repeated if b^2 = 4k
non-real complex conjugate if b^2 < 4k [and the real part is -
b/2]
18.03 Class 13, March 8, 2006

Summary of solutions to homogeneous second order LTI equations;


Introduction to inhomogneneous equations.

[1] We saw on Monday how to solve x" + bx' + kx = 0.

Here is a summary table of unforced system responses. One of three


things must
happen to solutions of x" + bx' + kx = 0 .

Name* b,k relation Char. roots Basic real solutions

Overdamped b^2/4 > k Two diff. real e^{r1 t}, e^{r2 t}


r1, r2

Critically b^2/4 = k Repeated root e^{rt}, te^{rt}


damped r = -b/2

Underdamped b^2/4 < k Non-real roots e^{at} cos(ct),


a +- ci e^{at} sin(ct)

* The name here is appropriate under the assumption that b and k are
both
non-negative. The rest of the table makes sense in general, but it
doesn't
have a good interpretation in terms of a mechanical system.

If b > 0 and k > 0 , then all solutions die off. The are "transients."

In the underdamped case, the roots are -b/2 +- i sqrt(k - (b/2)^2).


The imaginary part of the roots is +- omega_d where

omega_d = sqrt(k - (b/2)^2)

is the "damped circular frequency," and the real part of the roots is
the "growth rate" -b/2 :

-b/2 +- i omega_d

The basic solutions are e^{-bt/2} cos(omega_d t) ,


e^{-bt/2} sin(omega_d t) ,

and in "polar form" the general solution is

x = A e^{-bt/2) cos(omega_d t - phi) (*)

Some people prefer to call omega_d the "pseudofrequency" of (*) ,


since unless b = 0 this is not a periodic function and so properly
speaking doesn't have a frequency.

Notice that as you increase damping, the pseudofrequency decreases,


slowly at first, but faster as the damping approaches critical damping.
At that instant, the pseudoperiod becomes infinite and you don't get
solutions which cross the axis infinitely often. This is subtle but
visible on "Damped Vibrations."
In the complex plane, the roots look like this:

-b/2 + i omega_d |

*
|
|

_______________________________________
|
|

-b/2 - i omega_d |

* |

|
|

I showed Poles and Vibrations, with B = 0.

Question 1: If I move the roots the the left,

1. The amplitude of the solutions decreases

2. The pseudofrequency of the solutions decreases

3. The solutions decay to zero faster

4. None of the above, necessarily

Question 2: If I move the roots towards the real axis,

1. The pseudoperiod increases

2. The amplitude of solutions decreases

3. The solutions decay to zero faster

4. None of the above, necessarily

[2] The roots of s^s + bs + k , -b/2 +- sqrt( (b/2)^2 - k ), are


:--
k

. |<-----purely imaginary

. complex roots .
. | .
. Re < 0 | Re > 0 .<----- repeated if k = b^
2/4
. | .
. | .
real < 0 . | . real > 0
.. | ..
.. | ..
------------ ....... ------------> - b

^
|
real, opposite sign |______ at least one zero
root

Here is a summary table of unforced system responses. One of three


things must
happen. I'll take m = 1 .

^
. |<----- sinusoidal solutions
. | .
. | .
. stable, | unstable, .<----- t e^{rt} too if k
= b^2/4
. oscillating
| oscillating .
. | .
stable . | . unstable, not oscillating
not oscillating.. | ..
.. | ..
------------ ....... ------------> - b

^
|
most solutions grow |______ some nonzero
constant
solutions

Question 3: You observe an unforced system oscillating, and notice that


the time between maxima spreads out as time goes on.

From this you can conclude:

1. The system can be modeled by the constant coefficient equation


x" + bx' + omega_n^2 x = 0 where 0 < b < 2\omega_n.

2. This system is nonlinear.

3. This system is linear but the coefficients are not constant in time.
4. Either 2 or 3 holds but we can't say which.

[3] INHOMOGENEOUS EQUATIONS

I drew the spring/mass/dashpot system and added a force to it:

the little blue guy comes back into play.

mx" + bx' + kx = F_ext (*)

Also important will be the "associated homogeneous equation"

mx" + bx' + kx = 0 (*)_h

Input signals we will study:

Constant

Sinusoidal

Exponential, Exp times sinusoidal

Polynomial

Exp times other (eg polynomial)

Sums of these

General periodic functions (via Fourier series)

The general strategy in finding solutions is:

Superposition II: If xp is any solution to (*) and xh is a


solution to
(*)_h, then xp + xh is again a solution to (*).

Proof: Plug x into (*):

k) x = xp + xh
b) x' = xp' + xh'
m) x" = xp" + xh"
__________________
mx" + bx' + kx = (m xp" + b xp' + k xp) + (m xh" + b xh' + k xh) = F_ext
+ 0

as we wanted.

In fact, if xh is the general solution to (*)_h then xp + xh is


the
general solution to (*).

This is to be compared with

Superposition I: If x1 and x2 are solutions of a homogeneous


linear equation, then so is any linear combination c1 x1 + c2 x2 .
Superposition II splits the problem of finding the general solution to
(*) into two parts:

(1) find SOME solution to (*), a "particular solution," and then

(2) find the general solution of (*)_h (which we have worked on for a
while).

[4] First case: harmonic sinusoidal response.


Drive a harmonic oscillator by a sinusoidal signal:

x" + omega_n^2 x = A cos(omega t) (**)

There are two frequencies here: the natural frequency of the system
and the frequency omega of the input signal.

I showed what happens with a weight on a rubber band: for small omega
the weight follows the motion of my hand; it passes "resonance," where
the response amplitude is large; and when omega is larger the response
is exactly anti-phase. Why? And what's this resonance?

It looks like perhaps there is a solution of the form

xp = B cos(omega t)

To see what B must be, plug this into (**) :

omega_n^2) xp = B cos(omega t)
xp" = - B omega^2 cos(omega t)
-----------------------------------
A cos(omega t) = xp" + omega_n^2 xp = B(omega_n^2 - omega^2) cos(omega
t)

This works out if we take

B = A / (omega_n^2 - omega^2) .

The output amplitude is a multiple of the input amplitude, and the


ratio is the GAIN:

H = B/A = 1/|omega_n^2 - omega^2|

Imagine the natural frequency of the oscillator fixed, and we slowly


increase
the frequency of the input signal. The graph of the gain starts when
omega = 0 at H = 1/omega_n^2 and then increases to a vertical
asymptote at
omega = omega_n . This is RESONANCE, and then no such sinusoidal
solution
exists. There are solutions, of course, and we will come back to this
case
later. What happens with the weight and rubber band is that the
nonlinear
character of the spring asserts itself for large amplitude.

When omega > omega_n , the gain falls back towards zero.

Also: when omega < omega_n the denominator is positive, and the
output
is a positive multiple of the input. When omega > omega_n the
denominator
is negative, and the output signal is a negative multiple of the input:
this is PHASE REVERSAL.

On Friday we'll add in damping.


18.03 Class 14, March 10, 2006

Exponential signals, higher order equations, operators

[1] Exponential signals

x" + bx' + kx = A e^{rt} (*)

We want to find some solution.

Try for a solution of the form xp = B e^{rt} :

k] xp = B e^{rt}

b] xp' = B r e^{rt}

xp" = B r^2 e^{rt}


_____________________

A e^{rt} = B ( r^2 + br + k ) e^{rt}

or xp = ( A / p(r)) e^{rt}

where p(s) = s^2 + bs + k is the characteristic polynomial.

Eg x" + 2x' + 2x = 4 e^{3t} p(3) = 3^2 + 2(3) + 2 = 17 so

xp = ( 4 / 17 ) e^{3t} .

The general solution is given by

x = (4/17) e^{3t} + e^{-t} ( a cos(t) + b sin(t) )

Of course this will let us solve (*) for sinusoidal signals as well:

Eg y" + 2y' + 2y = sin(3t)

This is the imaginary part of

z" + 2z' + 2z = e^{3it} p(3i) = (3i)^2 + 2(3i) + 2 = -7 + 6i


so

zp = ( 1 / (-7 + 6i) ) e^{it}

We want the imaginary part. Lets do it by writing out real and imaginary
parts:

zp = ( (-7 - 6i) / 85 ) ( cos(3t) + i sin(3t) )

and find the imagnary part of the product:

yp = - (7/85) cos(3t) + (6/85) sin(3t)

The general solution is

y = - (7/85) cos(3t) + (6/85) sin(3t) + e^{-t} ( a cos t + b sin t ).


The work shows:

The Exponential Response Formula: a solution to x" + bx' + kx = A e^


{rt}

is given by xp = ( A / p(r) ) e^{rt} provided p(r) is not zero.

[2] Higher order equations

A better model for the weight at the end of the rubber band is:

My hand ----> ----------------------------------------- y = 0

| |

> |

< | y

> |

< V

|
|
---------
| m |------------------------- x = 0
---------
|
|

| x

y is the position of the plunger, relative some choice of zero


point. Arrange it so that if y = x = 0, the mass is at rest.
A constant upward force on the mass exerted by the spring cancels
gravity,
and we simply ignore both. The "relaxed" position of the rubber band
just cancels the force of gravity.

Thus the net downward force on the mass is given by

m x" = k ( y - x )

m x" + k x = k y(t)

It's time to think bigger.

Most systems are more general than the simple spring/dashpot/mass system
we have been looking at. For example,

-----------------------------------------------

| |

> |

k1 < | y(t)

> |

< V

|
|
---------

| m_1
|-------------------------

--------- |

| |

> | x_1

k2 < |

> V

<

---------

| m_2
|------------------------

--------- |

|
| x_2

Now m1 x1" = k1 ( y(t) - x1 ) - k2 ( x2 - x1 )

m2 x2" = k2 ( x1 - x2 )

If you differentiate the second equation twice and plug in the first,

you get a fourth order equation for x2 .

When I do this I get:

m1 m2 x2^(4) + [m1 k2 + m2 k1 - m2 k2] x2" + (k1 k2) x2 = (k1 k2) y


(t)

This is a general thing: more complicated systems are described by


higher order equations. When the parameters (x1, x2, ...) aren't too
big, they are controlled by linear ODEs with constant coefficients.

Such an equation has the form

an x^{(n)} + ... + a1 x' + a0 x = q(t) (*)

The theory of such systems is just like the theory we have developed
for first and second order linear constant coefficient equations.
The left hand side represents the system; the numbers ak are the
"coefficients." The system is called a "Linear Time Invariant" or LTI
system. It has a "characteristic polynomial,"

p(s) = an s^n + ... + a1 x + a0

and the roots of p(s) give rise to exponential solutions to the


homogeneous equation

an x^{(n)} + ... + a1 x' + a0 x = 0 (*)h

The general solution of (*) is gotten by finding some solution, xp ,


and adding to it the general solution xh of (*)h .
[3] Operators

Here's a neat piece of notation: Dx = x'

D takes a funtion as input and returns a new function back as output:

It is an "operator." It's the "differntiation operator."

We can iterate: D^2 = x" .

There's also the "identity operator": Ix = x

And we can add: (D^2 + 2D + 2I) x = x" + 2x' + 2x .

The characteristic polynomial here is p(s) = s^2 + 2s + 2 , and

it's irresistable to write

D^2 + 2D + 2I = p(D)

so x" + 2x' + 2x = p(D) x

This works just as well with higher order LTI operators:

an x^{(n)} + ... + a1 x' + a0 x = p(D) x

Our work shows the

Exponential Shift Formula: A solution of p(D) x = A e^{rt} is given


by

xp = ( A / p(r) ) e^{rt}

provided that p(r) is not zero.

Example: x' + kx = e^{rt} : p(s) = s + k , x' + kx = (D + kI) x, and

a solution is given by xp = ( A / (r+k) ) e^{rt}

-- a result we saw when we were looking at first order liner equations.

18.03 Class 15, March 13, 2004

Operators: Exponential shift law


Undetermined coefficients

[1] Operators. The ERF is based on the following calculation:

D e^{rt} = r e^{rt} = rI e^{rt}

so D^n e^{rt} = r^n I e^{rt}

and (a_n D^n + ... + a_0 I) e^{rt} = (a_n r^n + ... + a_0) e^{rt}

or p(D) e^{rt} = p(r) e^{rt}

So to solve p(D) x = A e^{rt} , try x_p = B e^{rt} ;

p(D) (B e^{rt}) = B p(D) e^{rt} = B p(r) e^{rt}

so we should take B = A/p(r) : x_p = e^{rt}/p(r) .

What if p(r) = 0? eg x" - x = e^{-t} . (*)

The key to solving this problem is the behavior of D on products:

(d/dt) (xy) = x' y + x y'

In terms of operators:

D(vu) = v Du + u Dv

Especially: D(e^{rt} u) = e^{rt} Du + u r e^{rt}

= e^{rt} ( Du + ru )

= e^{rt} ( D + rI ) u

Apply D again:

D^2 (e^{rt} u) = D( e^{rt} (D+rI)u )

= e^{rt} (D+rI)(D+rI) u

= e^{rt} (D+rI)^2 u

Use: let's try a variation of parameters approach to solving (*):

Try for x = e^{-t} u

Then D^2 x = e^{-t} (D-I)^2 u

-1] x = e^{-t} I u
-------------------------
e^{-t} = e^{-t} ( (D-I)^2 - I ) u

so want ( (D-I)^2 - I ) u = 1
or ( D^2 - 2D ) u = 1 i.e. u" - 2u' = 1

and this we can do by "reduction of order": say v = u', so


we have v' - 2v = 1 . With a constant right hand side, you get
a constant solution (unless the coefficient of v is zero): v = -
1/2.

Then u = -t/2 and x_p = - t e^{-t}/2 .

Putting this together we get the "Exponential Shift Law":

p(D) ( e^{rt} u ) = e^{rt} p(D+rI) u

and using it we find:

ERF2: If p(r) = 0 then a solution of p(D) x = A e^{rt} is given by

x_p = (a/p'(r)) t e^{rt} provided p'(r) is not zero.

In our case, p(s) = s^2 - 1 so p'(s) = 2s and p'(-1) = -2,


and you recover the solution we worked out.

This is described in more detail in the Notes.

[2] Polynomial signals: Undetermined coefficients.

Notice that if p(s) = a_n s^n + a_(n-1) s^{n-1} + ... + a_1 s + a_0
then p(0) = a_0.

Theorem (Undetermined coefficients) Take q(t) = b_k t^k + ... + b_1 t


+ b_0 .
p(D)x = q(t) has exactly one solution which is polynomial of degree
less
than or equal to k , provided that p(0) = a_0 is not zero.

Proof by example:

x" + 2x' + 3x = t^2 + 1

The theorem applies since 3 is not 0 : there is a solution of the


form

x = at^2 + bt + c

To find a , b , c , plug in:

3) x = at^2 + bt + c

2) x' = 2at + b

1) x" = 2a

_________________________

t^2 + 1 = 3at^2 + (3b+4a)t + (3c+2b+4a)

The coefficients must be equal. Since 3 is not zero, we can divide by


it
to find a = 1/3. Then b = -(1/3)4a = -4/9 . Finally,
c = (1/3)(1-2b-4a) = 11/27. So
xp = (1/3)t^2 - (4/9)t + (11/27)

If a_0 = 0 we can use "reduction of order":

x" + x' = t

Substitute u = x' so u' + u = t

u = at + b
u' = a
----------------
t = at + (a+b)

a = 1 , b = -1 , u = t - 1 [check it!] , x = t^2/2 - t + c .


18.03 Class 16, March 15, 2006

Frequency response

[1] Frequency response: without damping

First recall the Harmonic Oscillator: x" + omega_n^2 x = 0 :

The spring constant is k = omega_n^2 .

Solutions are arbitrary sinusoids with circular frequency omega_n ,

the "natural frequency" of the system.

Drive it sinusoidally: x" + omega_n^2 x = omega_n^2 A cos(omega t)

I am driving the system through the spring, with a plunger moving

sinusoidally with amplitude 1 . cos(omega t) is the


"physical signal," as opposed to the force, or
"complete signal" omega_n^2 cos(omega t) . We regard the plunger
position as the system input.

We solved this by luckily trying x_p = B cos(omega t) and solving for


B .
Let's do it using ERF:

z" + omega_n^2 z = omega_n^2 A e^{i omega t}

z_p = A (omega_n^2 / (omega_n^2 - omega ^2)) e^{i omega t}

No damping ===> denominator is real and so

x_p = A (omega_n^2 / (omega_n^2 - omega^2)) cos(omega t)

This is ok unless omega = omega_n , in which case the system is in


resonance with the signal.

[2] Bode Plots.

The "gain" is the ratio of the output amplitude to the physical signal
amplitude. In this case,

gain(omega) = |omega_n^2/(omega_n^2 - omega^2)|

This has graph which starts with gain(0) = 1 , increases to infinity


when omega = omega_n, and then falls towards zero when omega > omega_n
.

There's a phase transition too: if we write the solution as

x_p = gain . cos(omega t - phi)

then phi = 0 for omega < omega_n

and phi = - pi for omega > omega_n .

The traditional thing to graph is - phi rather than phi: this graph
is constant zero for omega < omega_n and then switches discontinuously
to - phi = -pi for omega > omega_n .
[3] Damped systems: Frequency response

Drive this system sinusoidally, through the spring:

x" + bx' + kx = k A cos(omega t)

We continue to write k = omega_n^2 and call omega_n the "natural

circular frequency" of the system.

Physical input cos(omega t) has amplitude A . The gain is the

amplitude

of the sinusoidal output divided by A.

I displayed "Amplitude and Phase, Second Order" and set k = 3.24 and

b = .5 . In it, B = 1 .

ERF: z" + bz' + kz = k B e^{rt}

z_p = W(r) B e^{rt} , W(r) = k / p(r) .

W(r) is the "transfer function." Sinusoidal input means r = i omega:

W(i omega) = omega_n^2 / ((omega_n^2 - omega^2) + i b omega)

This is the "complex gain."

In the expression

x_p = gain . cos(omega t - phi)

I claim that

- phi = Arg(W(i omega))

gain = |W(i omega)|

Proof: W(i omega) = |W(i omega)| e^{- i phi}

Then

z_p = |W(i omega)| e^{- i phi} e^{i omega t}

= |W(i omega)| e^{i(omega t - phi)}

which has real part

x_p = |W(i omega)| cos(omega t - phi)

Compare this with the undamped case: there is an imaginary part to


the denominator. This causes two effects:

(1) The magnitude of the denominator is increased, causing the gain


to decrease. Especially: the denominator can never be zero anymore,
no matter what omega is, since it has a nonzero imaginary part.
Thus you never encounter true resonance with a sinusoidal signal,
if there is any damping.
(2) A phase lag appears. Since b > 0 , the imaginary part
of the denominator is positive, so

Im W(i omega) < 0 unless omega = 0

which says that 0 < phi < pi .

[5] More explicitly,

W(i omega) = k / ((k - omega^2) + i b omega)

When omega = 0 this is 1 : gain 1 , phase lag 0.

As omega increases, W(i omega) sweeps out a curve in the complex


plane.

Gain:

|W(i omega)| = k / sqrt{(k - omega^2)^2 + b^2 omega^2}

If b is small, the gain is large (though not infinite)

when omega is near to the natural frequency of the system, since the

first term in the denominator is small. This is NEAR RESONANCE.

When omega gets very large,

the denominator is roughly omega^2 , so the gain tails off like

k/omega^2.

As b grows larger, the second term dominates and for modest values of

omega

|W(i omega)| ~ k / (b omega)

This doesn't have maxima anymore; for large b there is no near-

resonant peak.

Eg in the tool, when k = 1 the resonant peak vanishes when b = sqrt

(2) .

Phase lag: Since k = omega_n^2 , W(i omega) is purely imaginary when


omega = omega_n : that's when the phase lag of the solution is 90
degrees.

|W(i omega_n)| = omega_n / b

When b = .5 and k = 3.24, omega_n = 1.8 and indeed when omega =


1.8 ,
the phase lag is exactly 90 degrees and the gain is 1.8/.5 = 3.60.

The gain won't be maximal then (think of the case of b large), but you
should expect it to be relatively large.
18.03 Class 17, March 17, 2006

Application of second order frequency response to AM radio reception


with guest appearance by EECS Professor Jeff Lang.

[1] The AM radio frequency spectrum is divided into narrow segments


which individual stations are required to broadcast in. The challenge
of a receiver is to filter out the signals at frequences other than the
target frequency.
This can be done using a very simple RLC system which has a sharp peak
in the gain curve at a given frequency (which
can be tuned by changing the strength of one of the components of the
system).

Electronic circuits have mechanical analogues. Mechanical engineers


often think of their systems in electronic terms, and vice versa.
The mechanical system analogous to the radio receiver is this:

| b m k |/

| |----------- ______ |/

|---| |=======------|______|----/\/\/\------|/

| |----------- | |/

| | |/

|-------> |-------->

y(t) x(t)

We are driving the system by motion of the far end of the dashpot, while
keeping the far end of the spring constant.

[2] Let's see the equation of motion for this system. Arrange the
position parameter x so that x = 0
when the spring is relaxed.

The spring exerts a force -kx .

The dashpot exerts a force proportional to the speed at which the piston
is moving through the cylinder.
This speed is (y-x)' . When y' > x' , the force is positive, so the
dashpot force is b(y-x)'

mx" = -kx + b(y-x)'

Putting the system terms on the left,

mx" + bx' + kx = by'

If y is constant, we have a homogeneous equation; its solutions are


transients.
A transient for the system was displayed; it oscillated, so we are in
the underdamped situation.
We could measure the damped circular frequency omega_d and the
"decrement," the ratio of the height of one peak to the preceding one; and using them
we could determine b/m and k/m = omega_n^2 .
[3] Now let's drive the system with a sinusoidal signal. The radio waves
are built up from them.

So set y = B cos(omega t) . The equation is then

mx" + bx' + kx = - b omega B sin(omega t)

We know that there will be a sinusoidal system response; and that that
is
the response we'll see very quickly, since the transients damp out.
We also know that we should try to express the sinusoidal system
response in terms of a gain and a phase lag with respect to the physical input
signal. Despite the appearance of the right hand side of the equation,
it's clear that we should take as physical input signal the function
y = B cos(omega t), so we look to find gain and phase lag phi such
that

x_p = gain . B cos(omega t - phi)

We also know that gain and phi are computed by finding the "complex

gain" W(i omega),

and then writing it out in polar terms:

W(i omega) = gain . e^{- i phi}

so that gain = |W(i omega)|

and - phi = Arg(W(i omega)) .

The handout "Driving through the dashpot" computes that

W(i omega) = b i omega / p(i omega)

= b i omega / (m(omega_n^2 - omega^2) + b i omega)

[4] The system was subjected to several input frequencies. One odd
thing appeared: for small frequency,the system response is *ahead* of the system input:
< 0 in that case.
Also maximal gain seems to happen when the phase lag is zero.

We can analyze this mathematically, by dividing numerator and


denominator in the complex gain by b i omega:

W(i omega) = 1 / ( 1 - (im/b) ( (omega_n^2 - omega^2) / omega^2


))

As omega varies, this sweeps out a curve in the complex plane. To see

what

that curve is, look first at the denominator. Its real part is always 1

When omega = omega_n there is no imaginary part: W(i omega_n) = 1 .

When omega < omega_n , the imaginary part is negative,

when
omega > omega_n , it is positive: the direction of movement is

upward.

Now if z is on this line, then its reciprocal is on the circle of

radius 1/2 and center 1/2 .

The angle gets reversed. So W(i omega) moves clockwise along that

circle.

Let's read off the gain and phase lag curves:

The gain starts small, grows to a maximal value of 1 at omega =

omega_n , and then falls as omega --> infty.

The angle, which is - phi , starts at pi/2, falls through 0 at

omega = omega_n , and then comes to rest near - pi/2 as omega --->

infty.

So we find mathematically that phi < 0 for small omega.

[5] These curves were then reproduced experimentally by subjecting the


RLC circuit to a series of different frequencies.

Then we tried to input a signal from an antenna, and we watched the


system respond to some and not to others: 1030 khz was quite loud.
18.03 Class 18, March 20, 2006

Review of constant coefficient linear equations:


Big example, superposition, and Frequency Response

[1] Example. x" + 4x = 0

PLEASE KNOW the solution to the homogeneous harmonic oscillator


x" + omega^2 x = 0 are sinusoids of circular frequency omega !

Here, a cos(2t) + b sin(2t).

In the real example I drive it: x" + 4x = t cos(2t) .

The complex equation is z" + 4z = t e^{2it} .

If it weren't for the t we could try to apply ERF: p(s) = s^2 + 4,

p(2i) = -4 + 4 = 0 , though, so it doesn't apply; we do have the


resonance
response formula, which gives z_p = t e^{2it}/p'(2i) = -(it/4) e^{2it}
so x_p = (t/4) sin(2t) .

But there is a t there. We should then use "Variation of Parameters":


Look for solutions of the form

z = e^{2it} u for u an Unknown function.

4] z = e^{2it} u
0] z' = e^{2it} ( u' + 2i u )
1] z" = e^{2it} ( u" + 2i u' + 2i u' + (2i)^2 u )
------------------------------------------------------
e^{2it} t = e^{2it} ( u" + 4i u' + (4-4) u )

so u" + 4i u' = t

Reduction of order: v = u' , v' + 4i v = t ;

Use undetermined coefficients: v = at + b

4i] v = at + b
v' = a
----------------
t = 4iat + (a + 4ib)

so a = 1/(4i) = -i/4 ; b = -a/4i = 1/16 ,

v_p = -it/4 + 1/16

u_p = -it^2/8 + t/16

z_p = ( -it^2/8 + t/16 ) e^{2it}

x_p = (t^2/8) sin(2t) + (t/16) cos(2t)

The general solution is then x_p + the homogeneous solution.

[3] Superposition: putting special cases together.

Suppose a bank is giving I percent per year interest:


x' - Ix = q(t)

Suppose that I open TWO bank accounts and proceed to save at rates q_1
(t)

and q_2(t) in them.

Is this any different than opening ONE bank account and saving at the
rate
q_1(t) + q_2(t) ?

Say the solutions with savings rates q1 and q2 are x1 and x2 .


Is x1 + x2 a solution with savings rate q1 + q2 ?

x1' - I x1 = q1

x2' - I x2 = q2

--------------------------

(x1 + x2)' - I (x1 + x2) = q1 + q2

since differentiation respects sums (and multiplying by I does too).

In general if p(D) x1 = q1 and p(D) x2 = q2


then p(D) (c1 x1 + c2 x2) = c1 q1 + c2 q2

In fact this is true for nonconstant coefficient linear equations too.


It is the essence of linearity, and it's the most general form of the
superposition principle.

It lets you break up the input signal into constituent parts, solve for
them
separately, and then put the results back together. This is why it isn't
so
bad that we spent all that time studying very special input signals.

One example is when q2 = 0 : then x2 is a solution to the


homogeneous
equation, and we find again that adding such a function to a solution of
p(D)x = q gives another solution.

Our work has shown a general result:

Theorem: If q(t) is any linear combination of products of polynomials


and exponential functions, then all solutions to p(D)x = q(t) are
again
linear combinations of products of polynomials and exponential
functions.

Here we mean *complex* linear combinations and *complex* exponentials,


so for example sin(t) = (e^{it} - e^{-it}) / 2i is a possible signal
or solution.

[4] Frequency response

Polar form of a complex number: z = |z| e^{i Arg(z)}

|a+bi| = sqrt( a^2 + b^2 )

Arg(a+bi) = arctan(b/a)
Frequency response is about the amplitude and phase lag of a sinusoidal
(steady state) response of a system to a sinusoidal signal of some
frequency.

It is based on the following method of finding a sinusoidal system


response in "polar" (amplitude/phase lag) form:

Example: x" + 2x' + 3x = 3 cos(t) p(s) = s^2 + 2s + 3

z" + 2z' + 3z = 3 e^{it} p(i) = -1 + 2i + 3 = 2


+ 2i

z_p = (3 / 2(1 + i)) e^{it}

Now write 3/2(1+i) in polar form . Do the denominator first:

1+i = (sqrt 2) e^{i pi / 4}

3/2(1+i) = (3/(2 sqrt 2)) e^{- i pi /4}

z_p = (3/(2 sqrt 2)) e^{- i pi /4} e^{it}

x_p = Re z_p = (3/(2 sqrt 2)) cos(t - pi/4)

Lesson: if z_p = w e^{i omega t}

then |w| = Amplitude of x_p

- Arg(w) = phi = phase lag of x_p

Suppose now that I let the input frequency be anything:

x" + 2x' + 3x = 3 cos(omega t)

z" + 2z' + 3z = 3 e^{i omega t}

p(i omega) = -omega^2 + 2i omega + 3

= (3 - omega^2) + 2i omega

z_p = (3 / p(i\omega)) e^{i omega t}

So the amplitude of the sinusoidal response is

|1/p(i omega)| = 3 / sqrt((3-omega^2)^2 + 4 omega^2)

This takes value 1 at omega = 0 , and when omega is large it


falls off like 3/omega^2 . In this case, it reaches a modest

"near resonance" peak at omega = 1 .

The phase lag is phi = - Arg(1/p(i omega) = Arg(p(i omega))

There's no particular advantage in writing out a more explicit formula

for this.

Good luck!

18.03 Class 20, March 24, 2006

Periodic signals, Fourier series

[1] Periodic functions: for example the heartbeat, or the sound of a


violin,
or innumerable electronic signals. I showed an example of violin and
flute.

A function f(t) is "periodic" if there is P > 0 such that f(t+P) =

f(t)

for every t . P is a "period."

So strictly speaking the examples given are not periodic, but rather

they

coincide with periodic functions for some period of time. Our methods

will

accept this approximation, and yield results which merely approximate

real life behavior, as usual.

The constant function is periodic of every period. Otherwise, all the

periodic

functions we'll encounter have a minimal period, which is often called

THE

period.

Any "window" (interval) of length P determines the function. You can

choose

the window as convenient. We'll often use the window [-P/2,P/2] .

t cos(t) is NOT periodic.

[2] Sine and cosines are basic periodic functions. For this reason a
natural
period to start with is P = 2\pi .

We'll use the basic window [-pi,pi] .

Question: what other sines and cosines have period 2pi ?

Answer: cos(nt) and sin(nt) for n = 2, 3, .....

Also, cos(0t) = 1 (and sin(0t) = 0 ).

These are "harmonics" of the "fundamental" sinusoids with n = 1 .

If f(t) and g(t) are periodic of period P then so is af(t) + bg


(t) .

So we can form linear combinations. There is a standard notation for the


coefficients:

f(t) = a0/2 + a1 cos(t) + a2 cos(2t) + ... + b1 sin(t) + b2 sin(2t) +


... (*)
\ / \ /

------- cosine series ---------- ----- sine series ------


This is a "Fourier Series." The an and bn are the "Fourier

Coefficients."

We'll see why the odd choice of a0/2 for the constant term shortly.

Theorem. Any reasonable [piecewise continuous] function of period 2pi

has exactly one expression as a Fourier series.

Show the Mathlet FourierCoefficients to see other examples, and to

illustrate

the process of adding functions. Do the square wave case.

The *definition* of the Fourier coefficients of a function f(t) is

this:

they are the coefficients that make (*) true.

There are integrals for computing these coefficients, but using the

definition is usually easier.

Some simple observations:

[3] Average. The average of a function of period 2pi is

Ave(f) = (1/2pi) integral_{-pi}^pi f(t) dt

Ave(f(t)+g(t)) = Ave(f(t)) + Ave(g(t))

Ave(cos(nt)) = 0 for n > 0 and Ave(sin(nt)) = 0 ,

so applying Ave to (*) :

Ave(f(t)) = a0/2 or

a0 = (1/pi) integral_{-pi}^pi f(t) dt.

[4] Parity. A function f(t) is "even" if f(-t) = f(t) ,


odd if f(-t) = -f(t).

Even . even is even ; odd . odd is even ; even . odd is odd.


So the terms are badly chosen; they behave more like 'positive' and
'negative.'

Linear combinations of evens are even, of odds are odd.

cos(nt) is even, sin(nt) is odd.

The only function which is both even and odd is the zero function. For
f(t) = f(-t) and f(t) = -f(-t) together imply that f(t) = -f(t) .

If a periodic function f(t) is even, then f(t) - (cosine series)


is a linear combination of evens and hence even, but it's also (sine
series)
and so odd, so it's zero, so:

The Fourier series of an even function is a cosine series: bn = 0 .

The Fourier series of an odd function is a sine series: an = 0

[The same argument shows that if a polynomial is even then it's a sum of
even powers of t ; if it's odd then it's a sum of odd powers of t . ]

[5] Integral expression: This will use the trigonometric integrals

integral_{-pi}^pi cos(mt) sin(nt) dt = 0

integral_{-pi}^pi cos(mt) cos(nt) dt = 2pi if m = n = 0


= pi if m = n > 0
= 0 if m is not equal to n

integral_{-pi}^pi sin(mt) sin(nt) dt = pi if m = n


= 0 if m is not equal to n

The first of these is easy, since the product is odd and the interval
you are
integrating over is symmetric. The others require some trig identity
which you
can find in Edwards and Penney.

Application: Substitute (*) into integral_{-pi}^pi f(t) cos(nt) dt


(for n > 0)

Compute this integral term by term:

integral_{-pi}^pi (a0/2) cos(nt) dt = 0 (since n > 0)

Then we have a bunch of cosines. The m-th one gives:

integral_{-pi}^pi am cos(mt) cos(nt) dt = am pi if m = n


= 0 if m is not equal
to n

And then a bunch of sines. The m-th of them gives:

integral_{-pi}^pi am sin(mt) cos(nt) dt = 0

Only one of all these terms is nonzero: the cosine term with m = n ,
and since then am = an , we discover

integral_{-pi}^pi f(t) cos(nt) dt = am pi , or

an = (1/pi) integral_{-pi}^pi f(t) cos(nt) dt

We did this calculation assuming n > 0 , but since cos(0t) = 1 the


formula
is true for n = 0 (by our comment about averages above).

Exactly the same method shows:

bn = (1/pi) integral_{-pi}^pi f(t) sin(nt) dt


[6] Example: A basic example is given by the "standard squarewave,"
which I denote by sq(t) : it has period 2pi and

sq(t) = 1 for 0 < t < pi


= -1 for -pi < t < 0

This is a standard building block for all sorts of "on/off" periodic


signals.

It's odd, so we know right off that an = 0 for all n .

If f(t) is any odd function of period 2pi, we can simplify the


integral
for bn a little bit. The integrand f(t) sin(nt) is even, so the
integral
is twice the integral from 0 to pi:

bn = (2/pi) integral_0^pi f(t) sin(nt) dt

Similarly, if f(t) is even then

an = (2/pi) integral_0^pi f(t) cos(nt) dt

In our case this is particularly convenient, since sq(t) itself needs


different definitions depending on the sign of t. We have:

bn = (2/pi) integral_0^pi sin(nt) dt

= (2/pi) [ - cos(nt) / n ]_0^pi

= (2/pi n) [ - cos(n pi) -(-1) ]

This depends upon n :

n cos(n pi) 1 - cos(n pi)

1 -1 2
2 1 0
3 -1 2

and so on. Thus: bn = 0 for n even


= 4pi/n for n odd and

sq(t) = (4/pi) [ sin(t) + (1/3) sin(3t) + (1/5) sin(5t) + ... ]

This is the Fourier series for the standard squarewave.

I used the Mathlet FourierCoefficients to illustrate this. Actually,


I built up the function

(pi/4) sq(t) = sin(t) + (1/3) sin(3t) + (1/5) sin(5t) + ....


(**)

and observed the fit.


18.03 Class 21, April 3

Fun with Fourier series

[1] If f(t) is any decent periodic of period 2pi, it has exactly one expression as

f(t) = (a0/2) + a1 cos(t) + a2 cos(2t) + ... (*)


+ b1 sin(t) + b2 sin(2t) + ...

To be precise, there is a single list of coefficients such that


this is true for every value of t = a for which f(t) is continuous
at a.

The coefficients can be computed by the integral formulas

a_n = (1/pi) integral_{-pi}^pi f(t) cos(nt) dt

b_n = (1/pi) integral_{-pi}^pi f(t) sin(nt) dt

but one can often discover them without evaluating these integrals.

[2] Example: the "standard squarewave" sq(t) = 1 for 0 < t < pi,
-1 for -pi < 0 < 0

has Fourier series

sq(t) = (4/pi) sum_{n odd} (sin(nt))/n

as we saw by calculating the integrals. Let's review that:

Any odd function has a sine series -- a_n = 0 for all n --


and the b_n's can be computed using the simpler integral

b_n = (2/pi) int_0^pi f(t) sin(nt) dt

In that range sq(t) = 1 , so we must compute

int_0^pi sin(nt) dt = - (1/n) cos(nt) |_0^pi

= - (1/n) [ cos(n pi) - 1 ]

Now the graph of cos(t) shows that

n | cos(n pi) | 1 - cos(n pi)


------------------------------------------
0 | 1 | 0
1 | -1 | 2
2 | 1 | 0
... ... ...

so b_n = (4/n pi) if n is odd,


= 0 if n is even.

sq(t) = (4/pi) [ sin(t) + (1/3) sin(3t) + (1/5) sin(5t) + ... ]

= (4/pi) sum_{n odd} (1/n) sin(nt)


We can see this on the applet, which records

(pi/4) sq(t) = sin(t) + (1/3) sin(3t) + ...

This is quite amazing: the entire function is recovered from a sequence


of slider settings, which record the harmonics above the fundamental
tone.
The sequence of Fourier coefficients encodes the information of the
function.
It represents a "transform" of the function. We'll see another example
of a transform later, the Laplace transform.

[3] Any way to get an expression (*) will give the same answer!

Example [trig id]: 2 cos(t - pi/4) .

How to write it like (*) ? Well, there's a trig identity we can use:

a cos(t) + b sin(t) = A cos(t - phi) if (a,b) has polar coord's

(A,phi)

a = cos(phi), b = sin(phi) :

For us, phi = pi/4, so a = b = sqrt(2) and

cos(t - pi/4) = sqrt(2) (cos(t) + sin(t)) .

That's it: that's the Fourier series. This means a1 = b1 = sqrt(2)

and all the others are zero.

Example [shifts and stretches]: f(t) = 4 for 0 < t < pi/2 ,


f(t) = 0 for pi/2 < t < pi ,
and even periodic of period 2pi.

f(t) = 2 + 2 sq(t + pi/2)

= 2 + (8/pi) (sin(t + pi/2) + (1/3) sin(3(t + pi/2)) + ... )

sin(theta + pi/2) = cos(theta) , sin(theta - pi/2) = - cos(theta) so

f(t) = 2 + (8/pi) (cos(t) - (1/3) cos(3t) + (1/5) cos(5t) - ... )

[4] General period.

Example: g(x) = 1 for 0 < x < L ,

= -1 for -L < x < 0

This has period 2L , not 2pi,

I want to express this in terms of a


function f(t) of a different variable, but one of period 2pi.

| t /

| /

pi |---/ t = (pi/L)x
| /|
| / |
|/ |

-------------- x

| L

so we have g(x) = f(t)

= (4/pi) (sin(t) + (1/3) sin(3t) + ... )

= (4/pi) (sin(pi x / L) + (1/3) sin(3 pi x / L) + ...


)

Then general appearance of the Fourier series for a function of period


2L is

g(x) = a0/2 + a1 cos(pi x / L) + a2 cos(2 pi x / L) + ...


+ b2 sin(pi x / L) + b2 sin(2 pi x / L) + ...

The integral formulas for an and bn can of course be translated


into the variable x:

an = (1/L) integral_{-L}^L g(x) cos(pi n x / L) dx

bn = (1/L) integral_{-L}^L g(x) sin(pi n x / L) dx

[5] Gibbs effect. What happens at points where f(t) is


discontinuous?

Definition: A function f(t) is "piecewise continuous" if it is


continuous except at some sequence of points $c_n$, and for each $n$
both one-sided limits exist at $c_n$. (If the two limits are equal then
the function is continuous there.)

Notation: lim_{t-->c from above} f(x) = f(c+)

lim_{t-->c from below} f(x) = f(c-)

To find out, I got Matlab to sum the first 10 nonzero terms of the
Fourier series for (pi/4) sq(t) ; that is,

sin(t) + (1/3) sin(3t) + ... + (1/19) sin(19t)

One thing's clear: the value of the Fourier series at 0 is 0 .


This is a general fact:

If f(t) isn't continuous at t = a , then the sum at t = a


converges to

(f(a+) + f(a-))/2 .

More surprising is that the Fourier approximation has visible


oscillation about the constant values of sq(t),
and seems to step back before it launches itself across the gap at the
discontinuities of sq(t) . Maybe we just need more terms. Matlab
computed the first 100 nonzero terms,

sin(t) + (1/3) sin(3t) + ... + (1/199) sin(199t)

The graph is even flatter, but still shows a sharp overshoot near the
discontinuities in sq(t) .

The experimental physicist A. A. Michaelson computed the Fourier series


to great accuracy for some discontinuous functions and discovered this
overshoot in 1898. (I believe that he built a mechanical device for the
purpose.) He communicated his puzzlement to mathematicians, and Gibbs
took up the challenge and published an explanation in 1899. What he
found is now called the "Gibbs effect":

If f(t) is discontinuous at t = a then for any n there is t = b


near t = a such that the sum of the first n Fourier terms at t = b
differs from f(b) by at least 8% of the gap.

The actual limiting overshoot is given by (0.0894898722360836...) times


the gap. The explanation of this strange irrational constant can be
found in the Supplementary Notes.

The Gibbs effect was first discovered theoetically by a British


mathematician named Wilbraham in 1848, but his work was forgotten by everyone till
after Gibb's publication.
18.03 Class 22, April 5

Fourier series and harmonic response

[1] My muddy point from the last lecture: I claimed that the Fourier
series
for f(t) converges wherever $f$ is continuous. What does this really
say?

For example,

(pi/4) sq(t) = sin(t) + (1/3) sin(3t) + (1/5) sin(5t) + ....

for any value of t which is not a whole number multiple of pi.

This says that when 0 < t < pi ,

sin(t) + (1/3) sin(3t) + .... = pi/4 (*)

Since all these sines are odd functions, it is no additional information


to
say that when -pi < t < 0 ,

sin(t) + (1/3) sin(3t) + .... = - pi/4

For example we could take t = pi/2 . Then

sin(pi/2) = 1 , sin(3pi/2) = -1 , sin(5pi/2) = 1 , ....

so

1 - (1/3) + (1/5) - (1/7) + ... = pi/4

This is an alternating series, so we know it converges. Did you know


that

it converges to pi/4?

And so on: there are infinitely many summations like this contained in

(*) .

[2] You can differentiate and integrate Fourier series.

Example: Consider the function f(t) which is periodic of period 2pi

and is given by f(t) = (pi/2) - t between 0 and pi.

We could calculate the coefficients, using the fact that f(t) is even

and integration by parts. For a start, a0/2 is the average value,


which is pi/2.

Or we could realize that f'(t) = - sq(t) and integrate:

f(t) = - (4/pi) integral (sin(t) + (1/3) sin(3t) + ...) dt

= (4/pi) (cos(t) + (1/9) cos(3t) + (1/25) cos(25 t) + ...)


+ c

To find the constant term, remember that it's the average value of f
(t),
which is 0:

f(t) = (4/pi) (cos(t) + (1/9) cos(3t) + (1/25) cos(25 t) + ...)

That's it, that's the Fourier series for f(t).

Again, what does this mean, e.g. at t = 0 ?

(pi/2) = (4/pi) (1 + 1/9 + 1/25 + ... )

or 1 + 1/9 + 1/25 + ... = (pi^2)/8

This is due to Euler and is one of many analogous formulas.

[Example:

sum_{n=1}^infinity 1/n^2 = pi^2 / 6 .

This can be obtained from the sum of odd reciprocal squares using the
geometric series - can you see how?]

[NB: it is not true in general that the integral of a periodic function

is

periodic; think of integrating the constant function 1 for example.

But this IS the case if the average value of the function is zero.

After all, you'd better have

integral_0^{2pi} f(u) du = integral_0^0 f(u) du = 0 .

If you think of this one term at a time, the point is that the integral

of

cos(nt) is periodic unless n = 0 and the integral of sin(nt)

is always periodic.]

[3] Now we come to the relationship with differential equations:

We have a complicated wave, a periodic function f(t), perhaps a square


wave.
Suppose we drive an undamped spring system through the spring with it:

x" + kx = k f(t)

The natural frequency of the system is omega_n with omega_n^2 = k :

x" + omega_n^2 x = omega_n^2 f(t) (*)

What is the system response?

Recall how we solved x" + omega_n^2 x = omega_n^2 A sin(omega t)

We could use ERF, but even before that we optimistically tried

x = B sin(omega t)

so x' = - B omega cos(omega t)


x" = - B omega^2 sin(omega t)

omega_n^2 x = omega_n^2 B sin(omega t)


------------------------------------------
omega_n A cos(omega t) = B(omega_n^2 - omega^2) cos(omega t)

so B = [ omega_n^2 / (omega_n^2 - omega^2)] A

and x_p = A omega_n^2 cos(omega t)/(omega_n^2 - omega^2)

When the denominator vanishes we have resonance and no periodic


solution.

I showed the Harmonic Frequency Response Applet, with sine input, and

discussed what happens as we change the natural frequency of the system,

by changing a capacitor setting or changing the spring constant.

By superposition and Fourier series we can now handle ANY periodic input

signal.

For example, suppose that

f(t) = sq(t) = (4/pi) (sin(t) + (1/3) sin(3t) + ... )

in (*). f(t ) has period 2pi and circular frequency omega = 1 .


Then we will have a particular solution

x_p = (4/pi) omega_n^2 (sin(t)/(omega_n^2 - 1) + sin(3t)/(omega_n^2 - 9)


+ ...)

which is a periodic solution. If there is any tiny damping in the

system,

there will be a similar particular solution, periodic, and all solutions

will converge to it. So this is the most significant system response.

I showed the Harmonic Frequency Response applet.

The circular frequency of the input signal is 1 so perhaps we should

expect

to see resonance when omega_n = 1. In fact, there is resonance when

omega_n = 1, 3, 5, ...

There are hidden frequencies present in the signal, harmonics of the


fundamental, and the spring system detects them by responding vigorously
when it is tuned to those frequencies.

But there is NOT resonance when omega_n = 2, 4, 6 , ...

The system is detecting information about the timbre of the input signal

here.

We can use Fourier series to analyze the system response more closely:

When omega_n is very near to k^2 , k odd, but less than k^2 , the

term

sin(kt)/(omega_n^2 - k^2)
is a large negative multiple of sin(kt) . This appears on the applet.

Then when omega_n passes k^2 the dominant term flips sign and
becomes
a large positive multiple of sin(kt) .

You have been using this system for the past 40 minutes: this is how the
ear works: in the cochlea, there is a row of hairs of different lengths.
They act like springs. They have different natural frequencies. Various
hairs vibrate more intensely in response to various different
frequencies.
Your ear acts as a Fourier analyzer. The omega_n axis is the axis
along
the cochlea.
18.03 Class 23, April 7

Step and delta.

Two additions to your mathematical modeling toolkit.


- Step functions [Heaviside]
- Delta functions [Dirac]

[1] Model of on/off process: a light turns on; first it is dark, then
it is
light. The basic model is the Heaviside unit step function

u(t) = 0 for t < 0


1 for t > 0

Of course a light doesn't reach its steady state instantaneously; it


takes a
small amount of time. If we use a finer time scale, you can see what
happens.
It might move up smoothly; it might overshoot; it might move up in fits
and
starts as different elements come on line. At the longer time scale, we
don't care about these details. Modeling the process by u(t) lets us
just
ignore those details. One of the irrelevant details is the light output
at exactly t = 0.

In fact as a matter of realism, you rarely care about the value of a


function at any single point. What you do care about is the average
value
nearby that point; or, more precisely, you care about

lim_{t-->a} f(t)

The function is continuous if that limit IS the value at t=a.

You will also often care about the values just to the left of t=a,
or just to the right. These are captured by

f(a-) = lim_{t-->a from below} f(t)

f(a+) = lim_{t-->a from above} f(t)

For example, u(0-) = 0 , u(0+) = 1. A function is continuous at t=a


if f(a) = f(a-) = f(a+) . A good class of functions to work with is
the "piecewise continuous" functions, which are continuous except at
a scattering of points and such that all the one-sided limits exist.
So u(t) is piecewise continuous but 1/t is not.

The unit step function is a useful building block:--

u(t-a) turns on at t = a

Q1: What is the equation for the function which agrees with
f(t) between a and b ( a < b ) and is zero outside this window?

(1) (u(t-b) - u(t-a)) f(t)


(2) (u(t-a) - u(t-b)) f(t-a)
(3) (u(t-a) - u(t-b)) f(t)
(4) u(t-a) f(t-a) - u(t-b) f(t-b)
(5) none of these

Ans: (3).

We can also clip and drag:

f_a(t) := u(t-a)f(t-a) = f(t-a) for t > a

= 0 for t < a

[3] From bank accounts to delta functions.

Bank account equation: x' + Ix = q(t)


x = x(t) = balance (K$)
I = interest rate ((yr)^{-1})
q(t) = rate of savings (K$/yr)

I am happily saving at K$1/yr. The concept of rate can be clarified


by thinking about the cumulative total, Q(t) (from some starting time);

Q'(t) = q(t)

and Q(t) = integral q(t) = c + t

At t = 1 I won $K30 at the race track! I deposit this into the

account.

I can model the cumulative total deposit using the step function:

Q(t) = c + t + 30 u(t-1)

What about the rate? For this we would need to be able to talk about
the
derivative of u(t) , in such a way that its integral recovers u(t).

Of course there is no such function, in the usual sense. But there is


nothing to prevent us from using a symbol for a "rate" that plays this
role:
the "Dirac delta function,"

delta(t) = u'(t)

delta is not a function but it is approximated by functions, since u(t)

is approximated by differentiable functions. Just as u(t) has many

approximating functions, so delta(t) does too; and the details don't

matter.

Maybe the bank adds one dollar per millisecond: I don't care.

I drew some graphs of functions approximating delta(t). They all have

area 1 under the graph, and the nonzero values are concentrated around

t=0.

Using this we can write down a formula for the new rate of savings:

q(t) = 1 + 30 delta(t-1)

We can graph this using a "harpoon" at t = 1 with the number 30 next


to it;
the area under the harpoon is 30.

Not too long after this, at t = 2, I bought my BMW. It cost K$40:

q(t) = 1 + 30 delta(t-1) - 40 delta(t-2) .

The negative multiple of delta can be represented using a harpoon


pointing
up with -40 next to it, or by a harpoon pointing down with +40 next
to it.

[4] We'll call piecewise continuous functions "regular." We can now add
in combinations of delta functions, called "singularity functions."
A combination of a regular function and a combination of delta functions
is a "generalized function":

f(t) = f_r(t) + f_s(t)

For example,

q_r(t) = 1

q_s(t) = 30 delta(t-1) - 40 delta(t-2)

It makes sense to say that Q'(t) = q(t) . Whenever you have a gap
in the graph of f(t) , so that f(a+) is different from f(a-) ,
the derivative will have a delta contribution:

(f(a+) - f(a-)) delta(t-a)

Keeping these terms in the derivative lets us reconstruct f(t) up to a


constant. With the singular terms in place this is called the
"generalized derivative."

[5] Oliver Heaviside, 1850--1925, British mathematical engineer


``... whose profound researches into electro-magnetic waves
have penetrated further than anyone yet understands.''

He was the one who wrote down Maxwell's equations in the compact vector
form you see now on ``Let there be light'' T-shirts.]

Paul A. M. Dirac, 1902--1984, Swiss/British theoretical physicist.


Nobel prize 1933, for the relativistic theory of the electron.

Lucasian Chair, Cambridge University:


Isaac Barrow, 1664
Isaac Newton, 1669
...
P.A.M. Dirac, 1932
...

Stephen Hawking, 1980

Quotes:

``I consider that I understand an equation when I can predict


the properties of its solutions without actually solving it.''
(Quoted in Frank Wilczek and Betsy Devine, "Longing for the Harmonies")

``God used beautiful mathematics in creating the world.'']

[6] When you fire a gun, you exert a very large force on the bullet
over a very short period of time. If we integrate F = ma = mx"
we see that a large force over a short time creates a sudden change in
the momentum, mx' . This is called an "impulse."

The graph of the elevation of the bullet, plotted against t,


starts at zero, then abruptly rises in an inverted parabola, and then
when it hits the ground it stops again.

The derivative is zero for t < 0 ; then it rises abruptly to v_0;


then it falls at constant slope (the acceleration of gravity) till
the instant when it hits the ground, when it returns abruptly to zero.

Q2: What does the graph of the generalized derivative of v(t) look
like?

(1) ^ ^
| |
v_0 | | v_0
| |
----------| |----------------

|
|

|________|

(2) ^
|

v_0 |
|

----------| ---------------

| |

|________|
|
| v_0
|
v

(3) ^
|
v_0 |
|
----------| --------------

| |

|_________|

(4)
---------- -------------

| |

|_________|

Ans: (1).

Of course, the start is MIT and the end is CalTech.


Did not get to say:

[7] People often want to know what the delta function REALLY IS.
One answer is that it is a symbol, representing a certain approximation
to reality and obeying certain rules.

There are other answers.

One is this: one measures the value of a function by means of a piece


of equipment of some sort. This equipment gathers light, for example,
over
a period of time, and reports an integrated value. The time interval may
be short but it is not of width zero. Each measuring device has a
sensitivity
profile, m(t) , which rises to a peak and then falls again.
If the light profile is f(t) , what this instrument actually measures
is

M(f;m) = integral f(t) m(t) dt

The most we can ever know about the function f(t) is the collection of

all these measurements, M(f;m) as m varies over all measuring

devices.

So f determines a new "function," sending each m to a number.

This is what is called a "distribution."

I will make the assumption that the function m(t) itself is continuous

(or better).

There are other ways to assign a number to each measuring device.

For example, we can send m to m(0). That is what the "delta

function"

does:

integral delta(t) m(t) dt = m(0)


18.03 Class 24, April 10, 2006

Unit impulse and step responses

[1] In real life one often encounters a system with unknown system
parameters.

If it's a spring/mass/dashpot system you may not know the spring


constant,
or the mass, or the damping constant. But we can watch how it responds
to various input signals. The simpler the input signal, the easier it
will
be to interpret the system response and get information about the system
parameters, which will, in turn, allow us to predict the system response
to other signals.

For a start, we should be sure that the system is at rest before we do


anything to it. So we'll start our experiment at t = 0 , and assume
that before it the output signal, x(t) , is zero:

x(t) = 0 for t < 0 .

This is "rest initial conditions."

Then we apply some input signal, and solve from this starting point.

[2] Unit step response.

Suppose we start loading a reactor at a constant rate.


For a simple model, solve

x' + kx = u(t) , rest initial conditions. (*)

For t > 0 (*) is the same as

x' + kx = 1 with x(0) = 0 . (**)

The solution to (**) :

xp = 1/k , xh = c e^{-kt} , so

x = (1/k)(1 - e^{-kt})

The solution to (*) called the "unit step response" of the system.
I'll denote the unit step response by v(t) today.

v(t) = (1/k)(1 - e^{-kt}) for t > 0

= 0 for t < 0 .

NB: the solution is continuous, despite the fact that the signal is not.
Solving ODEs increases the degree of regularity.

[3] Unit impulse response.

Let's just put one kg of plutonium in at t = 0 and watch what

happens.

x' + kx = delta(t) , rest initial conditions. (*)

Remember, delta(t) is the rate corresponding to the sudden addition


of 1 to the cumulative total.

For t > 0 (*) is the same as

x' + kx = 0 with x(0) = 1 . (**)

The solution to (**) is x = e^{-kt} .

The solution to (*) is the "unit impulse response" or the "weight

function"

and it's written w(t):

w(t) = e^{-kt} for t > 0

= 0 for t < 0

The solution is discontinuous at t = 0 , but at least it is regular.

[4] Two implications of time invariance.

We'll work with a system modeled by an LTI operator p(D).


The time invariance has two important consequences:

(a) It doesn't really matter when you start the clock, if the system you
are looking at is time-invariant.

For example, the solution to x' + kx = delta(t-a) is

x = e^{-k(t-a)}) for t > a

= 0 for t < a

(b) If p(D)x = q(t) , then p(D) x' = q'(t) .

This is because p(D) D = D p(D) (because the coefficients are constant)

so p(d) x' = p(D) Dx = D p(D) x = D q = q' .

In particular, since u' = delta, v' = w :

the derivative of the unit step response is the unit impulse response.

e.g. D (1/k)(1 - e^{-kt}) = e^{-kt} .

The unit step and unit impulse functions are very simple signals,
and the system response gives a very clean view of the system itself.
They determine the system (assuming it is LTI), and we'll see next how
the
unit impulse response can be used to reconstruct the system response
to ANY signal. This process will work for p(D) of any order.

[5] Second order impulse response: Drive a spring/mass/dashpot system


:
mx" + bx' + kx = F_ext

Suppose rest initial conditions. Take F_ext to be a hammer blow,


large enough to increase the momentum mx' by one unit. The system is
modeled by

mx" + bx' + kx = delta(t) , rest initial conditions


(*)

For t > 0 this is equivalent to

mx" + bx' + kx = 0 , initial conditions x(0) = 0, mx'(0) = 1


(**)

which we solve using the usual methods. This solution (times u(t)) is
the
"unit impulse response" or "weight function" of mD^2 + bD + kI .

IN GENERAL, the weight function is a solution to the homogeneous


equation
p(D)x = 0 for t > 0 .

e.g. 2x" + 4x' + 10x = delta(t)

p(s) = 2(s^2 + 2s + 5) has roots 1 +- 2i

so x = e^{-t} (a cos(2t) + b sin(2t)) .

We want x(0) = 0: so a = 0 and x = b e^{-t} sin(2t)

x ' = b e^{-t} (2 cos(2t) - sin(2t))

1/2 = b (2) so b = 1/4

w(t) = (1/4) e^{-t} sin(2t) for t > 0


= 0 for t < 0 .

It is continuous, but its derivative jumps at t = 0 from 0 to 1/m


.

[6] Convolution. I claim that the weight function w(t) --- the
solution
to p(D)x = delta(t) with rest initial conditions --- contains complete
data about the LTI operator p(D) (and so about the system it
represents).

Strike a system and watch it ring. That gives you enough information to
predict the system response to ANY input signal!

In fact there is a formula which gives the system response (with rest
initial conditions) to any input signal q(t) as a kind of "product"
of w(t) with q(t) .

More about this on Wednesday!


18.03 Class 25, April 12, 2006

Convolution

[1] We learn about a system by studying it responses to various input


signals.

I claim that the weight function w(t) --- the solution


to p(D)x = delta(t) with rest initial conditions --- contains complete
data about the LTI operator p(D) (and so about the system it
represents).

In fact there is a formula which gives the system response (with rest
initial conditions) to any input signal q(t) as a kind of "product"
of w(t) with q(t) .

Suppose phosphates from a farm run off fields into a lake, at a rate
q(t) which varies with the seasons. For definiteness let's say

q(t) = 1 + cos(bt)

Once in the lake, the phosphate decays: it's carried out of the stream
at a rate proportional to the amount in the lake:

x' + ax = q(t) , x(0) = 0

The weight function for this system is

w(t) = e^{-at} for t > 0


= 0 for t < 0 .

This tells you how much of each pound is left after t units of time have
elapsed. If c pounds go in at time tau, then

w(t-tau) c

is the amount left at time t > tau.

Fix a time t . We'll think about how x(t) gets built up from the
contributions made during the time between 0 and t . We'll need

another

letter to denote that changing time; tau.

We'll replace the continuous input represented by q(t) by a discrete

input.

Divide time into very small intervals, Delta tau (1 second maybe) .

During the Delta tau time interval around time tau ,

the quantity of phosphate entering the lake is

q(tau) Delta tau

How much of that drop remains at time t?

Well, the weight function tells you!

w(t - tau) q(tau) Delta tau


Now we just have to add it all up:

x(t) = integral_0^t w(t-tau) q(tau) d tau (#)

That's the formula. For us,

x(t) = integral_0^t e^{-a(t-tau)} (1 + cos(b tau)) d tau

but (#) works in general, and for systems of any order, not just
first order systems. It's superposition of infinitesimals.

I used the "ConvolutionForward" tool with signal f(t) = 1 + cos(bt)

and weight function (written g(t) in the tool) u(t)e^{-at} .

Comment on solution of the ODE x' + ax = 1 + cos(bt) :

By superposition we can solve x' + ax = 1 and x' + x = cos(bt)

and add the results.

x' + ax = 1 : x_p = 1/a

x' + ax = cos(bt) : x_p = A cos(bt - phi)

x = (1/a) + A cos(bt - phi) + c e^{-at}

x(0) = 0

The graphs in the Mathlet show this effect; in fact from the graph
we could deduce the value of a and b that the programmmer chose.

Restatement: Suppose w(t) is the weight function of p(D) . Then the


solution of p(D)x = q(t) satisfying rest initial conditions is

x(t) = integral_0^t w(t-tau) q(tau) d tau

This works for any order. In the second order case, you think of the
input signal as made up of many little blows, each producing a decaying
ringing into the future. They get added up by superpostion, and this is
the convolution integral. It is sometimes called the superposition
integral.

You learn about a system by studying how it responds to input signals.


The interesting thing is that just one single system response suffices
to determine the system response to any signal at all. This is based on
two major assumptions: Linear, and Time Invariant.

[2] The convolution product.

f(t)*g(t) = integral_0^t f(t-tau) g(tau) d tau

is the "convolution product."

This takes two functions of t and returns another function of t.


Each value of the convolution product depends upon the whole of each
of the two factors. Here and in the next few weeks all functions will
only be of interest for t > 0.
We have just learned that if w(t) is the solution to p(D)w = delta(t)
(with rest initial conditions) then w(t)*f(t) is the solution to
p(D)x = f(t) (with rest initial conditions).

In terms of an input/output diagram,

____________

| |

f(t)---->| "w(t)" |---->w(t)*f(t)

|____________|

In particular,

____________

| |

delta(t)---->| "w(t)" |---->w(t)*delta(t),

|____________|

but also by definition the output is w(t) : w(t)*delta(t) = w(t).

This * is NOT just the product w(t)f(t) . Nevertheless it deserves


to be called a "product." For one thing, it is associative:

(f(t)*g(t))*h(t) = f(t)*(g(t)*h(t))

The book carries out the integration manipulation you need to do to see

this.

Here's a proof using systems and signals:

____________ ____________
| | | |
h(t)---->| "g(t)" |---->g(t)*h(t)---->| "f(t)" |---->f(t)*(g
(t)*h(t))
|____________| |____________|

What is the weight function of the composite system?

____________ ____________
| | | |
delta(t)---->| "g(t)" |---->g(t)---->| "f(t)" |---->f(t)*g(t)
|____________| |____________|

Thus feeding h(t) into the composite system gives (f(t)*g(t))*h(t)


But we just saw that it gives f(t)*(g(t)*h(t)) .

[3] Other properties.

* is also commutative:

f(t)*g(t) = integral_0^t f(t-tau) g(tau) d tau

let s = t - tau , tau = t - s , ds = - d tau


... = integral_t^0 f(s) g(t-s) (-ds)

= integral_0^t g(t-s) f(s) ds

= integral_0^t g(t-tau) f(tau) d tau = g(t)*f(t) .

Example: Suppose the input signal is f(t) = u(t) (and of course we


use
rest initial conditions). The output signal
is then v(t) , the unit step response. Thus:

v(t) = w(t)*1 = 1*w(t) = integral_0^t 1 w(tau) d tau

so we see again that the integral (from t = 0) of the unit impulse


response is the unit step response.

Example: f(t) = delta(t) . By definition,

w(t)*delta(t) = w(t)

So the delta function serves as the "*-multiplicative unit."

Also!: w(t)*(f(t)+g(t)) = w(t)*f(t) + w(t)*g(t)

and w(t)*(cf(t)) = c w(t)*f(t)

[4] Step and impulse response for higher degree operators

The convolution integral w(t)*q(t) gives the solution, with rest


initial
conditions, to p(D)x = q(t) for any LTI operator p(D) (where w(t)
is
the unit impulse response, i.e., the solution, with rest initial
conditions,
of p(D)w = delta(t)). To make this useful we have to be able to

compute w(t) .

Suppose we have a degree n LTI operator

p(D) = a_n D^n + ... + a_1 D + a_0 I , a_n not 0

The unit step response v(t) has initial conditions zero:

v(0) = 0 , v'(0) = 0 , ... v^{{n-1)}(0) = 0

That determines the unit step response. We can calculate

a_n v^{(n)}(0+) + 0 + ... + 0 = 1

so v^{(n)}(0+) = 1/a_n

The unit impulse response w(t) is the derivative of v(t):

w = v' , so w' = v" , ....

w(0) = 0 , ... w^{(n-1)}(0) = 0

and w^{(n-1)}(0+) = 1/a_n

We have learned: for t > 0 , w(t) is the solution to the homogeneous

equation p(D) x = 0 satisfying these initial conditions.

We saw this in case n = 2 on Monday.

18.03 Lecture 26, April 14

Laplace Transform: basic properties; functions of a complex variable;

poles

diagrams; s-shift law.

[1] The Laplace transform connects two worlds:

------------------------------------------------------------------------
| The t domain
|

|
|

| t is real and positive

|
|

| functions f(t) are signals, perhaps nasty, with discontinuities

| and delta functions


|

|
|

| ODEs relating them


|

|
|

| convolution
|

|
|

| systems represented by their weight functions w(t)

|
|

------------------------------------------------------------------------
| ^
L | | L^{-1}
v |

------------------------------------------------------------------------
| The s domain
|
|
|
| s is complex
|
|
|
| beautiful functions F(s) , often rational = poly/poly
|
|
|
| and algebraic equations relating them
|
|
|
| ordinary multiplication of functions
|
|
|
| systems represented by their transfer functions W(s)
|
|
|

------------------------------------------------------------------------

The use in ODEs will be to apply L to an ODE, solve the resulting very
simple algebraic equation in the s world, and then return to reality
using the "inverse Laplace transform" L^{-1}.

[2] The definition can be motivated but it is more efficient to simply


give it and come to the motivation later. Here it is.

We continue to consider functions (possibly generalized) f(t) such


that f(t) = 0 for t < 0 .

F(s) = integral_0^\infty e^{-st} f(t) dt [to be emended]

This is like a hologram, in that each value F(s) contains information


about ALL values of f(t).

Example: f(t) = u(t) :

F(s) = integral_0^infty e^{-st} dt

= lim_{T --> infty} e^{-sT}/(-s) |^T_0

= (-1/s) (lim_{T --> infty} e^{-st} - 1).

To compute this limit, write s = a + bi so

e^{-sT} = e^{-aT} (cos(-bT) + i sin(-bT))

The second factor lies on the unit circle, so |e^{-sT}| = e^{-aT}.


This goes to infinity with T if a < 0 and to zero if a > 0.
Thus:

F(s) = 1/s for Re(s) > 0

and the improper integral fails to converge for Re(s) < 0 .

[3] This is typical behavior: the integral converges to the right of


some vertical line in the complex plane C, and diverges to the left,
provided that f(t) doesn't grow too fast. Technically, there should
exist a real number k such that for all large t ,
|f(t)| < e^{kt}

In the definition we should add:

"for Re(s) large."

The expression obtained by means of the integration makes sense


everywhere in C except for a few points - like s = 0 here - and this is how we
define the Laplace transform for values of s with small real part.

[4] This computation can be exploited using general properties of the


Laplace Transform. We'll develop quite a few of these rules, and in fact
normally you will not be using the integral definition to compute Laplace
transforms.

Rule 1 (Linearity): L[af(t) + bg(t)] = aF(s) + bG(s).

This is clear, and has the usual benefits.

Rule 2 (s-shift): If z is any complex number, L[e^{zt}f(t)] = F

(s-z).

Here's the calculation:

L[e^{zt}f(t)] = integral_0^infinity e^{zt} f(t) e^{-st} dt

= integral_0^infinity f(t) e^{-(s-z)t} dt

= F(s-z).

Using f(t) = 1 and our calculation of its Laplace transform we find

L[e^{zt}] = 1/(s-z). (*)

[5] Especially, we've computed L[e^{at}] for a real.

This calculation (*) is more powerful than you may imagine at first,
since z may be complex. Using linearity and

cos(omega t) = (e^{i omega t} + e^{-i omega t})/2

we find

L[cos(omega t)] = (1/(s - i omega) + 1/(s + i omega))/2

Cross multiplying, we can rewrite

L[cos(omega t)] = s/(s^2 + omega^2)

Using

sin(omega t) = (e^{i omega} - e^{-i omega})/(2i)

we find
L[sin(omega t)] = omega/(s^2 + omega^2).

[6] The delta function:

Something new about delta(t):

If f(t) is continuous at b , f(t) delta(t-b) = f(b) delta(t-b) .

Therefore whenever a < b < c , integral_a^c f(t) delta(t-b) dt = f(b):

integrating against delta(t) picks out the value of f(t) at t = b .

Thus, for b >= 0 ,

L[delta(t-b)] = integral_0^infty delta(t-b) e^{-st} dt

= e^{-bs}

In particular,

L[delta(t)] = 1

This example shows that actually we should write

L[f(t)] = integral_{0-}^infty f(t) e^{-st} dt

to be sure to include any singularities at t = 0.

[7] The relationship with differential equations:

Compute:

L[f'(t)] = integral_{0-}^infty f'(t) e^{-st} dt

u = e^{-st} du = -s e^{-st} dt

dv = f'(t) dt v = f(t)

... = e^{-st} f(t) |_{0-}^infty + s integral f(t) e^{-st}


dt

The evaluation of the first term at t = infty is zero, by our


assumption about the growth of f(t), assuming that Re(s) is large
enough. The evaluation at t = 0- is zero because f(0-) = 0 . Thus:

... = s F(s)

Now, what is f'(t) ? If f(t) has discontinuities, we must mean the


generalized derivative. There is one discontinuity in f(t) that we
can't
just wish away: f(0-) = 0 , while we had better let f(0+) be whatever
it wants to be. We have to expect a discontinuity at t = 0 .

Just to keep the notation in bounds, lets suppose that f(t) is


differentiable for t > 0. Then
(f')_r(t) is the ordinary derivative

(f')_s(t) = f(0+) delta (t)

and the generalized derivative is the sum. Thus

L[f'(t)] = f(0+) + L[f'_r(t)]

and so

L[f'_r(t)] = s F(s) - f(0+) .


18.03 Class 27, April 17, 2006

Laplace Transform II: inverse transform, t-derivative rule,


use in solving ODEs; partial fractions: cover-up method; s-derivative
rule.

Definition:

F(s) = L[f(t)] = integral_{0-}^infty f(t) e^{-st} dt , Re(s) >> 0

Rules:

L is linear: L[af(t)+bg(t)] = aF(s) + bG(s)

F(s) essentially determines f(t)

s-shift: L[ e^{at}f(t) = F(s-a)

t-derivative: L[f'(t)] = s F(s) - f(0+) if we omit the singularity

of f'(t) at t = 0 .

Computations:

L[1] = 1/s

L[e^{as}] = 1/(s-a)

L[cos(omega t)] = s/(s^2+omega^2)

L[sin(omega t)] = omega/(s^2+omega^2)

L[delta(t-a)] = e^{-as}

[1] The t-derivative rule:

Compute:

L[f'(t)] = integral_{0-}^infty f'(t) e^{-st} dt

u = e^{-st} du = -s e^{-st} dt

dv = f'(t) dt v = f(t)

... = e^{-st} f(t) |_{0-}^infty + s integral f(t) e^{-st}


dt

We continue to assume that f(t) doesn't grow too fast with t (so that
the integral defining F(s) converges for Re(s) sufficiently large).
This means that for s sufficiently large, the evaluation of the first
term at infinity becomes zero. Since we are always assuming rest
initial conditions, the evaluation at zero is also zero. Thus

... = s F(s)
Now, what is f'(t) ? If f(t) has discontinuities, we must mean the
generalized derivative. There is one discontinuity in f(t) that we
can't
just wish away: f(0-) = 0 , while we had better let f(0+) be whatever
it wants to be. We have to expect a discontinuity at t = 0 .

Just to keep the notation in bounds, let's suppose that f(t) is


continuous for t > 0 (and is piecewise differentiable). Then

(f')_r(t) is the ordinary derivative

(f')_s(t) = f(0+) delta (t)

and the generalized derivative is the sum. Thus

L[f'(t)] = f(0+) + L[f'_r(t)]

and so

L[f'_r(t)] = s F(s) - f(0+) .

This is what the book tells us, and this is typically what we will use.
But remember, (1) it is only good if f(t) is continuous for t > 0 ,
and (2) it does NOT compute the LT of f'(t), but rather of (f')_r(t) .

[2] In summary the use of Laplace transform in solving ODEs goes like
this:

IVP for x(t) ---------> Alg equation for X(s)

|
| solve

L^{-1} v

x(t) = ... <--------- X(s) = ...

For this to work we have to recover information about f(t) from F(s).
There isn't a formula for L^{-1}; what one does is look for parts of
F(s) in our table of computations. It's an art, like integration.
There is no free lunch.

We can't expect to recover f(t) exactly, if f(t) isn't required


to be continuous, since F(s) is defined by an integral, which is left
unchanged if we alter any individual value of f(t) . What we have is:

Theorem: If f(t) and g(t) are generalized functions with the same
Laplace transform, then f(a+) = g(a+), f(a-) = g(a-) for every a ,
and the singular parts coincide: f_s(t) = g_s(t) -- that is, any
occurances of delta functions are the same in f(t) as in g(t).

So if f(t) and g(t) are continuous at t = a, then f(a) = g(a).

[3] Example: Solve x' + 3x = e^{-t}, x(0+) = 5.

Step 1: Apply L : (sX - 5) + 3X = 1/(s+1) , using linearity, the


table look-up for L[e^{at}] with a = -1 , and the t-derivative rule.

Step 2: Solve for X: (s+3)X = 5 + 1/(s+1)

so X = 5/(s+3) + 1/((s+1)(s+3))

Step 3: Massage the result into a linear combination of recognizable

forms.

Here the method is:

Partial Fractions: 1/((s+1)(s+3)) = a/(s+1) + b/(s+3) .

Old method: cross multiply and identify coefficients.

This works fine, but for excitement let me offer:

The Cover-up Method: Step (i) Multiply through by (s+1) :

1/(s+3) = a + (s+1)(a/(s+3))

Step (ii) Set s + 1 = 0 , or s = -1 :

1/(3-1) = a + 0 : a = 1/2 .

This process "covers up" occurances of the factor (s+1), and also
all unwanted unknown coefficients. It gives b too:

1/(-3+1) = 0 + b : b = -1/2.

So X = (1/2)/(s+1) + (9/2)/(s+3)

Step 4: Apply L^{-1}: we can now recognize both terms:

x = (1/2) e^{-t} + (9/2) e^{-3t} .

You have to be somewhat crazy to like this method. This problem is


completely
straightforward using our old methods: the Exponential Response Formula
gives
the particular solution xp = (1/2) e^{-t} ; the basic homogeneous
solution
is e^{-3t}, and the transient needed to produce the initial condition x
(0) = 5
is (9/2) e^{-3t}. I don't show you this to advertise it as a good way
to
solve this sort of problem, but rather to illustrate by a simple example
how
the method works.

Two more rules:

[4] The s-derivative rule :

F'(s) = (d/ds) integral_{0-}^infinity e^{-st} f(t) dt

= integral_{0-}^infinity (-t e^{-st}) f(t) dt

which is the Laplace transform of - t f(t). Thus:


L[t f(t)] = - F'(s)

Sample use: start with L[1] = 1/s = s^{-1}

L[t] = - (d/ds) s^{-1} = s^{-2}

Now take f(t) = t, so L[t^2] = - (d/ds) s^{-2} = 2 s^{-3}

and then f(t) = t^2 so t f(t) = t^3 ---> - (d/ds) s^{-3} = (2 x 3) s^


{-4}

The general picture is L[t^n] = n! / s^{(n+1)}

[5] The t-shift rule :

Notation: f_a(t) = u(t-a)f(t-a) = f(t-a) for t > a


= 0 for t < a

The graph of f_a(t) is the same as the graph of f(t) but shifted to
the
right by a units. For t < a , f_a(t) = 0 . a >= 0 for us.

L[f_a(t)] = integral_{a-}^infinity f(t-a) e^{st} dt

The lower limit is a because for t < a , f_a(t) = 0 , while I want


to remember the delta_a(t) in f_a(t) if there happened to be a
delta(t)
in f(t) .
.
The method of wishful thinking suggests inventing a new letter for the
quantity t - a : tau = t - a ; t = tau + a ; d tau = dt ; so

L[f_a(t)] = integral_{0-}^infinity f(tau) e^{-s(tau+a)} d tau

By the exponential law e^{-s(tau+a)} = e^{-s tau} e^{-as} ,


and e^{-as} is constant in the integral, so

L[f_a(t)] = e^{-as} integral_{0-}^infinity f(tau) e^{-s tau} d


tau

This integral is precisely F(s) ; the choice of variable name inside


the integral (u here instead of t) makes no difference to the value
of
the integral. Thus:

L[f_a(t)] = e^{-as} F(s)

For example, if we take f(t) to be the step function u(t) , we find

L[u(t-a)] = e^{-as}/s

We've found LT of a new signal, a discontinuous one, one whose


definition
comes in two parts (t > a, t < a) . The LT is perfectly fine, though,
with just a single part to its definition.
18.03 Class 28, Apr 21

Laplace Transform III: Second order equations; completing the square.

Rules:

L is linear: L[af(t) + bg(t)] = aF(s) + bG(s)

F(s) essentially determines f(t)

s-shift: L[e^{at}f(t)] = F(s-a)

t-shift: L[f_a(t)] = e^{-as} F(s)

s-derivative: L[tf(t)] = - F'(s)

t-derivative: L[f'(t)] = s F(s) - f(0+)

L[f"(t)] = s^2 F(s) - s f(0+) - f'(0+)

(ignoring singularities at t = 0 )

Computations:

L[1] = 1/s

L[e^{as}] = 1/(s-a)

L[cos(omega t)] = s/(s^2+omega^2)

L[sin(omega t)] = omega/(s^2+omega^2)

L[delta(t-a)] = e^{-as}

L[t^n] = n!/s^{n+1} , n = 1, 2, 3, ...

[1] To handle second degree equations we'll need to know the LT of


f"(t).
We'll compute it by regarding f"(t) as the derivative of f'(t).
We'll employ a technique here that will get repeated several more times
today: pick a new function symbol and use it to name some function that
arises in the middle of a calculation.

The application of this principle here is to write g(t) = f'(t) .

We'll assume that f(t) and f'(t) are continuous for t > 0 and
ignore
singularities at t = 0 , so that

G(s) = L[g(t)] = s F(s) - f(0+)

Write down the t-derivative rule for g(t):

L[g'(t)] = s G(s) - g(0+)

So then
L[f"(t)] = s (s F(s) - f(0+)) - f'(0+) = s^2 F(s) - s f(0+) -
f'(0+)

[2] Example: x" + 2 x' + 5 x = 5 , x(0+) = 2, x'(0+) = 3 .

Note that this is EASY to solve using our old linear methods:
by inspection (or undetermined coefficients, or the Key Formula)
xp = 1/5 is a solution; the general solution is this plus a homogeneous
solution, which you choose to satisfy the initial conditions.
Nevertheless we have some technique to show you in working it out
using LT.

Step 1: Apply LT: (s^2 X - 2s - 3) + 2 (s X - 2) + 5 X = 5/s

Step 2: Solve for X: (s^2 + 2 s + 5) X = (2s + 7) + 5/s

[3] Analysis of the form of this equation:

(s^2 + 2 s + 5) is the characteristic polynomial p(s) ! - this will


always be the case. (2s + 7) is data from the initial conditions; if
we
had used rest initial conditions this would have been zero. 5/s is the
LT of the signal. So:

p(s)X(s) = (data from initial conditions) + (LT of input signal)

Application of the differential operator p(D) is represented in the


s-domain by multiplication by p(s) . Solving the equation amounts to
dividing by p(s). In the s-domain we really are finding the inverse
of the operator. This is one of the attractions of the Laplace
transform.

[4] Back to our example, X = (2s+7)/(s^2+2s+5) + 5/(s(s^2+2s+5)) .

Step 3: Massage X into recognizable bits.

By linearity, we can look at the terms separately.

Look first at the first term. To handle the quadratic denominator we

use

Method: Complete the square: p(s) = s^2 + 2s + 5 = (s+1)^2 + 4.

(Note that this gives you the roots of p(s): s+1 = +- 2i or s = -1

+- 2i .)

Then write the whole expression using (s+1):

(2s+7)/(s^2+2s+5) = ((2(s+1) + 5)/((s+1)^2 + 4)

The s-shift rule will provide us with the (s+1)'s. To apply it


without losing your way, I recommend using a new function name: write

F(s) = (2s+5)/(s^2+4)

so that (2s+7)/(s^2+2s+5) = F(s+1) . From the tables, the inverse LT


of F(s) is
f(t) = 2 cos(2t) + (5/2) sin(2t) .

The s-shift rule (with a = -1) gives:

e^{-t}(2 cos(2t) + (5/2) sin(2t)). (*)

Now look at second term. We'll use partial fractions for it, but notice
that we also complete the square: there are constants a, b, c, such
that

5/(s((s+1)^2+4) = a/s + (b(s+1)+c)/((s+1)^2+4)

Note that I've completed the square and written the numerator using (s+
1), in anticipation that I'll need things in that form when it comes time to
appeal again to the s-shift rule to recognize things as Laplace
transforms.

You can find a, b, c, by cross multiplying and equating coefficients.


Or you can use the coverup method. To find a multiply through by s
and then set s = 0:

5/(1+4) = a or a = 1.

To get b and c, we can use the

Method: "Complex Coverup": Multiply through by


((s+1)^2+4) and then set s equal to a root of this quadratic.
Roots: (s+1)^2 = -4 so s+1 = +-2i or s = -1 +- 2i. We can pick
either one, say s = -1 + 2i or s+1 = 2i. We get:

5/(-1+2i) = b(2i) + c.

Notice how useful it was to have things expressed in terms of s+1 here.
We can use this to solve for b and c, which are supposed to be real.
Rationalizing the denominator,

(1-2i) = 5(1-2i)/(1+4) = 2bi + c so b = -1 and c = -1.

5/(s((s+1)^2+4) = 1/s - ((s+1)+1)/((s+1)^2+4)

We can either find L^{-1} of this and add it to what we did before,
or (better) not have rushed to find L^{-1} before and assemble things
now:

X = 1/s - ( (s+1) + 4 ) / ( (s+1)^2 + 4 )

Step 4: Find L^{-1}[X(s)] is now easy: (remember the omega in the


numerator of L[sin(omega t)] ), using the s-shift rule again.

x = 1 + e^{-t}(cos(2t) + 2 sin(2t)) .

[5] You have to be crazy to like this method of solving

x" + 2 x' + 5 x = 5, x(0+) = 2, x'(0+) = 3.


After all, xp = 1 ; the roots of the characteristic polynomial are
-1 +- 2i (a fact that we used in the complex coverup), so the general
homogeneous solution is

xh = e^{-t} (c1 cos(2t) + c2 sin(2t))

and x = 1 + xh for suitable choice of c1 and c2 , which can be


found by substituting in the initial conditions. I showed you this to
illustrate LT technique, not to advertise it as a good way to solve such
ODEs.

The method of Laplace transform actually is quite good at solving ODEs


if the initial conditions and the signal are as simple as possible:

The weight function of p(D) is the solution to p(D)w = delta(t)


with rest initial conditions: apply LT:

p(D)w = 1 or W(s) = 1/p(s)

L[w(t)] = 1/p(s)

is the "transfer function." It has the property that for any complex
number r, x = W(r)e^{rt} satisfies p(D)x = e^{rt} .

And the unit step response v(t) is the solution to p(D)v = u(t)
with rest initial conditions: apply LT:

p(D)v = 1/s or V(s) = 1/(s p(s))

Example: to find the unit impulse response for the operator


p(D) = s^2 + 2s + 5 , we have

W(s) = 1/(s^2 + 2s + 5)

Complete the square: W(s) = 1/((s+1)^2 + 4)

Deal with G(s) = 1/(s^2 + 4) : g(t) = (1/2) sin(2t)

and then by s-shift, w(t) = (1/2) e^{-t} sin(2t) .

On Monday I'll try to put this all together, and talk about what
the Laplace transform is really good at.
18.03 Class 29, Apr 24

Laplace Transform IV: The pole diagram

[1] I introduced the weight function = unit impulse response with the
mantra
that you know a system by how it responds, so if you let it respond to
the
simplest possible signal (with the simplest possible initial conditions)
then you should be able to determine the system parameters.

How?

Well, take the equation p(D) w = delta(t) (with rest initial


conditions)

and apply LT to it (in the original form, so F[f'(t)] = sF(s)):

p(s) W(s) = 1

so the Laplace transform of the weight function w(t) is

W(s) = 1/p(s) (*)

That is, Laplace transform is the device for extracting the system
parameters from the unit impulse response.

If the unit impulse response is e^{-t}sin(2t) for example, then

W(s) = (2)/((s+1)^2+4)

and

1/W(s) = (1/2)s^2 + s + (5/2)

so we discover, if you like, that the mass is 1/2, the damping constant
is 1, and the spring constant is 2.

[Of course we knew that, too: the impulse response is (for t > 0) a
homogeneous system response, so the roots of the characteristic
polynomial
are visible and must be - 1 +- 2i . The roots don't quite determine
the polynomial, since you can always multiply through by a constant
and get another polynomial with the same roots. If you normalize to
s^2 + bs + k then
b = - (sum of roots) = 2
k = product of roots = 5

so up to a constant you get s^2 + 2s + 5

The constant is the mass, and this can be derived too, from w'(0) = 2 :
the change in momentum is 1, so if the change in velocity is to be 2,
the mass must be 1/2.]

If 1/W(s) is not a polynomial, you have discovered that the system is


not modeled by a differential operator. One of the virtues of the
Laplace
transform methodology is that it can be used to analyze systems whether
or
not they are controlled by a differential equation.

[2] A few weeks ago we described the system response (with rest initial
conditions) to a general input signal q(t) in terms of the unit
impulse
response w(t):

p(D) x = q(t) with rest initial conditions (*)

has solution x(t) = w(t)*q(t) .

On the other hand, if we apply LT to (*) we find

p(s) X = F(s)

so X = W(s)F(s)

We have discovered an important principle (which can be proved by direct


application of the definitions): Laplace transform converts convolution
product of functions of t to ordinary product of functions of s .

L[f(t)*g(t)] = F(s) G(s)

This is consistent with other things we know; for example, apply L to

f(t)*delta(t) = f(t) and get

F(s) 1 = F(s) check!

[3] Exponential signals

The "transfer function" W(s) directly determines the system response

to (almost) any exponential signal:

Exponential response: p(D) x = e^{rt} has an exponential solution

x_p = W(r) e^{rt}

The transfer function is the Laplace transform of the weight function.

This can be used to find

Sinusoidal response: p(D)x = cos(omega t)

p(D)z = e^{i omega t}

z_p = W(i omega) e^{i omega t}

x_p = Re[ W(i omega) e^{i omega t} ]

= gain(omega) cos(omega t - phi)

where gain(omega) = |W(i omega)|

- phi = Arg(W(i omega))

W(i omega) is the "complex gain." (Here we are supposing that the
"physical input signal," with respect to which we should be measuring
the
gain and the phase lag, is just the input signal.)

[4] How can we understand the function 1/s as s varies?

Just try to understand |1/s| ; put the argument aside for another day.

This is 1/|s| , that is, 1/(distance from 0).

This is a function on the complex plane, so its graph is a surface lying

over

the complex plane. It sweeps up to infinity as s ---> 0 . It's like a

tent,

with a tent post stuck in the ground at s = 0 . Maybe it's for this

reason

that we call s = 0 a pole of 1/s .

Look at W(s) = 1/p(s) . Suppose p(s) = (1/2)(s^2 + 2s + 5) as

above.

This factors as p(s) = (1/2)((s-r1)(s-r2) where

r1 = - 1 + 2i

r2 = - 1 - 2i

are the roots. W(s) then becomes infinite when s comes to be one of
r1 or r2 . It falls off towards zero when s moves away. The graph
of |1/p(s)| is a tent with two poles.

In fact by partial fractions, W(s) = a/(s-r1) + b/(s-r2) .

[5] Here's the vision that unifies most of what we have done in this
course
so far:

You have a system (a black box, with springs and masses and dashpots,

for example) which you wish to understand. This means really that you

want to be able to predict its response to various input signals.

We will only be able to analyze systems which are LINEAR and TIME

INVARIANT:

so superposition holds, and delaying the input signal just results in

delaying

the system response.

You are especially interested in its periodic response to periodic

signals.

Periodic signals decompose into sinusoidal signals, by Fourier series,

so it's enough just to study sinusoidal system responses.

There will be a gain and a phase lag involved. You'll be happy to

understand

the gain, and leave th phase lag for another day.

So hit the system: feed it delta(t) as input signal.

What comes out is w(t).

Apply L to w(t) to get W(s) .

Graph |W(s)| . This will be a surface lying over the complex plane.

Restrict s to purely imaginary values , s = i omega. This is what


is
needed to study sinusoidal input response:

p(D) x = e^{i omega t}

has exponential solution

x_p = W(i omega) e^{i omega t}

so |W(s)| is the gain.

The intersection of the graph of W(s) with the vertical plane lying
over
the imaginary axis is the amplitude response curve (extended to an even
function, allowing negative omega).

Near resonance occurs because i omega is getting near to one of the


poles of W(s) .

If you increase the damping, the poles move deeper into negative real
part
space, and eventually the two humps in the frequency response curve
merge.

If you have a higher order system, you get more poles, and a more
complicated
amplitude response curve.
18.03 Class 31, April 28, 2006

First order systems: Introduction

[1] There are two fields in which rabbits are breeding like rabbits.
Field 1 contains x(t) rabbits, field 2 contains y(t) rabbits.
In both fields the rabbits breed at a rate of 3 rabbits per rabbit per
year.
Note that the rabbits cancel, so the units are (year)^{-1} .
They can also leap over the hedge between
the fields. The grass is greener in field 2, so rabbits from field 1
jump at the rate of 5 yr^{-1} , while rabbits from field 2 jump only at
the
rate of 1 yr^{-1}.

So the equations are

x' = 3x - 5x + y = -2x + y (1)


y' = 3y - y + 5x = 5x + 2y (2)

The net growth rate of the field 1 population is -2 because of all the

jumping, and the net growth rate in field 2 is 2. On the other hand,

each derivative is increased by virtue of the influx from the other

field.

Each of the four coefficients has a clear interpretation.

This is a linear SYSTEM of equations, homogeneous. The general case

looks like

x' = ax + by
y' = cx + dy

It seems to be impossible to solve, since you need to know y to solve


for x and you need to know x to solve for y.

We can solve, though, by a process called ELIMINATION:


use (1) to express y in terms of x: y = x' + 2x
and then plug this into (2):

x" + 2x' = 5x + 2(x' + 2x)


or
x" - 9x = 0

This is a SECOND ORDER ODE , which we can solve:

The characteristic polynomial is s^2 = 9 , and the roots are +-3.

We get two basic solutions,

x_1 = e^{3t}
x_2 = e^{-3t}

Each gives a corresponding solution for y , using y = x' + 2x .

y_1 = 5e^{3t}
y_2 = -e^{-3t}

With two rabbit populations, we should clearly graph this on the x vs y


plane:
Notice that y_1 = 5x_1 : so this solution moves along the line through
the
origin of slope 5 . y_2 = -x_2 , so that solution moves along the line
of slope -1.

These are two "trajectories" of the rabbit populations. The general


solution
is a combination of them:

x = a e^{3t} + b e^{-3t}

y = 5a e^{3t} - b e^{-3t}

In the long run, the population of field 2 tends to 5 times the


population of
field 1. Of course there are a lot of anti-rabbits hopping around here
which
are of interest to mathematicians but not to biologists.

This picture is a "phase portrait." It does not show complete detail of


the
solutions; it does not show the time at which the solution passes
through
a given point. For any given point there is a unique solution passing
through it. Said differently, you can go through a point at any time you
want.
Each curve in the phase portrait is the trajectory of many different
solutions.

[2] Analysis of linear equations by matrices.

We are studying

x' = ax + by

(*)

y' = cx + dy

We can represent linear equations using matrices. The matrix of


coefficients of (*) is the array of numbers (enclosed by brackets)

A = | a b |
| c d |

In these notes I will use Matlab notation and write this array as

[ a b ; c d ]

There is another matrix in sight, the "column vector"

| x |
| y |

or [ x ; y ] with entries x and y .

Matrix multiplication is set up so that

| a b | | x | = | ax + by |
| c d | | y | | cx + dy |

or [ a b ; c d ][ x ; y ] = [ ax+by ; cx+dy ]

The ODE (*) can thus be written as


[ x' ; y' ] = [ a b ; c d ][ x ; y ]

If we write u for the column vector [ x ; y ] then u' = [ x' ;


y' ] , and

u' = Au

This compact expression is exactly equivalent to (*) .

[3] Companion matrices: Anti-elimination

Here's an important source of systems of equations.


Suppose we have a second order homogeneous linear equation, say

x" - x' + 4x = 0

We can derive a first order linear system from this, by the trick of
defining

y = x'

so then

y' = x" = x' - 4 x = -4 x + y

Together we have

x' = y
y' = -4 x + y

This is a first order constant coefficient homogeneous linear system


whose
matrix

A = [ 0 1 ; -4 1 ]

is the "companion matrix" of the original second order equation.

Companion matrices have top row [ 0 1 ] .

We can see more precisely what the trajectories are in this case, by

solving the original equation

x" - x' + 4 x = 0

Its characteristic polynomial is p(s) = s^2 - s + 4 .


You can find its roots using the quadratic formula:

-(1/2) +- i omega , omega = sqrt(15)/2 ~ 1.94

The general solution is thus

x = A e^{t/2} cos(omega t - phi)

These oscillate under an exponentially growing envelope. The derivative


does the same, but is off phase. The result is that the trajectory

traced out by (x,y) is an expanding spiral.

This is the "phase space" picture of the solutions of the original

second order equation. We can see x' recorded vertically.

The phase portrait of the companion system of a second degree equation


shows the values of both the solution x and its derivative x' .

[5] It turns out that the same system models the relationship between
Romeo and Juliet. The MIT Humanities Department has analyzed the plot of
Shakespeare's play and found the following. If R denotes Romeo's love
for Juliet, and J denotes Juliet's love for Romeo, then

R' = J

J' = -R + 4J

Romeo is a puppy dog. He has little selfawareness; the change in his

feelings towards Juliet has nothing to do with how he himself feels at

the

moment; it is completely dependent on how she feels about him. Juliet is

more complex. She has a healthy self awareness; if she loves him, that

very fact causes her to love him more. On the other hand, if he seems to

love her, she gets frightened and starts to love him less.

Let's start the action at (1,0). So Romeo is fond of Juliet but she is

neutral

towards him. However, she does notice that he is fond of her, and this

makes

her somewhat hostile. As she becomes more distant, his affection wanes.

Eventually he is neutral and she really doesn't like him. This

continues;

presently he stays away from her, and this very fact makes her more

interested.

She warms to him, he notices and his rate of increase of disinterest

starts

to ameliorate. Eventually she is neutral, just as he bottoms out.

He then starts to feel better towards her, but still stays away, and now

both his attitude and hers cause her to feel progressively more well

disposed towards him. This causes him to continue to warm to her.

Following this around, you wind up at J = 0 again, but now R has

increased.

This is a cyclical relationship, but with each cycle the intensity

increases.

We all know the sad outcome.

18.03 Class 32, May 1

Eigenvalues and eigenvectors

[1] Prologue on Linear Algebra.

Recall [a b ; c d] [x ; y] = x[a ; c] + y[b ; d] :

A matrix times a column vector is the linear combination of


the columns of the matrix weighted by the entries in the column vector.

When is this product zero?

One way is for x = y = 0. If [a ; c] and [b ; d] point in


different directions, this is the ONLY way. But if they lie along a
single line, we can find x and y so that the sum cancels.

Write A = [a b ; c d] and u = [x ; y] , so we have been thinking


about A u = 0 as an equation in u . It always has the "trivial"
solution u = 0 = [0 ; 0] : 0 is a linear combination of the two
columns in a "trivial" way, with 0 coefficients, and we are asking
when it is a linear combination of them in a different, "nontrivial"
way.

We get a nonzero solution [x ; y] exactly when the slopes of the


vectors
[a ; c] and [b ; d] coincide: c/a = d/b , or ad - bc = 0. This
combination of the entries in A is so important it's called the
"determinant" of the matrix:

det(A) = ad - bc

We have found:

Theorem: Au = 0 has a nontrivial solution exactly when det A = 0 .

If A is a larger *square* matrix the same theorem still holds, with


the appropriate definition of the number det A .

[2] Solve u' = Au : for example with A = [1 2 ; 2 1] .

The "Linear Phase Portraits: Matrix Entry" Mathlet shows that some
trajectories seem to be along straight lines. Let's find them first.
That is to say, we are going to look for a solution of the form

u(t) = r(t) v

One thing for sure: the velocity vector u'(t) also points in the same
(or reverse) direction as u(t). So for any vector v on this
trajectory,

A v = lambda v

for some number lambda. This Greek letter is always used in this
context.

[3] This is a pure linear algebra problem: A is a square matrix, and


we are
looking for nonzero vectors v such that A v = lambda v for some
number
lambda. In order to get all the v's together, write the right hand
side as

lambda v = (lambda I) v

where I is the identity matrix [1 0 ; 0 1] , and lambda I is the


matrix with lambda down the diagonal. Then we can put this on the
left:

0 = A v - (lambda I) v = (A - lambda I) v

Don't forget, we are looking for a nonzero v . We have just found an


exact condition for such a solution:

det(A - lambda I) = 0

This is an equation in lambda ; we will find lambda first, and then


set about solving for v (knowing in advance only that there IS a
nonzero

solution).

In our example, then, we subtract lambda from both diagonal entries

and then take the determanent:

A - lambda I = [ 1 - lambda , 2 ; 2 , 1 - lambda ]

det ( A - lambda I ) = (1-lambda)(1-lambda) - 4

= 1 - 2 lambda + lambda^2 - 4

= lambda^2 - 2 lambda - 3

This is the "characteristic polynomial"

p_A(lambda) = det( A - lambda I )

of A , and its roots are the "characteristic values" or "eigenvalues"

of A .

In our case, p_A(lambda) = (lambda + 1)(lambda - 3)

and there are two roots, lambda_1 = -1 and lambda_2 = 3 .

[4] Now we can find those special directions. There is one line for
lambda_1 and another for lambda_2 . We have to find nonzero solution
v to

(A - lambda I) v = 0

eg with lambda = lambda_1 = -1 , A - lambda = [ 2 2 ; 2 2 ]

There is a nontrivial linear relation between the columns:

A [ 1 ; -1 ] = 0

All we are claiming is that


A [ 1 ; -1 ] = - [ 1 ; -1 ]

and you can check this directly. Any such v (even zero) is called
an "eigenvector" of A.

Back to the differential equation. We have found that there is a


straight line
solution of the form r(t) v where v = [1;-1] . We have

r' v = u' = A u = A rv = r A v = r lambda v

so (since v is nonzero)

r' = lambda r

and solving this goes straight back to Day One:

r = c e^{lambda t}

so for us r = c e^{-t} and we have found our first straight line


solution:

u = e^{-t} [1;-1]

In fact we've found all solutions which occur along that line:

u = c e^{-t} [1;-1]

Any one of these solutions is called a "normal mode."

General fact: the eigenvalue turns out to play a much more important
role
than it looked like it would: the straight line solutions are
*exponential*
solutions, e^{lambda t} v , where lambda is an eigenvalue for
the matrix and v is a nonzero eigenvector for this eigenvalue.

The second eigenvalue, lambda_2 = 3 , leads to

A - lambda I = [ -1 1 ; 1 -1 ]

and [ -1 1 ; 1 -1 ] v = 0 has nonzero solution v = [1;1]

so [1;1] is a nonzero eigenvector for the eigenvalue lambda = 3 ,


and there is another straight line solution

e^{3t} [1;1]

[5] The general solution to u' = Au will be a linear combination of

the two eigensolutions (as long as there are two distinct eigenvalues).

In our example, the general solution is

u = c1 e^{-t} [1 ; -1] + c2 e^{3t} [1 ; 1]

We can solve for c1 and c2 using an initial condition: say for

example

u(0) = [2 ; 0]. Well,

u(0) = c1 [1 ; -1] + c2 [1 ; 1] = [c1+c2 ; -c1+c2]

and for this to be [2 ; 0] we must have c1 = c2 = 1:

u(t) = e^{-t} [1 ; -1] + e^{3t} [1 ; 1] .

When t is very negative, -10, say, the first term is very big and the
second tiny: the solution is very near the line through [1 ; -1].
As t gets near zero, the two terms become comparable and the solution
curves around. As t gets large, 10, say, the second term is very big
and the first is tiny: the solution becomes asymptotic to the line
through
[1 ; 1].

The general solution is a combination of the two normal modes.

[6] Comments:

(1) The characteristic polynomial for the general 2x2 matrix A =


[a,b;c,d] is

p_A(lambda) = (a-lambda)(d-lambda) - bc

= lambda^2 - (a+d) lambda - (ad-bc)

The sum of the diagonal terms of a square matrix is the "trace" of A ,

tr A,

so

p_A(lambda) = lambda^2 - (tr A) lambda + (det A)

In our example, tr A = 2 and det A = 3 , and

p_A(lambda) = lambda^2 - 2 lambda - 3 .

(2) Any multiple of an eigenvector is another eigenvector for the same


eigenvalue; they form a line, an "eigenline."

(3) The eigenlines for distinct eigenvalues are not genearally


perpendicular
to each other; that is a special feature of *symmetric* matrices, those
for
which b = c .

Also, generally the eigenvalues, roots of the characteristic polynomial,


may be complex, not real. But for a symmetric matrix, all the
eigenvalues
are real.

Both these facts hold in higher dimensions as well. Most real numbers we
know about are eigenvalues of symmetric matrices - the mass of an
elementary
particle, for example.
18.03 Class 33, May 3

Complex or repeated eigenvalues

[1] The method for solving u' = Au that we devised on Monday is this:

(1) Write down the characteristic polynomial

p_A(lambda) = det(A - lambda I) = lambda^2 - (tr A)lambda +(det


A)

(2) Find its roots, the eigenvalues lambda_1, lambda_2

(3) For each eigenvalue find a nonzero eigenvector --- v such that

Av = lambda v or (A - lambda I) v = 0

--- say v_1 , v_2.

Then the "ray" solutions are multiples of

e^{lambda_1 t} v_1 and e^{lambda_2 t} v_2

These are also called "normal modes." The general solution is a linear
combination of them.

[2] This makes you think there are always ray solutions. But what about
the Romeo and Juliet example, which spirals and obviously has no such
solution? Or, what about

A = [ 1 2 ; -2 1 ] .

I showed the trajectories on Linear Phase Portraits: Matrix Entry.

Let's apply the method and see what happens. tr(A) = 2 , det(A) = 5,
so

p_A(lambda) = lambda^2 - 2 lambda + 5

which has roots lambda_1 = 1 + 2i, lambda_2 = 1 - 2i.

(As always for real polynomials, the roots (if not real) come as complex
conjugate pairs.)

We could abandon the effort at this point, but we had so much fun and
success with complex numbers earlier that it seems we should carry on.

Find an eigenvector for lambda_1 = 1 + 2i :

A - (1+2i)I : [ - 2i , 2 ; -2 , -2i ][ ? ; ? ] = [ 0 ; 0 ]

Standard method: use the entries in the top row in reverse order with
one sign changed: [ 2 ; 2i ] or, easier, in this case,

v_1 = [ 1 ; i ].

This is set up so the top entry in the product is 0 . We have a chance


to check our work (mainly the calculation of the eigenvalues) by
seeing that the bottom entry in the product is 0 too:

-2 . 1 - 2i . i = 0

[ 1 ; i ] is a vector with complex entries. OK, so be it. It's hard


to visualize, perhaps, and doesn't represent a point on the plane, but

we can still compute with it just fine.

So one normal mode is

e^{(1+2i)t} [ 1 ; i ]

[3] But we wanted real solutions. As in the case of second order

equations,

the real and imaginary parts of solutions are again solutions:

So these are real solutions:

e^{(1+2i)t} [ 1 ; i ]

= e^t ( cos(2t) + i sin(2t) ) ( [1;0] + i[0;1] ) so

u_1 = Re(u) = e^t ( cos(2t) [1;0] - sin(2t) [0;1] )

= e^t [cos(2t) ; - sin(2t)] and

u_2 = Im(u) = e^t ( cos(2t) [0;1] + sin(2t) [1;0] )

= e^t [sin(2t) ; cos(2t)]

These are two independent real solutions. Both spiral around the origin,
clockwise, while fleeing away from it exponentially. They satisfy

u_1(0) = [1;0] , u_2(0) = [0;1] .

I showed their trajectories on the Mathlet Linear Phase Portraits:


Matrix
Entry.

The general real solution is

u = a u_1 + b u_2 , a, b real .

It is very hard to visualize the fact that all


those spirals are linear combinations of any two of them.
In this case, it's easy to find a and b from u(0):

u(0) = a[1;0] + b[0;1]

so a = x(0) and b = y(0) . In general you have to solve a linear


equation
to get a and b .

Note: Since lambda_2 = conjugate of lambda_1,

an eigenvector for lambda_2 is given by the conjugate of v_1:

v_2 = [ 1 ; -i ]
so another normal mode is e^{(1-2i)t} [ 1 ; -i ] .

This is complex conjugate to the one we had before, so its real and

imaginary parts give the same solutions we had before (up to sign).

Summary: Nonreal eigenvalues lead to spiral solutions.

Positive real parts lead to solutions going to infinity with t

("unstable")

Negative real parts lead to solutions going to zero with t ("stable")

Zero real parts lead to solutions parametrizing ellipses.

So we discover that the possibility of complex eigenvalues really isn't

failure of the method at all. There are in fact ray solutions, but they

are

complex and don't show up on our real phase plane.

[4] Second problem with our method: Illustrated by

A = [ -2 1 ; -1 0 ]

p_A(lambda) = lambda^2 + 2 lambda + 1 = (lambda + 1)^2

which has only one root, a "repeated eigenvalue": lambda_1 = lambda_2 =


-1.

Still, find an eigenvector:

A - (-1)I = [ -1 1 ; -1 1 ][ ? ; ? ] = [ 0 ; 0 ] : v_1 = [ 1
; 1 ]

or any nonzero multiple. ALL eigenvctors for A lie


on the line containing 0 and [ 1 ; 1 ]. I moved the sliders on Linear
Phase Portraits: Matrix Entry to show the phase plane, which shows only

one pair of opposed ray trajectories.

So there is (up to multiples) only one normal mode:

u_1 = e^{-t} [ 1 ; 1 ]

But we need another solution. Here is how to find one; I won't go into
details, just give you the method.

Write down the same matrix A - lambda_1 I but now find a vector w
such that

(A - lambda_1 I) w = v_1 .

Then

u_2 = e^{lambda_1 t} (t v_1 + w)

is a second solution.

In our case:

[ -1 1 ; -1 1 ] [ ? ; ? ] = [ 1 ; 1 ]

has solution [0;1] , so


u_2 = e^{-t} ( t [1;1] + [0;1] )

= e^{-t} [ t ; t+1 ]

[0;1] isn't the only vector that works here; [0;1] + c v_1 does too

for any constant c. It doesn't matter which one you pick.

With this choice, u_1(0) = [1;1] , u_2(0) = [0;1] .

The general solution is

u = a u_1 + b u_2 .

[5] A matrix with a repeated eigenvalue but only one lineful of


eigenvectors
is called "defective." A matrix can have a repeated eigenvalue and not
be
defective:

A = [ 2 0 ; 0 2 ]

for example has characteristic polynomial

p(lambda) = lambda^2 - 4 lambda + 4 = (lambda - 2)^2

so lambda_1 = lambda_2 = 2. To find an eigenvector consider

A - lambda_1 I : [ 0 0 ; 0 0 ] [ ? ; ? ] = [ 0 ; 0 ]

Now ANY vector is an eigenvector! Instead of only one line you get the
entire plane. For any vector v ,

e^{2t} v

is a solution, and every solution is a normal mode. This is called the


"complete" case. Then you don't need the painful procedure described in

In the 2x2 case, if the eigenvalue is repeated you are in the defective
case unless the matrix is precisely [ lambda_1 , 0 ; 0 , lambda_1 ]

For larger square matrices this becomes the story of Jordan form.

To learn more about all this you should take 18.06 or 18/700.

18.03 Class 34, May 5

Classification of Linear Phase Portraits

The moral of today's lecture: Eigenvalues Rule (usually)

[1] Recall that the characteristic polynomial of a square matrix A is

p_A(lambda) = det(A - lambda I).

In the 2x2 case A = [a b ; c d ] this can be rewritten as

p_A(lambda) = lambda^2 - (tr A) lambda + (det A)

where tr(A) = a + d , det(A) = ad - bc.

Its roots are the eigenvalues, so

p_A(lambda) = (lambda - lambda_1)(lambda - lambda_2)

= lambda^2 - (lambda_1 + lambda_2) lambda + (lambda_1


lambda_2)

Comparing coefficients,

tr(A) = lambda_1 + lambda_2 , det(A) = lambda_1 lambda_2

so the two numbers tr(A) and det(A) , extracted from the four
numbers
a, b, c, d, are determined by the eigenvalues. Conversely, they
determine
the eigenvalues, as the roots: by the quadratic formula,

lambda1,2 = tr(A)/2 +- sqrt(tr(A)^2/4 - det(A)).

lambda1,2 are not real if det(A) > tr(A)^2/4

are equal if det(A) = tr(A)^2/4

are real and different from each other if det(A) < tr(A)^
2/4

The boundary is the "critical parabola," where det(A) = tr(A)^2/4.

Notice that if the eigenvalues are not real, their real part is tr
(A)/2.
If the eigenvalues are real, they have the same sign exactly when their
product is positive, and that sign is positive if their sum is also
positive.
Relationship between tr and det vs eigenvalues

det

^
. |<-----purely imaginary

. complex roots .

. | .

. Re < 0 | Re > 0 .<----- repeated

. | .

. | .

real < 0 . | . real > 0

.. | ..

.. | ..

------------ ....... ------------> tr

real, opposite sign |______ at least one zero


e.v.

The eigenvalues determine many general characteristics of the solutions.

[2] Spirals. We have seen that when the eigenvalues are non-real, we get
spirals. Two more comments on this:

(1) The spirals move IN when Re(lambda) < 0 "stable spiral"


OUT when Re(lambda) > 0 "unstable spiral"

When Re(lambda) = 0 it turns out that the trajectories are ellipses.


The technical term for this type of phase portrait is "center."

(2) We can tell which you get by thinking about what u' is at some

point.

A convenient one to pick is [1;0] : then u' = Au = (first column of

A).

So if the bottom left entry is positive, the spiral is moving

counterclockwise;

if negative, it is moving clockwise.

[3] Saddles. When the eigenvalues are real and of opposite sign, the

phase portrait is a "saddle." There are two eigenlines, one with

positive

eigenvalue and the other with negative. Normal modes along one move out,

and along the other move in. The general solution is a combination of

these

two.

For example A = [ 1 2 ; 2 1 ] as we saw on Monday has phase portrait


as shown on the Linear Phase Portraits: Cursor Entry, with tr = 2 , det
= -3,
s = 0, and theta = 0 .

The eigenlines are of slope +-1 . The one of slope +1 corresponds to


eigenvalue 3, the one of slope -1 has eigenvalue -1. If you take a
solution
which is not a normal mode, when time gets large, the e^{-t} gets
small,

and the e^{3t} is like the cube of 1/e^{-t}: so the solution

converges

to the -1 eigenspace more quickly than it does to the +3 eigenspace.

By moving the trace slider you change the relative size of the

eigenvalues;

when tr = 0 they are of equal size.

Returning to tr = 2 , there are many matrices with this same pair of

eigenvalues. The upper left box lets us explore them. One thing you can

do

is rotate the whole picture. The other thing you can do is change the

angle

between the eigenvectors.

[4] Nodes: When the eigenvalues are real and of the same sign, but

distinct,

you have a "node."

Eg A = [ -2 , 1 ; 1 , -2 ] has

p_A(lambda) = lambda^2 + 4 lambda + 3 = (lambda + 1)(lambda +


3)

so the eigenvalues are -1 and -3. On the Mathlet (with tr = -4, det
= 3,
s = 0, theta = pi/2) you can see that the
eigenlines are again of slope +- 1 : slope +1 with eigenvalue -1 and
the
other with eigenvalue -3. You can check this:

[ -2 , 1 ; 1 , -2 ][ 1 ; 1 ] = [ -1 ; -1 ]

[ -2 , 1 ; 1 , -2 ][ 1 ; -1 ] = [ -3 ; 3 ]

Both normal modes decay to zero, but the one with eigenvalue -3
decays much faster: so the non-normal mode trajectories become tangent
to the eigenline with smaller |lambda|.

[5] The corresponding phase portraits exhibit the following behaviors:

det

^
. |<-----centers .
. | . <--- stars or
. stable | unstable . defective nodes
. spirals | spirals .
. | .
. | .

stable . | . unstable

nodes .. | .. nodes

.. | ..
------------ ....... ------------> tr

saddles |______ degenerate cases


There are also the special cases that happen along the curves separating

these regions:

. det = 0 : "Degenerate." At least one of the eigenvalues is zero.

If v is an eigenvector corresponding to this eigenvalue, then

the constant vector valued function u(t) = c v is a solution for

any constant c: there is a line (at least) of constant solutions.

Several patterns are possible, and they are illustrated in the

Supplementary Notes.

. det = tr^2/4 , along the critical parabola: repeated real

eigenvalues.

The phase portraits are either

stars, in the complete case [ lambda1 0 ; 0 lambda1 ] or


defective nodes , otherwise.

[6] Stability: All linear systems fall into one of the following
categories:

Asymptotically stable: all solutions ---> 0 as t ---> infinity.


These systems occupy the upper left quadrant, tr < 0 and det > 0,
so all the eigenvalues have negative real part.

Neutrally stable: all solutions stay bounded


but most don't ---> 0 as t --> infinity.
Ellipses and stable combs are examples.

Unstable: most solutions ---> infinity as t ---> infinity


Saddles and unstable nodes and spirals are examples.
18.03 Class 35, May 8

The companion matrix and its phase portrait;


The matrix exponential: initial value problems.

[1] We spent a lot of time studying the second order equation

x" + bx' + kx = 0

and if b and k are nonnegative we interpreted them as the damping

constant and spring constant (divided by the mass).

The companion system is obtained by setting

x' = y
y' = - kx - by

whose matrix of coefficients is the "companion matrix"

A = [ 0 1 ; -k -b ]

Note that tr(A) = -b , det(A) = k, and the characteristic polynomial


of A is lambda^2 + b lambda + k, i.e., it is the same as the
characteristic polynomial of the original second order equation.

If lambda_1 is an eigenvalue of a companion matrix, then to find


an eigenvector we look for v such that

[ -lambda_1 , 1 ; * , * ] v = 0

v = [ 1 ; lambda_1 ] does nicely. This makes sense: x = e^{lambda_1 t}


has derivative x' = lambda_1 e^{lambda_1 t} , so

[ x ; x' ] = e^{lambda t} [ 1 ; lambda_1 ]

is a solution to the companion system.

QUESTION 1: What region in the (tr,det) plane corresponds to c > 0,

k > 0?

Ans: the upper left quadrant.

QUESTION 2: What region in the (tr,det) plane corresponds to

overdamping?

Ans: The part of the upper left quadrant which is below the critical

parabola,

where there are stable nodes.

For example x" + (3/2)x' + (1/2)x = 0 is overdamped. We saw long ago

that

solutions to overdamped equations decay as time increases, can cross the

x = 0
axis at most once, and can have at most one critical point (zero

slope).

The companion matrix is [ 0 , 1 ; -1/2 , -3/2 ] . Roots of the

characteristic
polynomial, i.e. eigenvalues, are -1/2 and -1 , with eigenvectors
[ 1 ; -1/2 ] and [ 1 ; -1 ] respectively, so basic solutions

e^{-t/2} [ 1 ; -1/2 ] and e^{-t} [ 1 ; -1 ] .

There is a trajectory which

is for very negative t roughly a line of slope -1 and large y

intercept;

it crosses the y axis at a point A , then hooks around, reaching an

easterly most extreme point at B when it crosses the x axis, then

reaches

a southerly extreme at C, and finally heads in towards zero as t --->

infty.

What does the graph of the corresponding solution to x" + (3/2)x' +

(1/2)x = 0

look like? Where are the points on it corresponding to A, B, and C?

Answers: The solution is approximated by c e^{-t} for t << 0 ,

so its derivative is about - c e^{-t} . This explains why for t << 0

the slope of the trajectory is about -1 . x = 0 at A ; the graph

crosses the t axis . x reaches a maximum at B and then falls.

The graph has a point of inflection where y = x' has a minimum

(and so x" = 0) , at C. It then decays exponentially to zero, well

approximated by c e^{-t/2} for t >> 0, so the derivative is about

(-c/2) e^{-t/2} . This explains why for t >> 0 the slope of the

trajectory is about -1/2.

Final reminder: in the companion system case, a stable spiral

trajectory corresponds to a damped oscillation. Also improper nodes

correspond to critically damped solutions.

[2] The Matrix Exponential

Recall from day one that x' = ax with initial condition x(0) has
solution

x = x(0)e^{at} . (*)

This conveniently expresses the solution to this ODE with arbitrary


initial condition (at t = 0). Also, e^{at} is DEFINED to be the
solution to x' = ax with initial condition x(0) = 1 . This is
what led us (and Euler before us) to the expression

e^{(a+bi)t} = e^{at} (cos(bt) + i sin(bt))

With this definition, (*) remains true.

Why not make an analogous definition in the case of a system of

equations?

That is, define the symbol e^{At} so that the solution to

u' = Au with initial condition u(0) is u(t) = e^{At}u(0).


(**)

Note that the initial value u(0) is a vector, and u(t) is a vector
valued
function. So the expression e^{At} must denote a matrix, or rather a
matrix
valued function.

What could e^{At} be? What is its first column? Recall that the
first column of any matrix B is the product B[1;0] . Combining
this with (**) we see:

The first column of e^{At} is the solution to u' = Au with u(0) =


[1;0].

Similarly,

The second column of e^{At} is the solution to u' = Au with u(0)=


[0;1].

This is the DEFINITION of e^{At} . Note that at t = 0 we get the


identity
matrix. Let's check the claim (**) for any initial condition [a;b] .
If we write v_1 and v_2 for those two solutions, so that

e^{At} = [ v_1 , v_2 ] then

e^{At} [ a ; b ] = a v_1 + b v_2

This is a solution (because it's a linear combination of solutions),


and at t = 0 we get

a v_1(0) + b v_2(0) = a [1;0] + b [0;1] = [a;b] .

[3] We need a method of computing the e^{At}. Begin by finding a


linearly
independent pair of solutions (basic solutions, perhaps normal modes,
as we have before). Call them u_1 and u_2. The general solution is
a linear combination of u_1 and u_2, which we can write as

[ u_1 , u_2 ] c_1

where c_1 is a column vector.

The matrix [u_1 , u_2] is a "fundamental matrix" for A and is


written
Phi(t) . The second column is also a solution :

Phi(t) c_2

These two facts can be recorded using the matrix product

e^{At} = Phi(t) [ c_1 c_2 ]

The right hand matrix is there to get the initial conditions right.
Evaluate at t = 0 :

I = Phi(0) c

This means that c = Phi(0)^{-1} .

Reminder on inverse matrices: A square matrix has an inverse exactly


when
its determinant is nonzero. In the 2x2 case A = [a,b;c,d] ,

[ a b ; c d ]^{-1} = (1/det A) [ d -b ; -c a ]

--- the diagonal terms get their positions reversed, and the off
diagonal

terms get their signs reversed.

Altogether: e^{At} = Phi(t) Phi(0)^{-1}

where Phi(t) is any fundamental matrix for A .

Example: A = [ 0 , 1 ; -1/2 , -3/2 ] . We saw basic solutions

e^{-t/2} [ 1 ; -1/2 ] and e^{-t} [ 1 ; -1 ] .

so Phi(t) = [ e^{-t/2} , e^{-t} ; -(1/2)e^{-t/2} , -e^{-t} ]

Phi(0) = [ 1 , 1 ; -1/2 , -1 ]

has determinant -1/2 and so

Phi(0)^{-1} = [ 2 , 2 ; -1 , -2 ] .

e^{At} = Phi(t) Phi(0)^{-1}

= [ e^{-t/2} , e^{-t} ; -(1/2)e^{-t/2} , -e^{-t} ] [ 2 , 2 ; -1 , -2


]

= [ 2e^{-t/2}-e^{-t} , 2e^{-t/2}-2e^{-t} ; e^{-t/2}+e^{-t} , -e^{-t/2}+


2e^t} ]
18.03 Class 36, May 10

Review of matrix exponential


Inhomogeneous linear equations

[1] Prelude on linear algebra:

If A and B are matrices such that the number of columns in A is

the same as the number of rows in B , then we can form the "product matrix" AB.

If the columns of B are

b_1 , ... , b_n

then the columns of AB are

A b_1 , ... , A b_n

[2] I know you don't want to hear more about Romeo and Juliet. This is
about amorous armadillos, named Xena and Yan.

x' = - x + 3y

y' = -3x - y

Matrix [ -1 , 3 ; -3 , -1 ] .

Characteristic poly: lambda^2 + 2 lambda + 10

Eigenvalues: -1 +- 3i

Stop! what do we want to know? We have a stable spiral, rotating

clockwise.

Do we want more? We already know that this romance will peter out into

dull acceptance. Maybe that's enough information about X and Y's love life

for us.

If not, we can go ahead and solve:

Eigenvector for -1 + 3i : [3 ; 3i] or just [1;i] .

Normal mode: e^{(-1+3i)t} [1;i]

Basic real solutions: e^{-t}[cos(3t) ; -sin(3t)]

e^{-t}[sin(3t) ; cos(3t)]

Fundamental matrix Phi(t) = e^{-t} [ cos(3t) , sin(3t) ; -sin(3t) , cos


(3t) ]

Then the general solution is Phi(t) [ a ; b ] .

In fact you can think of Phi(t) as a matrix-valued solution:

Phi'(t) = A Phi(t) . (*)

By the linear algebra prologue, if B is any 2 x 2 matrix then the


columns of Phi(t) B are of this form and hence are solutions.

The matrix exponential e^{At} is the fundamental matrix which is I


when t = 0 . Its columns are the solutions which pass through [1;0] and
[0;1]

at t = 0 . It must be of the form Phi(t) B, and taking t = 0 shows

that Phi(0) B = I , or B = Phi(0)^{-1} and

e^{At} = Phi(t) Phi(0)^{-1}

For us, Phi(0) = I already! so we have found the matrix exponential.


The solution u(t) with value [a;b] at t = 0 is

e^{-t} [ cos(3t) , sin(3t) ; -sin(3t) , cos(3t) ] [ a ; b ]

[3] The matrix exponential has various familiar properties,

e^{As} e^{At} = e^{A(s+t)}

e^{A0} = I

(e^{At})^{-1} = e^{-At}

Evaluating it at t = other values gives other matrices with numbers


(not functions) as entries; especially t = 1 , which gives a definition of
e^A.
Then the exponential law gives

e^{nA} = (e^A)^n , n any integer.

Also, for those of you who love power series,

e^{A} = I + A + (A^2)/2 + (A^3)/3! + ....

Warning: e^A e^B is generally different from e^{A+B}$.

[4] Now, a well known perfume manufacturer has taken an interest in


Xeno and Yan. They produce a scent, Armamour, which exerts a certain influence on
X and on Y : it increases X's rate of change of affection by a
and Y's by b. Now we have:

x' = - x + 3 y + a
y' = -3 x - y + b

This is an INHOMOGNENEOUS linear equation, which can be written

u' = A u + c

where c = [a;b] . Specifically, c = [10;40] .

Expect a constant solution u_p : then u'_p = 0 , so

A u_p = - c or u_p = - A^{-1} c

With A = [-1,3;-3,-1] , A^{-1} = (1/10)[-1,-3;3,-1] , so

u_p = - [-.1,-.3;.3,-.1] c

Specifically, then,
u_p = [.1,.3;-.3,.1] [10;40] = [13;1] .

This is the "equilibrium solution."


The general solution is u_p + u_h where u_h is a solution of the
homogeneous equation as above; it's a transient; all solutions spiral in
to the single fixed point.

[5] Now, in fact, even Armani's armamour fades with time --


exponentially, of course. The truth is that q(t) = e^{-t}[10;40] .

Abstractly, we may have a forcing term that varies with time:

u' = Au + q(t)

We can solve this by "variation of parameters," as follows.

Let Phi(t) be a fundamental matrix for A . Instead of looking for


solutions Phi(t) c , which work if q(t) = 0 , let's look for solutions
of the form u = Phi(t) v(t) , where v(t) is as yet unknown.

(d/dt) Phi(t) v(t) = Phi'(t) v(t) + Phi(t) v'(t)

= A Phi(t) v(t) + q(t)

By (*), Phi'(t) = A Phi(t) , so those terms cancel and we find

Phi(t) v'(t) = q(t) or

v(t) = integral Phi(t)^{-1} q(t) dt so

u(t) = Phi(t) integral Phi(t)^{-1} q(t) dt

[6] In the Armani example, we have to work Phi(t)^{-1} . First,

det Phi(t) = e^{-2t}(cos^2(3t) + sin^2(3t)) = e^{-2t} so

Phi(t)^{-t} = e^{2t} e^{-t} [ cos(3t) , -sin(3t) ; sin(3t) , cos


(3t) ]

= e^t [ cos(3t) , -sin(3t) ; sin(3t) , cos(3t) ]

Phi(t)^{-1} q(t) = [ 10 cos(3t) - 40 sin(3t) ; 10 sin(3t) + 40 cos


(3t) ]

integral Phi(t)^{-1} q(t) dt

= (10/3) [ -sin(3t) - 4 cos(3t) ; cos(3t) - 4 sin(3t)] + c

u(t) = Phi(t) integral Phi(t)^{-t} q(t) dt

= (10/3) e^{-t} [ -4 ; 1 ] + Phi(t) c

by an amazing cancellation which you should see for yourself.


The first term is the "particular solution," the second the homogeneous
solution or transient. Despite Armani's best efforts, the relationship
settles down to zip.
18.03 Class 37, May 12

Introduction to general nonlinear autonomous systems.

[1] Recall that an ODE is "autonomous" if x' depends only on x


and not on t:

x' = g(x)

For example, I know an island in the St Lawrence River in upstate New


York
where there are a lot of deer. When there aren't many deer, they
multiply
with growth rate k ; x' = kx . Soon, though, they push up against the
limitations of the island; the growth rate is a function of the
population,
and we might take it to be k(1-(x/a)) where a is the maximal
sustainable
population of deer on the island. So the equation is

x' = k(1-(x/a))x , the "logistic equation."

On this particular island, k = 3 and a = 3 , so x' = (3-x)x .

There are "critical points" at x = 0 and x = 3 . When 0 < x < 3 ,

x' > 0.

When x > 3 , x' < 0 , and, unrealistically, when x < 0 , x' < 0 too.

I drew some solutions, and then recalled the phase line:

------<-----*---->------*------<--------

[2] One day, a wolf swims across from the neighboring island, pulls
himself
up the steep rocky shore, shakes the water off his fur, and sniffs the
air.
Two wolves, actually.

Wolves eat deer, and this has a depressing effect on the growth rate of

deer.

Let's model it by

x' = (3-x-y) x

where y measures the population of wolves.

Now, wolves in isolation follow a logistic equation too, say

y' = (1-y) y (no deer)

But the presence of deer increases their growth rate, say

y' = (1-y+x) y

We have a nonlinear autonomous system

x' = (3-x-y) x (*)


y' = (1-y+x) y

[3] The general case would be

x' = f(x,y)

y' = g(x,y)

-- the system does not change over time.

We have been studying a special case of this, the homogeneous linear

case,

in which

f(x,y) = ax + by

g(x,y) = cx + dy

Giving an autonomous equation is the same thing as giving a vector


field:

u'(t) = F(u) = f(x,y)i^ + g(x,y)j^

I showed a slide of the linear vector field

F(u) = Au with A = [-1,3;-3,-1]

which modeled the effect of Armamour on Xena and Yan.

Solutions are parametrized curves such that the velocity vector at the
point v is given by F(v), both in direction and magnitude.
You can see some solutions, and how they thread their way through the
vector field.

Then I showed a slide of the deer/wolf vector field. It seemed to show


some "equilibria," points at which the vector field vanishes.

[4] The fact is that normally a process spends most of its time near
equilibrium. Not exactly AT equilibrium, but near to it. It is always
in the act of returning to equilibrium after being jarred off it by
something.

So identifying equilibria is important, and understanding how the system


behaves near equilibrium is important. To find the equilibria,
first think about where the vector field is vertical:

x' = 0 , that is (3-x-y) x = 0 .

This happens when either x = 0 or 3-x-y = 0 ; the vector field


is vertical along those two lines.

It is horizontal where

y' = 0 , that is (1-y+x) y = 0 .

This happens when either y = 0 or 1-y+x = 0 ; the vector field


is horizontal along those two lines.

The vector field is both vertical and horizontal exactly when it


vanishes.
There are four places where that happens:

(0,0) , (3,0) , (0,1) ,

and the place where both y = 3-x and y = 1+x , which is at (1,2) .

Notice that along the x axis, where y = 0 , we get exactly the phase
line
of the deer population without wolves, and along the y axis, where x
= 0,
we get the phase line of the wolf population without deer. These two
phase
lines sit inside the phase portrait of the deer/wolf system.

[5] We'll study the behavior near the critical point (0,0).

Expanding out,

x' = f(x,y) = 3x - x^2 - xy

y' = g(x,y) = y + xy - y^2

Near the origin the quadratic terms in the vector field are
insignificant, so
"to first order"

x' = 3x

y' = y

The deer and wolf populations both expand by natural growth. This is a
homogeneous linear system with matrix [ 3 0 ; 0 1 ] . The eigenvalues
are 1 and 3 , so we have a node. The eigenline for the smaller
eigenvalue
is the y axis, so this is the line to which all solutions (except for
the other normal mode!) all solutions become tangent as the approach the
origin.
18.03 Class 38, May 15

Nonlinear systems: Jacobian matrices

[1] The Nonlinear Pendulum.

The bob of a pendulum is attached to a rod, so it can swing clear


around the pivot. This system is determined by three parameters:

L length of pendulum

m mass of bob

g acceleration of gravity

We will assume that the motion is restricted to a plane.

To describe it we need a dynamical variable. We could use a horizontal


displacement, but it turns out to be easier to write down the equation
controlling it if you use the angle of displacement from straight down.
Write theta for that angle, measured to the right.

Here is a force diagram:

|\

|theta
|
\

| \

mg | /\ (this is supposed to be a right angle!)

| \/

| /

| / mg sin(theta)

| /
|/

Write s for arc length along the circle, with s = 0


straight down. Of course,

s = L theta

Newton's law says

F = ms" = mL theta"

The force includes the - mg sin(theta) component of the force of


gravity
(and notice the sign!), and also a frictional force which depends upon

s' = L theta'

Friction is very nonlinear, in fact, but for the moment let's suppose
that
we are restricting to small enough values of theta' so that the
behavior
is linear. (It's surely zero when theta' = 0.) So:

m L theta" = - mg sin(theta) - cL theta'


Divide through by mL and we get

theta" + b theta' + k sin(theta) = 0

where k = g/L and b = c/m .

This is a nonlinear second order equation. It still has a "companion


first order system," obtained by setting

x = theta , y = x'

so y' = theta" = - k sin(theta) - b theta' or

x' = y
y' = - k sin(x) - by

This is an autonomous system. Let's study its phase portrait.

[2] We studied the vector field for the deer/wolf population model,

and so the differential equation, near (0,0)

by approximating it by a linear vector field. We can do that at any

point.

We'll be particularly interested in approximating it near equilibria,

say

near an equilibrium at (a,b) . Each coordinate in the vector field has

tangent line approximation near (a,b) :

f(x,y) ~ f(a,b) + f_x(a,b) (x-a) + f_y(a,b) (y-b)

Here f_x = partial f / partial x .

Since (a,b) is a critical point, the constant term vanishes and we


have a
homogeneous linear system

x' = f_x(a,b) (x-a) + f_y(a,b) (y-b)

y' = g_x(a,b) (x-a) + g_y(a,b) (y-b)

With bar-x = x-a and bar-y = y-b this system


has matrix given by the "Jacobian matrix"

J(x,y) = [ f_x f_y ; g_x g_y ]

evaluated at (a,b) . Near the critical point, the equation behaves


like

v' = J(a,b) v

where v = [ bar-x ; bar-y ] .

[3] In the pendulum, equilibria occur when also sin(x) = 0 .


This occurs when

x = 0 , +-pi , +-2pi , ...

Let's compute the Jacobian:


J(x,y) = [ 0 , 1 ; - k cos(x) , -b ]

When x = 0 , +-2pi , +-4pi , ...., cos(x) = 1 and

J(x,0) = [ 0 1 ; -k -b ]

When x = +-pi , +-3pi , ..., cos(x) = -1 and

J(x,0) = [ 0 1 ; k -b ]

Let's take some particular numbers: b = 2 , k = 65 .


In the first case

J(0,0) = [ 0 , 1 ; -65 , -2 ]

and the characteristic polynomial is

lambda^2 + 2 lambda + 65

with roots -1 +- 8i . The linear phase portrait is a spiral, moving


counterclockwise. Solutions are of the form

x = A e^{-t} cos(8t - phi)

and of course y = x' . The period is 2pi/8 = pi/4 . In the course of


one period, the magnitude decreases by a factor of e^{-pi/4} ~ .46 , or

about half.

I sketched these at the appropriate critical points.

In the second case

J(pi,0) = [ 0 , 1 ; 65 , 2 ]

and the characteristic polynomial is

lambda^2 + 2 lambda - 65

with roots - 1 +- sqrt{66} ~ 7, -9

We have a saddle.

With eigenvalue near 7, A - lambda I has top row [ - 7 1 ]


so the corresponding eigenvector is about [ 1 ; 7 ] .

Similarly, the eigenvector for eigenvalue -9 is about [ 1 ; -9 ] .

The eigenlines are both pretty steep, making a sharp V tilted somewhat

to the right. I sketched these.

[4] Then I revealed the entire phase portrait. It shows several


features
common to all companion systems:

- the trajectories cross the x axis perpendicularly.


- the trajectories above the x axis move right, those below move left.

Trajectories coming down from the left represent the pendulum swinging
around in counterclockwise complete circles. Trajectories coming up from
the right represent the pendulum swinging around in clockwise circles.

With a student I animated the pendulum swinging around. The successive


dips represent passing through the vertical position. In very
exceptional
cases, the trajectory heads straight at the saddle equilibria; they
converge to it like e^{-9t} , but most likely miss and move away
like e^{7t} . The saddles represent the unstable equilibria which are
straight up. Eventually, the trajectory gets caught in a basin (actually
it was always in that basin) and spiral in towards the attractor of that
basin, which is straight down. The spiral has period approaching 8 ,
and the amplitude of the swings decrease by about 50% with each swing.

[5] Postscript on the deer/wolf population model

x' = (3-x-y) x (*)


y' = (1-y+x) y

We found that the vector field is vertical where

x' = 0 , that is either x = 0 or y = 3 - x

and that the vector field is horizontal where

y' = 0 , that is either y = 0 or y = x + 1

Consequently there are critical points, or equilibria, at

(0,0) , (3,0) , (0,1) , (1,2)

To analyze these, expand:

x' = f(x,y) = 3x - x^2 - xy


y' = g(x,y) = y + xy - y^2

Thus J(x,y) = [ 3 - 2x - y , -x ; y , 1 + x - 2y ]

We evaluate this at the critical points.

For example, J(0,0) = [ 3 0 ; 0 1 ] as we had before; an unstable


node,

with non-ray solutions becoming tangent to the y-axis as t --->


-
infty.

We can do this with any of the critical points. For another example,

J(3,0) = [ -3 -3 ; 0 4 ]

has eigenvalues -3 and 4 (since these are the diagonal entries in an


upper triangular matrix ; so we have a saddle, with eigenvectors
[ 1 ; 0 ] and [ 3 ; -7 ] respectively . These snap nicely into place.

Let's do the critical point at (1,2) next:

J(1,2) = [ -1 -1 ; 2 -2 ]

has characteristic polynomial

lambda^2 + 3 lambda + 4
and eigenvalues -(3/2) +- i sqrt(7)/2 .

We have a stable spiral, rotating counterclockwise since the lower left

entry is positive. I sketched this and snapped it into the nonlinear

phase

portrait.

These joined up to give an overall picture of the behavior of this

system,

the phase portrait.

We see that the entire upper right quadrant is a "basin," with the

equilibrium (1,2) an "attractor."

We have learned that the populations of deer and of wolves converge to

these stable levels no matter what the initial populations are (as long

as they are positive). As the population levels approach this

limiting value, they oscillate about them. We can say very exactly

how this happens: the solutions for the deer look like

x-bar = e^{-(3/2)t} cos((sqrt(7)/2)t)

with exponential decay constant -3/2 and pseudofrequency sqrt(7)/2


radians per unit time, or pseudoperiod 4 pi / sqrt(7) ~ 4.75 units of
time.
18.03 Class 39, May 17

Dangers of linearization; limit cycles; chaos; next steps in mathematics

[1] The method we sketched on Monday works well "generically," i.e.


almost all the time.

Things get tricky if the trace and determinant of the Jacobian matrix
lie on one of the dividing curves in the (tr,det) plane.

If tr = 0 and det > 0 , the linearization gives centers, ellipses,


periodic trajectories. But the actual trajectories of the nonlinear
system
may not be periodic. They may be densely packed spirals. These spirals
will
rotate in the same direction as the predicted ellipse, but they may be
either stable or unstable. It's as if the nonlinearity jostles the
linear
phase portrait off onto one of the regions bounded by the tr = 0 line.

Similarly, if det = (tr/2)^2 > 0 , the linear phase plane is a star or


a defective node. The actual phase plane near the equilibrium may be
more
like a spiral, or more like a node.

None of this is too bad, but there is one case where the actual phase
portrait
may not resemble the linear one at all. This is when the Jacobian matrix
is
degenerate, i.e. has determinant zero, i.e. has at least one eigenvalue
which
is zero.

For example,

x' = 4xy
y' = x^2 - y^2

x' = 0 if either x = 0 or y = 0 . y' = 0 if x = +- y .


So the only critical point is at (0,0).

J(x,y) = [ f_x , f_y ; g_x , g_y ] = [ 4y , 4x ; 2x ; -2y ]

so J(0,0) = [ 0 0 ; 0 0 ]

What is the phase portrait of this linear system? It just says u' = 0

so every point is a constant solution. The eigenvalues are both zero,

every vector is an eigenvector, it is a degenerate system.

On the other hand, I showed a Matlab plot of the phase portrait: it has

six

ray solutions, unlike any linear portrait. Weird.

We can still analyze this a bit. If x = 0 for example then

and a solution occurs as long as y' = -y^2 ;

so there are other ray solutions along the vertical axis.

These solutions behave very differently from ray solutions of linear

systems.

For example y' = -y^2 is separable: y = 1/(t-c). This is two


solutions, depending upon whether t > c or t < c . This reflects the
following behavior: Solutions for y < 0 start very slow but then
speed up so quickly that they disappear to -infinity in finite time:
graphed against time, they have a vertical asymptote. Solutions for y >
0
appear at some time, racing down from infinity, and then slow down as
they
near the origin. They approach the origin more slowly than any
exponential
decay (and the negative solutions begin their departure from the origin
more slowly than any exponential growth).

The lesson: If you find det J(a,b) = 0 you have to assume that the
phase
portrait near the critical point (a,b) will look different from the
linear
phase portrait. If J(a,b) is nonzero, it will look the same.

[We can verify that there are ray solutions to this equation by finding
the slope and substituting. If y = mx, then x' = 4mx^2 and y' = (1-m^
2)x^2.
The slope of the vector field must also be m , in order to keep the
solution
from wandering off the ray, so

m = y'/x' = (1-m^2)/4m or m = +-1/sqrt(5).

There are solutions along the lines through the origin with these
slopes.]

[2] In studying a nonlinear autonomous system, the most important


thing,
after equilibria, is the possibility of periodic solutions.

For example, the "van der Pol" equation is

x" + c (x^2-1) x' + x = 0

for fixed c . When c = 0 this is just the harmonic oscillator, with


omega_n = 1 ; all the nonzero solutions are periodic of period 2 pi.

The companion system is

x' = y

y' = - x - c (x^2-1) y

This system turns out to continue to have periodic solutions. When c >
0
the situation is in fact even better: there is ONLY ONE periodic
trajectory,
and all other nonzero solutions converge to it. This is a "limit cycle."
The human heart (and I promise that this is the last time I'll mention
it)
is in fact controlled by an equation like this. This is why it returns
to
a normal periodic pattern after being disturbed.
[3] It can be shown that limit cycles are typical for 2D systems.
But when you move to 3D things are much more complicated. The first such
system was discovered right here at MIT by Edward Lorenz, who was
modeling
"convection rolls" in the upper atmosphere. In 1963 he wrote down a
fairly simple model, a nonlinear autonomous system in 3 dimensions:

x' = -ax + by

y' = -xz + rx - y

z' = xy - bz

for constants a , b , r. Here's what happens for certain values of


these parameters - and I showed the IDE tool "Lorenz Equations, Phase
Plane,
0 < r < 30. <http://www.aw-bc.com/ide/idefiles/media/JavaTools/lnrzphsp.html>.

The solutions don't ever settle down to a periodic orbit; but neither do
they run off to infinity. They just wrap pretty crazily around the two
nonzero unstable equilibria which exist provided that r > a/b .

[4] The unifying theme of the course has been the exponential function.
See how many ways you can find it among the Ten Essential Skills:

1. First order models. Euler's method.

2. First order linear equations: Integrating factors or Variation of


Parameter.

3. Complex numbers and exponentials.

4. Second order LTI systems, poly*exponential or sinusoidal signal;


amplitude gain and phase lag.

5. Delta functions, unit impulse response, convolution.

6. Fourier series, periodic solutions.

7. Laplace transform; transfer function and weight function.

8. Linear systems: eigenvalues, eigenvectors; Variation of Parameters.

9. Linear phase portraits.

10. Nonlinear phase portraits; linearization at equilibria.

[5] Next steps in Mathematics

18.04 (spring) Complex Variables with Applications (poles and such;


magical
integral evaluations; Fourier analysis; conformal mappings)
(Alternatively, 18.112, requiring 18.100 as prerequisite.)

18.05 (spring) Probability and Statistics (Random variables;


confidence intervals)
(Alternatively, 18.440, Probability, and 18.443, Statistics)

18.06 (fall and spring) Linear Algebra.


(Alternatively, 18.700, or 18.701)

18.100A (fall and spring), 18.100B (fall and spring), or 18.100C


(spring):
Analysis I.

18.152 or 18.303: Linear PDEs, "pure" and "applied."

18.353J = 12.006 and 18.354J = 12.207: Nonlinear dynamics: Chaos,


continuum systems; fluids, turbulence.....
MA 232 Differential Equations Fall 1999 Kevin Dempsey

INTRODUCTION TO COMPLEX NUMBERS†


Susanne C. Brenner and D. J. Kaup
Department of Mathematics and Computer Science
Clarkson University

Complex Arithmetic
(Complex conjugation, magnitude of a complex number, division by complex numbers)
Cartesian and Polar Forms
Euler’s Formula
De Moivre’s Formula
Differentiation of Complex Functions

One of the most important numbers in complex analysis is i. The number i is a solution of
the equation x2 + 1 = 0 and has the property that i2 = −1. (Of course, another solution of
x2 + 1 = 0 is −i.)
We write a complex number z as z = x + iy (or x + yi), where x and y are real numbers.
We call x the real part of z and y the imaginary part of z. We write Re z = x and Im z = y.
Whereas the set of all real numbers is denoted by R, the set of all complex numbers is
denoted by C.

Examples Re(−1 + 3i) = −1, Im(−1 + 3i) = 3

Every real number x can be considered as a complex number x + i0. In other words, a real
number is just a complex number with vanishing imaginary part.
Two complex numbers are said to be equal if they have the same real and imaginary
parts. In other words, the complex numbers z1 = x1 + iy1 and z2 = x2 + iy2 are equal if and
only if x1 = x2 and y1 = y2 .

Example 2 − 3i 6= 2 + 3i

If z = x + iy ∈ C then x, y ∈ R and the absolute value of z is |z| = (x2 + y 2 )1/2 and the
conjugate of z is z̄ = x − iy.

Addition and multiplication in C are defined by

z1 + z2 = (x1 + iy1 ) + (x2 + iy2 ) = (x1 + x2 ) + i(y1 + y2 )


z1 z2 = (x1 + iy1 )(x2 + iy2 )
= x1 x2 + ix1 y2 + iy1 x2 + i2 y1 y2
= (x1 x2 − y1 y2 ) + i(x1 y2 + x2 y1 )

Clearly then
zz̄ = (x + iy)(x − iy) = x2 + y 2 = |z|2


This handout is an amended version of the original.

Complex Numbers Handout -1- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

The Rules of Complex Arithmetic


For z1 , z2 , z3 , z = x + iy ∈ C,
(a) Addition and multiplication are commutative,
z1 + z2 = z2 + z1 , z1 z2 = z2 z1
(b) Addition and multiplication are associative,
(z1 + z2 ) + z3 = z1 + (z2 + z3 ), (z1 z2 )z3 = z1 (z2 z3 )
(c) Multiplication distributes over addition,
z1 (z2 + z3 ) = z1 z2 + z1 z3
(d) Each z has the unique additive identity 0,
z + 0 = (x + iy) + (0 + i0) = x + iy = z
(e) Each z has the unique multiplicative identity 1,
z · 1 = (x + iy) · (1 + i0) = x + iy = z
(f) Each z has the unique additive inverse −z,
z + (−z) = (x + iy) + (−x − iy) = 0 + i0 = 0
(g) Each nonzero z has the unique multiplicative inverse z −1 = 1/z = z̄/|z|2 ,

zz −1 = z 2 = 1
|z|

For example, (a) follows from the definition of addition in C and the commutative law for
real numbers:
z1 + z2 = (x1 + iy1 ) + (x2 + iy2 )
= (x1 + x2 ) + i(y1 + y2 )
= (x2 + x1 ) + i(y2 + y1 )
= (x2 + iy2 ) + (x1 + iy1 )
= z2 + z1
The other properties (b)-(g) may be similarly verified.

Because addition and multiplication in C satisfy (a)-(g), the set C, together with the two
operations of addition and multiplication, is a field. The set R of real numbers is also a field.

Note that for z 6= 0, (g) says that


1 z̄ x − iy x −y
z −1 = = 2 = 2 2
= 2 2
+i 2
z |z| x +y x +y x + y2

Example Find the multiplicative inverse of 1 − 2i


1 1 1 + 2i 1 + 2i 1 2
= · = = +i
1 − 2i 1 − 2i 1 + 2i 1+4 5 5

The operation of taking complex conjugates satisfies two basic algebraic rules:
z1 + z2 = z̄1 + z̄2 , z1 z2 = z̄1 z̄2
Note that if z = x + iy then z + z̄ = x + iy + x − iy = 2x and z − z̄ = x + iy − x + iy = 2iy.
From these two equalities we have
z + z̄ z − z̄
Re z = x = , Im z = y =
2 2i

Complex Numbers Handout -2- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

We can also find the real and imaginary parts of z1 /z2 using complex conjugates. If z2 6= 0,
z1 1 z̄2 z1 z̄2 z1 z̄2
= z1 · = z1 · 2
= = ·
z2 z2 |z2 | z2 z̄2 z2 z̄2
x1 + iy1 x1 + iy1 x2 − iy2 (x1 + iy1 )(x2 − iy2 )
= = · =
x2 + iy2 x2 + iy2 x2 − iy2 x22 + y22
à !
x 1 x 2 + y1 y2 x2 y1 − x1 y2
= 2 2
+i
x2 + y2 x22 + y22

Example Simplify (3 − 2i)/(−1 + i)


3 − 2i 3 − 2i −1 − i −3 − 3i + 2i + 2i2 −5 − i 5 1
= · = 2
= =− −i
−1 + i −1 + i −1 − i 1−i 2 2 2

Example Simplify (3i30 − i19 )/(2i − 1)


3i30 − i19 3(i2 )15 − (i2 )9 i 3(−1)15 − (−1)9 i −3 + i
= = =
2i − 1 −1 + 2i −1 + 2i −1 + 2i

−3 + i −1 − 2i 3 + 6i − i − 2i2 5 + 5i
= · = 2
= =1+i
−1 + 2i −1 − 2i 1 − 4i 5

As mentioned above, we define the


√ modulus or absolute value of a complex number z = x+ iy
2 2
as the nonnegative real number x + y . We write
q
|z| = x2 + y 2

√ √
Example | − 3 + 2i| = 9 + 4 = 13

The following modulus properties hold:


¯ ¯
¯ z1 ¯ |z1 |
|z1 z2 | = |z1 ||z2 |, ¯ ¯ = (z2 6= 0), |z|2 = x2 + y 2 = z z̄
¯ ¯
z2 |z2 |

Why should we bother with complex numbers?

Theorem (Fundamental Theorem of Algebra)


Any polynomial equation cn z n + cn−1 z n−1 + · · · + c1 z1 + c0 = 0, with complex coefficients
c0 , c1 , . . . , cn and cn 6= 0, has n complex roots.

We can therefore solve any polynomial equation completely by using complex numbers. We
can’t say the same thing for reals. Consider x2 + x + 1 = 0. The quadratic formula yields

−1 ± 1 − 4
x=
2

Complex Numbers Handout -3- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

which leads us to complex numbers.

These numbers are also really not “imaginary.” You can visualize z = x + iy as the point
(x, y) ∈ R2 , which is the (two dimensional) Cartesian plane.

Im 6

x z = x + iy = reiθ
© s
©
r© © ©
© © y
© © θ
© -
H
O H Re
H
H
H
z̄ = x − iy = re−iθ
s

Polar Coordinates

Let z = x + iy be a non-zero complex number. The point (x, y) has polar coordinates (r, θ),

x = r cos θ, y = r sin θ

where r > 0. Therefore

z = x + iy = (r cos θ + i sin θ) = r(cosθ + i sin θ)

r(cos θ + i sin θ) is a way of expressing a complex number by using polar coordinates. The
positive number r is just the modulus of z and the angle θ is called the argument of z. It is
determined up to multiples of 2π.

Examples‡
√ µ π π
¶ √ µ
2π 2π

1 + i = 2 cos + i sin , −1 + i 3 = 2 cos + i sin
4 4 3 3

Euler’s Formula

We are all quite familiar with the Taylor series of the exponential function ea when the
exponent a is real§
a2 a3 a4 a5
ea = 1 + a + + + + + ···
2! 3! 4! 5!

These relations are derived in an example on Page 6.
§
Here, n! (n factorial) is defined by n! = n(n − 1)(n − 2) · · · 1 with 0! = 1. Hence, 1! = 1, 2! = 2 · 1 = 2,
3! = 3 · 2 · 1 = 6, 4! = 4 · 3 · 2 · 1 = 24, 5! = 5 · 4 · 3 · 2 · 1 = 120, etc.

Complex Numbers Handout -4- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

However, we may also use the same Taylor series to define the exponential function of an
imaginary exponent (and complex exponents as well). Let θ be a real number and consider
the exponential series when we replace a by θ. We then have
(iθ)2 (iθ)3 (iθ)4 (iθ)5
eiθ = 1 + iθ + + + + + ···
2! 3! 4! 5!
Now let’s reduce this series by using the relation i2 = −1 and collect the real terms together
and the imaginary terms together. We obtain (after adding some more terms to make the
final result more obvious)
2 3 4 5 6 7
iθ 2θ 3θ 4θ 5θ 6θ 7θ
e = 1 + iθ + i +i +i +i +i +i + ···
2! 3! 4! 5! 6! 7!
θ2 θ4 θ6
=1− + − + ···
à 2! 4! 6! !
θ3 θ5 θ7
+i θ− + − + ···
3! 5! 7!

We now have that the real part of eiθ and the imaginary part of eiθ are each a familiar Taylor
series. These are
θ2 θ4 θ6
cos θ = 1 − + − + ···
2! 4! 6!
θ 3 θ5 θ 7
sin θ = θ − + − + ···
3! 5! 7!
Thus we have obtained the famous formula of Euler which is

eiθ = cos θ + i sin θ

A very important property of eiθ is that it has a modulus of unity:


q

|e | = cos2 θ + sin2 θ = 1

for any real θ. In other words, every complex number of the form eiθ lies on the unit circle
x2 + y 2 = 1 in the xy-plane.

Examples

iπ/6 π π 3 1
e = cos + i sin = +i
6 6 2 2
π π 1 1
eiπ/4 = cos + i sin = √ + i √
4 4 2 2
eiπ = −1
ein2π = 1 (n integer)
ei(θ+n2π) = eiθ (θ ∈ R, n integer)

Complex Numbers Handout -5- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

The last result follows from the periodicity of cos θ and sin θ; if n is an integer then cos(θ +
n2π) = cos θ and sin(θ + n2π) = sin θ.

So now the complex number z written in polar coordinates r(cos θ + i sin θ) can be written
as reiθ . This latter form will be called the polar form of the complex number z.

Note that if z = reiθ = r(cos θ + i sin θ), then

z̄ = r(cos θ − i sin θ) = r [cos(−θ) + i sin(−θ)] = re−iθ

When two complex numbers are in polar form, it is very easy to compute their product.
Suppose that z1 = r1 eiθ1 = r1 (cos θ1 + i sin θ1 ) and z2 = r2 eiθ2 = r2 (cos θ2 + i sin θ2 ) are two
non-zero complex numbers. We first compute their product the hard way as follows:

z1 z2 = (r1 r2 )eiθ1 eiθ2


= (r1 r2 )(cos θ1 + i sin θ1 )(cos θ2 + i sin θ2 )
= (r1 r2 ) [(cos θ1 cos θ2 − sin θ1 sin θ2 ) + i(cos θ1 sin θ2 + sin θ1 cos θ2 )]
= (r1 r2 ) [cos(θ1 + θ2 ) + i sin(θ1 + θ2 )]
= (r1 r2 )ei(θ1 +θ2 )

(We used trigonometric addition formulas to simplify in the second to last step.) So now we
have a very easy formula for multiplying two complex numbers in polar form. We simply
multiply their moduli and add their arguments.

From the rule for multiplication of complex numbers in polar form follows a rule for division.
We can easily see that
1
reiθ · e−iθ = ei(θ−θ) = e0 = 1
r
Hence
(reiθ )−1 = r−1 e−iθ
We now turn our attention to dividing two complex numbers in polar form

r1 eiθ1 iθ1 1 iθ2 r1 i(θ1 −θ2 )



= r1e · e = e
r2 e 2 r2 r2
Therefore, to divide two nonzero complex numbers, divide their moduli and subtract their
arguments.

Example Convert z1 = 1 + i and z2 = −1 + i 3 into polar form and compute z1 z2 and z1 /z2

First compute the moduli


√ √ √ √
r1 = |1 + i| = 1 + 1 = 2, r2 = | − 1 + i 3| = 1 + 3 = 2

Complex Numbers Handout -6- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Hence
√ iθ √ √
1+i= 2e 1 = 2 (cos θ1 + i sin θ1 ) , −1 + i 3 = 2eiθ2 = 2 (cos θ2 + i sin θ2 )

from which it is clear that


à ! à √ !
1 1 1 3
(cos θ1 , sin θ1 ) = √ ,√ , (cos θ2 , sin θ2 ) = − ,
2 2 2 2
Either by looking at these points on the unit circle, or by plotting z1 and z2 in the complex
plane, we find that θ1 is π/4 (plus any integer multiple of 2π) and θ2 is 2π/3 (plus any integer
multiple of 2π). Therefore
√ µ π π
¶ √
z1 = 1 + i = 2 cos + i sin = 2eiπ/4
4 4
√ µ ¶
2π 2π
z2 = −1 + i 3 = 2 cos + i sin = 2ei2π/3
3 3
Using the rules for multiplication and division of complex numbers in polar form, we have
z1 1
z1 z2 = ei11π/12 , = √ e−i5π/12
z2 2

The following formula follows from the rules for multiplication and division of complex
numbers in polar form.

De Moivre’e Formula
³ ´n
eiθ = einθ , n = 0, ±1, ±2, . . .
i.e. (cos θ + i sin θ)n = cos nθ + i sin nθ, n = 0, ±1, ±2, . . .

Note that this gives us a very easy means for calculating the multiple angle formulas in
trigonometry. For example, let n = 3 in the above. Then, since (a+b)3 = a3 +3a2 b+3ab2 +b3 ,

cos 3θ + i sin 3θ = (cos θ + i sin θ)3


= (cos θ)3 + 3(cos θ)2 (i sin θ) + 3(cos θ)(i sin θ)2 + (i sin θ)3
= cos3 θ + 3i cos2 θ sin θ − 3 cos θ sin2 θ − i sin3 θ
³ ´ ³ ´
= cos3 θ − 3 cos θ sin2 θ + i 3 cos2 θ sin θ − sin3 θ

Equating real and imaginary parts gives

cos 3θ = cos3 θ − 3 cos θ sin2 θ, sin 3θ = 3 cos2 θ sin θ − sin3 θ

Clearly the real part gives cos 3θ in terms of cos θ and sin θ while the imaginary part gives
the corresponding expression for sin 3θ. Thus if you know De Moivre’s formula, and the
binomial expansion (a + b)n , you can always calculate any of the multiple angle formulas.

Complex Numbers Handout -7- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Complex Exponential Functions

One can also define a general complex exponential function. The argument of the exponential
can be complex in general in which case
ea+ib := ea eib = ea (cos b + i sin b)
The complex exponential function has the following properties:
³ ´n ³ ´n
ea+ib = ea eib = ean eibn = ean+ibn = e(a+ib)n

ea1 +ib1 · ea2 +ib2 = ea1 eib1 · ea2 eib2


= (ea1 ea2 ) ei(b1 +b2 )
= ea1 +a2 ei(b1 +b2 )
= e(a1 +a2 )+i(b1 +b2 )
= e(a1 +ib1 )+(a2 +ib2 )
ea1 +ib1
a +ib
= e(a1 +ib1 )−(a2 +ib2 )
e 2 2

The details of the last equality are left to the reader. Thus the laws of exponents for real
exponential functions also hold for complex exponential functions.

Example Compute (1 + i)15

In polar form
√ µ π π
¶ √
1+i=
2 cos + i sin = 2eiπ/4
4 4
and hence by the laws of exponents
³√ ´15 ³√ ´15 ∙ 15π 15π
¸
(1 + i)15 = 2 ei15π/4 = 2 cos + i sin
4 4
³√ ´15 √ √
Now 2 = 215/2 = 27 2 = 128 2. Also 15π/4 = 4π − π/4. Therefore
à !
15
√ ∙ µ π¶ µ
π
¶¸ √ 1 1
(1 + i) = 128 2 cos − + i sin − = 128 2 √ − i √ = 128 − 128i
4 4 2 2

Example Solve the equation z 3 = 2i

To solve this equation, start with z = reiθ , then, expressing 2i in polar form also, gives
z 3 = r3 ei3θ = 2i = 2eiπ/2 = 2ei(π/2+n2π)
Note the n2π factor in the phase. We don’t know that the phase on the right-hand side
is equal to the phase on the left-hand side. We do know that up to the factor of n2π, the
phases must be the same. Equating moduli and arguments in the above equation gives
π
r3 = 2, 3θ = + n2π
2

Complex Numbers Handout -8- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

so
π 2π π 4π
r = 21/3 , θ= +n = +n
6 3 6 6
Plugging in n = 0, 1, 2 we obtain the roots
Ã√ !
√ √ 3 1
z1 = 2eiπ/6 = 2
3 3
+i
2 2
à √ !
√ √ − 3 1
2ei5π/6
3 3
z2 = = 2 +i
2 2
√ √
2ei3π/2
3 3
z3 = = −i 2

These roots are evenly spaced at 2π/3 = 120◦ intervals on a circle of radius 21/3 = 1.26.
Note that if we continue and take n = 4, 5, . . . we will not obtain any more or different roots.
(Try it and see.)

Differentiating a Complex Function

A function f that depends on a real variable t can take on complex values. Such a complex
function has the form
f(t) = u(t) + iv(t)
where u and v are real functions of t. The derivative of f with respect to t is given by

f 0 (t) = u0 (t) + iv 0 (t)

Example
f (t) = t2 + i cos t, f 0 (t) = 2t − i sin t

Let us see what happens if we differentiate the complex exponential function. We proceed
by first decomposing the complex function into real and imaginary parts, differentiating, and
then finally reassembling the complex exponential. The individual steps are as follows:
h i0 ³ ´0
e(a+ib)t = eat+ibt
h i0
= eat (cos bt + i sin bt)
³ ´0
= eat cos bt + ieat sin bt
³ ´
= aeat cos bt + beat (− sin bt) + i aeat sin bt + beat cos bt

= (a + ib)eat (cos bt + i sin bt)


= (a + ib)e(a+ib)t

Therefore, complex exponential functions have the same kind of differentiation properties as
real exponential functions.

Complex Numbers Handout -9- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Let us now do an example directly related to ODE’s. Let’s take a complex function and see
if it can be a solution of an ODE.

Example Let L = D4 + 2D2 + 1. Compute L (eit ).

(D4 + 2D2 + 1)(eit ) = D4 (eit ) + 2D2 (eit ) + (eit )


= (i4 + 2i2 + 1)(eit )
=0
4 2
it dy dy
So y(t) = e is a solution of constant-coefficient ODE L(y) = 4 + 2 2 + y = 0.
dt dt

Answers to Exercises on Page 11

1. (a) 3 + 2i, (b) 2i, (c) 1 + i, (d) −1 + 4i


√ √
2. (a) 5, (b) 5 + 17
3. (a) 1 ± 2i, (b) ±1, ±i

4. (a) 2e−iπ/4 , (b) 2e−i5π/6 , (c) 4ei2π/3 , (d) 2e0 = 2

5. (a) −32 − 32i, (b) −1/2 + i 3/2
6. (a) {eiθ , θ = 0, 2π/5, 4π, 5, 6π/5, 8π/5}, (b) {eiθ , θ = π/2, 7π/6, 11π/6}
8. (a) f 0 (t) = cos t + i4t3
9. (a) ieit , (b) eit + tieit + 2ieit , (c) 0

Complex Numbers Handout -10- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Exercises

1. Express the following in the form a + ib


(a) i(2 − 3i)
(b) (1 + i)2
(c) (3 + i)/(2 − i)
(d) (−2 + 3i) + i(1 − i)

2. Compute
(a) |3 + 4i|
(b) |i(2 + i)| + |1 + 4i|

3. Solve
(a) z 2 − 2z + 5 = 0
(b) z 4 − 1 = 0

4. Express in the polar form reiθ


(a) 1 −
√i
(b) − 3 √ −i
(c) (1 + i 3)2
(d) (1 + i)(1 − i)

5. Compute
(a) (1 − i)11
h √ i13
1
(b) 2
(−1 + i 3)

6. Solve completely
(a) z 5 = 1
(b) z 3 = −i

7. Show that
(a) ¯z̄ = z
(c) z is real if and only if z = z̄

8. Find f 0 (t) if f (t) = sin t + it4

9. Let L = D2 + D + 1. Compute
(a) L(eit )
it
(b) L(te
" ³
) ´# √
− 12 +i 2
3
t
(c) L e

Complex Numbers Handout -11- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

SOLVING LINEAR SYSTEMS


K. M. Dempsey and D. J. Kaup
Department of Mathematics and Computer Science
Clarkson University

0 Linear Equations

2x1 + x2 = −1
(1)
x1 − x2 = 2
Each equation of the linear system (1) represents a straight line. The system has:
(a) no solution (the two lines are parallel), or
(b) one unique solution (the two lines intersect), or
(c) an infinite number of solutions (the two lines are coincident).
2x1 + 2x2 − 3x3 = 0
−x1 − x2 + x3 = 1 (2)
x1 + x2 − 2x3 = −1
Each equation of the linear system (2) represents a plane. The system has:
(a) no solution (the three planes are parallel or have no common intersection), or
(b) one unique solution (the three planes intersect at just one point), or
(c) an infinite number of solutions (the three planes are coincident or intersect in a line).

Note that in (1) and (2) that the unknowns, the coordinates x1 , x2 and x3 , appear by
themselves with exponent 1. The following systems are nonlinear:
x21 + x2 = 1
(3)
x1 + x2 = 0

x1 x2 + x2 = −1
(4)
x1 − x22 = 0
We shall only concern ourselves with linear systems such as (1) and (2) that have the same
number of equations as unknowns.

1 2 × 2 Systems

The general 2 × 2 (two equations and two unknowns) linear system is


ax1 + bx2 = e
(5)
cx1 + dx2 = f

Linear Systems Handout -1- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

To solve for x1 , we multiply (5a) by d and (5b) by b to obtain


adx1 + bdx2 = de
(6)
bcx1 + bdx2 = bf
Subtracting (6b) from (6a) we get
(ad − bc)x1 = de − bf (7)
Assuming that
ad − bc 6= 0 (8)
the solution for x1 is:
de − bf
x1 = (9)
ad − bc
Similarly, to solve for x2 , we multiply (5a) by c and (5b) by a to obtain
acx1 + bcx2 = ce
(10)
acx1 + adx2 = af
Subtracting (10a) from (10b) we get
(ad − bc)x2 = af − ce (11)
Under assumption (8), we can solve for x2 :
af − ce
x2 = (12)
ad − bc
At this point you should realize that condition (8) is crucial to the success of solving system
(5). Let us see what can happen if (8) does not hold, i.e. ad − bc = 0.

We first note that equations (7) and (11) are always valid. If ad − bc = 0, then (7) and (11)
become
0x1 = de − bf (13)
and
0x2 = af − ce (14)
If the right-hand side of either (13) or (14) is nonzero, we would have the ridiculous equation
zero=nonzero, which means that the system (5) is not solvable.

Conclusion
If ad − bc 6= 0, the 2 × 2 system
ax1 + bx2 = e
cx1 + dx2 = f
is always solvable. The solution is unique and is given by
de − bf
x1 =
ad − bc (15)
af − ce
x2 =
ad − bc
If ad − bc = 0, then the system is in general not solvable.

Linear Systems Handout -2- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

2 Cramer’s Rule
à !
a b
We all know that the determinant of a 2 × 2 matrix is given by the formula
c d
¯ ¯
¯ a b ¯¯
¯
¯ ¯ = ad − bc (16)
¯ c d ¯

Hence, the important condition (8), namely ad − bc 6= 0, for the solvability of

ax1 + bx2 = e
cx1 + dx2 = f
is just
¯ ¯
¯ a b ¯¯
¯
¯
¯
¯=6 0 (17)
c d ¯

We can therefore state that a 2 × 2 system is always solvable if and only if the determinant
of the coefficient matrix is nonzero.

Not only can we describe the solvability condition in terms of a determinant, we can also
represent the solution by determinants. All we have to do is to recognize that
¯ ¯
¯ e b ¯¯
¯
¯ ¯ = ed − bf
¯ f d ¯
¯ ¯ (18)
¯ a e ¯¯
¯
¯ ¯ = af − ce
¯ c f ¯

Then we can rewrite (15) as


¯ ¯
¯ e b ¯¯
¯
¯ ¯
de − bf ¯ f d ¯
x1 = = ¯ ¯
ad − bc ¯ a b ¯¯
¯
¯ ¯
¯ c d ¯
¯ ¯ (19)
¯ a e ¯
¯ ¯
¯ ¯
af − ce ¯ c f ¯
x2 = = ¯ ¯
ad − bc ¯ a b ¯
¯ ¯
¯ ¯
¯ c d ¯

You may wonder how we à can remember


! such formulas. It turns out that there is Ã
an easy !
way.
e b a b
Observe that the matrix can be obtained from the coefficient matrix by
f d c d
à !
e
replacing its first column with the right-hand side of the system. Similarly, the matrix
f

Linear Systems Handout -3- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

à !
a e
can be obtained by replacing the second column of the coefficient matrix with the
c f
right-hand side.

Therefore we can remember (19) by

determinant of the matrix obtained by replacing the first


column of the coeficient matrix with the right-hand side
x1 =
determinant of the coefficient matrix

determinant of the matrix obtained by replacing the second (20)


column of the coeficient matrix with the right-hand side
x2 =
determinant of the coefficient matrix
In summary, we can rewrite the conclusion at the end of Section 1 in the following way.

Cramer’s Rule for 2 × 2 Systems


A 2 × 2 linear system is always solvable if and only if the determinant of the coefficient
matrix is nonzero, in which case the solution is unique and is given by

determinant of the matrix obtained by replacing the kth


column of the coefficient matrix with the right-hand side
xk =
determinant of the coefficient matrix
for k = 1, 2.

Example
Solve the system
à !à ! à !
2x1 + x2 = −1 2 1 x1 −1
which, in matrix form, is =
x1 − x2 = 2 1 −1 x2 2

Solution ¯ ¯
¯ −1 1 ¯
¯ ¯
¯ ¯
¯ 2 −1 ¯ −1 1
x1 = ¯¯ ¯
¯ = =
¯ 2 1 ¯ −3 3
¯ ¯
¯ 1 −1 ¯

¯ ¯
¯ 2 −1 ¯¯
¯
¯ ¯
¯ 1 2 ¯ 5 5
x2 = ¯ ¯ = =−
¯ 2 1 ¯ −3 3
¯ ¯
¯ ¯
¯ 1 −1 ¯

Now that we have a good understanding of 2 × 2 systems, the natural question to ask is:
“What about 3 × 3, 4 × 4, . . . , n × n systems?” The answer is that Cramer’s rule works in
the general case.

Linear Systems Handout -4- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Cramer’s Rule for n × n Systems


An n × n linear system is always solvable if and only if the determinant of the coefficient
matrix is nonzero, in which case the solution is unique and is given by

determinant of the matrix obtained by replacing the kth


column of the coefficient matrix with the right-hand side
xk =
determinant of the coefficient matrix
for k = 1, 2, . . . , n.

The derivation of the general Cramer’s rule is nontrivial. You will see it in MA232/339.
Here we ask you to accept it on the basis of the 2 × 2 case.

In order to use the general Cramer’s rule we must know how to compute the determinant of
n × n matrices. This is dealt with in the next section.

3 Determinants of n × n Matrices

The determinant of the 3 × 3 matrix


 
a11 a12 a13
 
 a21 a22 a23 
a31 a32 a33

can be computed by the formula


¯ ¯
¯ a11 a12 a13 ¯ ¯ ¯ ¯ ¯ ¯ ¯
¯ ¯ ¯ a22 a23 ¯ ¯ a21 a23 ¯ ¯ a21 a22 ¯
¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
¯
¯
a21 a22 a23 ¯
¯
= a11 ¯¯ ¯ − a12 ¯ ¯ + a13 ¯ ¯ (21)
a32 a33 ¯ ¯ a31 a33 ¯ ¯ a31 a32 ¯
¯ a31 a32 a33 ¯

Here is an easy way to remember (21):


(I) Multiply each component (from left to right) on the first row by the determinant of the
matrix obtained by removing the row and column containing that component.
(II) Multiply the terms in Step I alternately by + and −, beginning with +.
(III) Sum the terms obtained in Step III.

Example
Compute ¯ ¯
¯ 1 2 3 ¯¯
¯
¯
¯ 4 5 6 ¯¯
¯ ¯
¯ 7 8 9 ¯

Linear Systems Handout -5- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Solution ¯ ¯
¯ 1 2 3 ¯¯ ¯ ¯ ¯ ¯ ¯ ¯
¯ ¯ 5 6 ¯ ¯ 4 6 ¯ ¯ 4 5 ¯
¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
¯ 4 5 6 ¯¯ = 1 ¯ ¯ − 2¯ ¯ +3¯ ¯
¯ ¯ 8 9 ¯ ¯ 7 9 ¯ ¯ 7 8 ¯
¯ 7 8 9 ¯
= 1(5 · 9 − 8 · 6) − 2(4 · 9 − 7 · 6) + 3(4 · 8 − 7 · 5)
= 1(−3) − 2(−6) + 3(−3)
=0
What about the determinants of 4 × 4 matrices? We use the same three steps since we now
know how to compute the determinants of 3 × 3 matrices.

Example
Compute ¯ ¯
¯ 1 −1 2 3 ¯¯
¯
¯ 0 1 3 2 ¯¯
¯
¯ ¯
¯ −1 1 0 1 ¯¯
¯
¯ 0 2 1 0 ¯

Solution
¯ ¯
¯ 1 −1 2 3 ¯¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
¯ ¯ 1 3 2 ¯¯ ¯ 0 3 2 ¯ ¯ 0 1 2 ¯ ¯ 0 1 3 ¯
¯ 0 1 3 2 ¯¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
¯ ¯
¯ ¯ = 1¯ 1 0 1 ¯¯ − (−1) ¯¯ −1 0 1 ¯¯ + 2 ¯¯ −1 1 1 ¯¯ − 3 ¯¯ −1 1 0 ¯¯
¯ −1 1 0 1 ¯¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯ ¯
¯ ¯ 2 10 ¯ ¯ 0 1 0 ¯ ¯ 0 2 0 ¯ ¯ 0 2 1 ¯
¯ 0 2 1 0 ¯
= 1(7) − (−1)(−2) + 2(−4) − 3(−5)
= 12

There is nothing that can stop us now. Once we know how to handle 4 × 4 determinants,
we can compute 5 × 5 determinants using Steps I-III above, and so on.

We must point out that there are many properties of determinants that we have not discussed.
In particular, there are more efficient ways of computing n × n determinants. You will learn
more about determinants in MA312/339.

4 Gaussian Elimination

Cramer’s rule is an important theoretical result because it enables us to represent the solution
of an n × n linear system in terms of determinants. But it is not an efficient way to compute
the value of the solution when n ≥ 3. The method of Gaussian elimination is more efficient
in these cases.

In the every day world, linear systems of equations are respesented in matrix form and are
solved using matrix algebra. For this reason, Gaussian elimination is introduced here using
matrices.

Linear Systems Handout -6- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

The augmented matrix associated with the 2 × 2 linear system

ax1 + bx2 = e
cx1 + dx2 = f

is
à !
a b e
(22)
c d f

Notice that the xi ’s, in this case, x1 and x2 , are placeholders that can be omitted until the
end of the elimination process. An invaluable aid to the latter is a check column each
entry of which is simply the sum of all the terms of the corresponding row of the augmented
matrix:
à !
a b e a+b+e
(23)
c d f c+d+f

The check column is shown here to the right of the augmented matrix. Its usefulness will
become clear as we proceed.

Definition
In matrix algebra, an elementary row operation entails:
(I) Interchanging two rows,
(II) Multiplying a row by a nonzero real number,
(III) Adding a multiple of one row to another.

Definition
A matrix is said to be in row echelon form if
(a) The first nonzero entry in each row is 1,
(b) If row k does not consist entirely of zeros, the number of leading zero entries in row k + 1
is greater than the number of leading zero entries in row k, and
(c) If there are rows whose entries are all zero, they are below the rows having nonzero
entries.

Definition
The process of using elementary row operations I, II, and III to transform a linear system
into one whose augmented matrix is in row echelon form is called Gaussian elimination.

Note that elementary row operation II is necessary in order to scale the rows so that the
leading coefficients are all 1. If the row echelon matrix contains a row of the form (00 · · · 0|1)
the system is inconsistent. Otherwise, the system will be consistent. If the system is con-
sistent and the nonzero rows of the the row echelon matrix form a triangular system, the
system will have a unique solution.

Definition
A matrix is said to be in reduced row echelon form if:

Linear Systems Handout -7- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

(a) The matrix is in row echelon form, and


(b) The first nonzero entry in each row is the only nonzero entry in its column.

Definition
The process of using elementary row operations to transform a matrix into reduced row
echelon form is called Gauss-Jordan reduction. For a consistent linear system, Gauss-
Jordan reduction transforms the coefficient matrix into an identity matrix.

Gauss-Jordan reduction of a consistent 2 × 2 linear system proceeds as follows:


à !
x x x x
x x x x
à !
x x x x

0 x x x
à !
x 0 x x

0 x x x
à !
1 0 x1 x

0 1 x2 x

Gauss-Jordan reduction of a consistent 3 × 3 linear system looks like:


 
x x x x x
 
 x x x x  x
x x x x x
 
x x x x x
 
→  0 x x x  x
0 x x x x
 
x x x x x
 
→  0 x x x  x
0 0 x x x
 
x x 0 x x
 
→  0 x 0 x  x
0 0 x x x
 
x 0 0 x x
 
→  0 x 0 x  x
0 0 x x x
 
1 0 0 x1 x
 
→  0 1 0 x2  x
0 0 1 x3 x
The outside column is the check column. Thus, for a consistent linear system Ax = b,
the augmented matrix starts out as (A|b) and becomes, after Gauss-Jordan reduction (I|x),
where I is the identity matrix. In other words, the solution vector is the last column of the
reduced row echelon matrix.

Linear Systems Handout -8- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

2 × 2 Example of Gauss-Jordan Reduction∗

2x1 + x2 = −1
(24)
x1 − x2 = 2

à !
2 1 −1 2
1 −1 2 2
à !
R2 1 −1 2 2
,→
R1 2 1 2 2
à !
R1 1 −1 2 2
,→
−2R1 + R2 0 3 −5 −2
à !
3R1 + R2 3 0 1 4
,→
R2 0 3 −5 −2
à !
R1 /3 1 0 1/3 4/3
,→
R2 /3 0 1 −5/3 −2/3

The solution set for (24) is ½ ¾


1 5
x1 = , x2 = −
3 3

Note that at each stage of the reduction, R1 and R2 refer to the preceding matrix.

Note also that you should always check the solution set by substituting it back into the
original system of equations. In this case,
µ ¶µ ¶
1 5 √
2 + − = −1
3 3
µ ¶ µ ¶
1 5 √
− − =2
3 3


Often, elsewhere in this class, for 2 × 2 linear systems, we will use straightforward elimination which in
this case proceeds as follows. We observe that adding the two rows eliminates x2 and gives the equation
3x1 = 1 from which x1 = 1/3. Then from the second equation (either equation suffices) x2 = x1 − 2 = −5/3.

Linear Systems Handout -9- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

3 × 3 Example of Gauss-Jordan Reduction

x1 + 2x2 − 3x3 = 0
−x1 − x2 + x3 = 1 (25)
x1 + x2 − 2x3 = −1

 
1 2 −3 0 0
 
 −1 −1 1 1  0
1 1 −2 −1 −1
 
R1 1 2 −3 0 0
 
,→ R1 + R2  0 1 −2 1  0
R2 + R3 0 0 −1 0 −1
 
R1 1 2 −3 0 0
,→ R2  
 0 1 −2 1  0
−R3 0 0 1 0 1
 
R1 + 3R3 1 2 0 0 3
 
,→ R2 + 2R3  0 1 0 1  2
R3 0 0 1 0 1
 
R1 − 2R2 1 0 0 −2 −1
 
,→ R2  0 1 0 1  2
R3 0 0 1 0 1

Hence, the solution set for (25) is

{x1 = −2, x2 = 1, x3 = 0}

Linear Systems Handout -10- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

4 × 4 Example of Gauss-Jordan Reduction


x2 + x3 + x4 = 1
x1 + 3x2 + 2x4 = −1
(26)
x1 + 3x2 + 3x3 + 3x4 = 0
2x2 + x4 = 2

 
0 1 1 1 1 4
 1 3 0 
2 −1  5

 
 1 3 3 3 0  10
0 2 0 1 2 5
 
R2 1 3 0 2 −1 5
R1  0 1 1 1 1 
  4
,→  
R4  0 2 0 1 2  5
R3 1 3 3 3 0 10
 
R1 1 3 0 2 −1 5
R2  0 1 1 1 
1  4

,→  
2R2 − R3  0 0 2 1 0  3
−R1 + R4 0 0 3 1 1 5
 
R1 1 3 0 2 −1 5
R2  0 1 1 1 
1  4

,→  
R3  0 0 2 1 0  3
3R3 − 2R4 0 0 0 1 −2 −1
 
R1 − 2R4 1 3 0 0 3 7
R2 − R4  0 1 1 0 3  5
 
,→  
R3 − R4  0 0 2 0 2  4
R4 0 0 0 1 −2 −1
 
R1 1 3 0 0 3 7
2R2 − R3  0 2 0 0 4  6
 
,→  
R3  0 0 2 0 2  4
R4 0 0 0 1 −2 −1
 
2R1 − 3R2 2 0 0 0 −6 −4
R2  0 2 0 0 4  6
 
,→  
R3  0 0 2 0 2  4
R4 0 0 0 1 −2 −1
 
R1 /2 1 0 0 0 −3 −2
R2 /2  0 1 0 0 
2  3

,→  
R3 /2  0 0 1 0 1  2
R4 0 0 0 1 −2 −1

The solution set for (26) is


{x1 = −3, x2 = 2, x3 = 1, x4 = −2} .

Linear Systems Handout -11- Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

5 Exercises

Compute the following determinants


¯ ¯
¯ 1 −1 ¯¯
¯
1. ¯ ¯ Ans: 5
¯ 3 2 ¯
¯ ¯
¯ 1 −1 1 ¯¯
¯
¯
2. ¯ 2 0 1 ¯¯ Ans: 4
¯ ¯
¯ −1 3 0 ¯
¯ ¯
¯ 1 2 1 ¯
¯ ¯
¯ ¯
3. ¯ 0 3 5 ¯ Ans: 6
¯ ¯
¯ 2 1 −1 ¯

¯ ¯
¯ 1 −1 0 1 ¯
¯ ¯
¯ 0 2 −1 1 ¯
¯ ¯
4. ¯
¯
¯
¯
Ans: −11
¯ 1 3 2 0 ¯
¯ 1 0 1 −1 ¯

Solve the following systems using Cramer’s rule

x1 + 3x2 = 0
5. Ans: {x1 = 9, x2 = −3}
2x1 + 4x2 = 6

2x1 + x2 + x3 = 8
6. 4x1 + x2 = 11 Ans: {x1 = 2, x2 = 3, x3 = 1}
−2x1 + 2x2 + x3 = 3

Solve the following systems using Gauss-Jordan reduction

x1 + 3x2 = 0
7. Ans: {x1 = 9, x2 = −3}
2x1 + 4x2 = 6

2x1 + x2 + x3 = 8
8. 4x1 + x2 = 11 Ans: {x1 = 2, x2 = 3, x3 = 1}
−2x1 + 2x2 + x3 = 3

2x1 − x2 = 6
9. −x1 + 2x2 − x3 = 0 Ans: {x1 = 3, x2 = 0, x3 = −3}
−x2 + 2x3 = −6

3x2 + 3x3 + x4 = −2
½ ¾
2x1 + 4x2 + 2x4 = 3 1
10. Ans: x1 = , x2 = 0, x3 = −1, x4 = 1
2x1 + 7x2 + 9x3 + 7x4 = −1 2
6x3 + 5x4 = −1

Linear Systems Handout -12- Clarkson University


18.03: Differential Equations, Spring, 2006
Driving through the dashpot

The Mathlet Amplitude and Phase: Second order considers a spring/mass/dashpot


system driven through the spring. If y(t) denotes the displacement of the plunger at
the top of the spring, and x(t) denotes the position of the mass, arranged so that
x = y when the spring is at rest, then we found the second order LTI equation

mẍ + bẋ + kx = ky .

Now suppose instead that we fix the top of the spring and drive the system by
moving the bottom of the dashpot instead. Here’s a frequency response analysis
of this problem. This time I’ll keep m around, instead of setting it equal to 1 or
dividing through by it. A new Mathlet, Amplitude and Phase: Second Order,
II, illustrates this system with m = 1.
Suppose that the position of the bottom of the dashpot is given by y(t), and again
the mass is at x(t), now arranged so that x = 0 when the spring is relaxed. Then the
force on the mass is given by
d
x = −kx + b
m¨ (y − x)
dt
since the force exerted by a dashpot is supposed to be proportional to the speed of
the piston moving through it. This can be rewritten

mẍ + bẋ + kx = bẏ .

Suppose now that the motion is sinusoidal with circular frequency ω:

y = B cos(ωt) .

Then ẏ = −ωB sin(ωt) so our equation is

mẍ + bẋ + kx = −bωB sin(ωt) .

Since Re (ieiωt ) = − sin(ωt), this equation is the real part of

mz̈ + bż + kz = biωBeiωt .

The Exponential Response Formula gives


biω
zp = Beiωt
p(iω)
where
p(s) = ms2 + bs + k
is the characteristic polynomial. Thus the “transfer function” is
bs
W (s) =
p(s)
and the complex gain is

biω
W (iω) = .
p(iω)
so that
zp = W (iω)Beiωt .

Using the natural frequency ωn = k/m ,

p(iω) = m(iω)2 + biω + mωn2 = m(ωn2 − ω 2 ) + biω ,

so
biω
W (iω) = .
m(ωn2 − ω 2 ) + biω

We should certainly regard the “physical input signal” as B cos(ωt), so I want to


express the sinusoidal solution as

xp = gain · B cos(ωt − φ) .

This is what we get with


gain = |W (iω)|
and
−φ = Arg (W (iω)) .

Thus both the gain and the phase are displayed by the curve parametrized by
the complex valued function W (iω). To understand this curve, divide numerator and
denominator in the expression for W (iω) by biω:
�−1
i ωn2 − ω 2

W (iω) = 1 − .
b/m ω

As ω goes from 0 to ∞, (ωn2 − ω 2 )/ω goes from +∞ to −∞, so the expression inside
the brackets follows the vertical straight line in the complex plane with real part 1,
moving upwards. As z follows this line, 1/z follows a circle of radius 1/2 and center
1/2, traversed clockwise (exercise!). It crosses the real axis when ω = ωn .
This circle is the “Nyquist plot.” It shows that the gain starts small, grows to a
maximum value of 1 exactly when ω = ωn (in contrast to the spring­driven situation,
where the resonant peak is not exactly at ωn and can be either very large or non­
existent depending on the strength of the damping), and then falls back to zero. For
large ω, W (iω) is approximately −ib/mω, so the gain falls off like (b/m)ω −1 .
The Nyquist plot also shows that −φ = Arg (W (iω)) moves from near π/2 when
ω is small, through 0 when ω = ωn , to near −π/2 when ω is large.
And it shows that these two effects are linked to each other. Thus a narrow
resonant peak corresponds to a rapid sweep across the far edge of the circle, which in
turn corresponds to an abrupt phase transition from −φ near π/2 to −φ near −π/2.
MA 232 Differential Equations Fall 1999 Kevin Dempsey

Test I

Wednesday, September 29, 1999


SC 162, 360, 362
8:30—9:30 p.m.

Name Student # Signature

If your last name begins with letter You are in


A-E SC 162
F-L SC 362
M-Z SC 360

1
Please do not detach pages 2
Loose pages will NOT be graded 3
√ 4
Put a check mark next 5
to your recitation section Total

Section Day Period Time Room Leader
11 Monday 2 9—9:50 SC 386 Scott Gregowske
12 Monday 4 11—11:50 SC 386 Sovia Lau
13 Monday 4 11—11:50 SC 342 Chiu Wah Cheng
14 Monday 7 3—3:50 Rowley 150 Chaya Tuok
15 Monday 8 4—4:50 SC 303 Phillip Allen
16 Tuesday 1 8—8:50 SC 356 Elizabeth Baker
17 Tuesday 5 1—1:50 SC 344 Tom Pearsall
18 Tuesday 7 3—3:50 SC 344 Wesley Kent
19 Tuesday 8 4—4:50 SC 305 Ed Landry

Test I Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

1 (20 pts)

Answer T (True) of F (False) to the following ten questions

dy
(i) The differential equation + x100 y = 0 is linear T
dx

2
dy
(ii) The differential equation + 4y = sin x is nonlinear F
dx 2

2 2
∂u ∂u
(iii) − = 0 is a partial differential equation T
∂t 2 ∂x 2

dy
(iv) If + xy = 2 and y(1) = 3, then y 0 (1) = 0 F
dx

dy 2
(v) The differential equation = ey sin2 y is autonomous T
dt

1 dp
(vi) The line p = is an isocline of the differential equation = p(1 − p) T
2 dt

(vii) If the Wronskian W [y1 , y2 ](x) of two functions y1 (x) and y2 (x) is identically zero on an
interval (a, b) then the two functions are linearly dependent on that interval F

(viii) If the two functions y1 (x) and y2 (x) are solutions of the second-order variable-coefficient
ordinary differential equation y 00 +p(x)y 0 +q(x)y = 0 on an interval (a, b), then the set {y1 , y2 }
is a fundamental solution set on (a, b) F

dy y+1
(ix) y(t) = t and y(t) = 2t + 1 are both solutions of = T
dt t+1

(x) y 00 − 4y 0 + 13y − 9 = 0 is a homogeneous second-order differential equation F

Test I Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

2 (20 pts)

(a)(10 pts) Solve the separable differentiable equation

dy y
=
dt 1 + y2

Ans
1 + y2
dy = dt
y
Z Ã ! Z
1
+ y dy = dt
y
y2
ln |y| + = t+C
2

(b)(10 pts) Evaluate the determinant


¯ ¯
¯ 1 2 −3 ¯¯
¯
¯
¯ 4 −1 2 ¯¯
¯ ¯
¯ 0 3 1 ¯

Ans ¯ ¯ ¯ ¯ ¯ ¯
¯ −1 2 ¯¯ ¯ 4 2 ¯ ¯ 4 −1 ¯¯
= 1 ¯¯ ¯
¯ −2¯
¯ ¯
¯ −3¯ ¯
¯ 3 1 ¯ ¯ 0 1 ¯ ¯ 0 3 ¯
= 1(−1 − 6) − 2(4 − 0) − 3(12 − 0)

= −7 − 8 − 36

= −51

Test I Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

3 (20 pts)

Solve the initial value problem


dy 3y
+ + 2 = 3x
dx x
y(1) = 1

Ans
dy 3
+ y = 3x − 2
dx x
R 3
(3/x)dx
µ(x) = e = e3 ln |x| = eln |x| = |x|3
(
x3 , x≥0
=
−x3 , x<0
Take µ(x) = x3 (since the sign cancels)
½Z ¾
1
y(x) = x3 (3x − 2) dx + C
x3
½Z ¾
1 4 3
= (3x − 2x ) dx + C
x3
µ ¶
1 3 5 1 4
= x − x +C
x3 5 2
3 2 x C
= x − + 3
5 2 x
3 1 C 9
y(1) = − + → C=
5 2 1 10
3 2 x 9
y(x) = x − + x−3
5 2 10

Test I Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

4 (20 pts)

Solve the linear system


x1 − x2 + x3 = −2
−x1 + 3x2 − x3 = 3
−x1 + x2 + 5x3 = 1
using Gauss-Jordan reduction (it is imperative that you include the check column and refrain
from working with fractions until the last step). Be sure to state what your solution is.

Ans
 
1 −1 1 −2 −1
 
 −1 3 −1 3  4
−1 1 5 1 6
 
R1 1 −1 1 −2 −1
 
,→ R1 + R2  0 2 0 1  3
R1 + R3 0 0 6 −1 5
 
6R1 − R3 6 −6 0 −11 −11
 
,→ R2  0 2 0 1  3
R3 0 0 6 −1 5
 
R1 + 3R2 6 0 0 −8 −2
,→ R2 
 0 2 0 1 
 3
R3 0 0 6 −1 5
 
R1 /6 1 0 0 −4/3 −1/3
 
,→ R2 /2  0 1 0 1/2  3/2
R3 /6 0 0 1 −1/6 5/6

The solution set is ½ ¾


4 1 1
x1 = − , x2 = , x3 = −
3 2 6

Test I Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

5 (20 pts)

Does the set {x, x2 , x3 , x4 } contain a fundamental solution set for the differential equation

x2 y 00 − 4xy 0 + 6y = 0

If it does, on what interval(s)?

Ans
Let Ly = x2 y 00 − 4xy 0 + 6y

L(x) = x2 (0) − 4x(1) + 6(x) = 2x 6= 0



L(x2 ) = x2 (2) − 4x(2x) + 6(x2 ) = 0

L(x3 ) = x2 (6x) − 4x(3x2 ) + 6(x3 ) = 0

L(x4 ) = x2 (12x2 ) − 4x(4x3 ) + 6(x4 ) = 2x4 6= 0

y1 (x) = x2 and y2 (x) = x3 are solutions of Ly = 0

The Wronskian W [y1 , y2 ](x) of these two functions is


¯ ¯
¯ x2 x3 ¯
¯ ¯
W [y1 , y2 ](x) =
¯ ¯ = 3x4 − 2x4 = x4
¯ 2x 3x2 ¯

Since x4 6= 0 on (−∞, 0) and (0, +∞), {x2 , x3 } is a fundamental solution set for the given
ODE on the intervals (−∞, 0) and (0, +∞).

Test I Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Test II

Wednesday, October 27, 1999


SC 162, 360, 362
8:30—9:30 p.m.

Name Student # Signature

If your last name begins with letter You are in


A-E SC 162
F-L SC 362
M-Z SC 360

1
Please do not detach pages 2
Loose pages will NOT be graded 3
√ 4
Put a check mark next 5
to your recitation section Total

Section Day Period Time Room Leader
11 Monday 2 9—9:50 SC 386 Scott Gregowske
12 Monday 4 11—11:50 SC 386 Sovia Lau
13 Monday 4 11—11:50 SC 342 Chiu Wah Cheng
14 Monday 7 3—3:50 Rowley 150 Chaya Tuok
15 Monday 8 4—4:50 SC 303 Phillip Allen
16 Tuesday 1 8—8:50 SC 356 Elizabeth Baker
17 Tuesday 5 1—1:50 SC 344 Tom Pearsall
18 Tuesday 7 3—3:50 SC 344 Wesley Kent
19 Tuesday 8 4—4:50 SC 305 Ed Landry

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

1 (20 pts)

(a)(3 pts) Does the complex number −i lie on the unit circle? (The unit circle is the circle
of radius 1 centered at the origin.)

Ans | − i| = 1 so yes, −i does lie on the unit circle

(b)(3 pts) What does the Fundamental Theorem of Algebra say about the complex polyno-
mial z 5 + i = 0?

Ans Since z 5 + i = 0 is fifth-order polynomial, it has five complex roots

(c)(3 pts) Is −i a root of z 5 + i = 0? (i.e. Is (−i)5 + i = 0?) Justify your answer.

Ans Yes

(−i)5 = (−i)2 (−i)2 (−i) = (−1)(−1)(−i) = −i


or (−i)5 = (ei3π/2 )5 = ei15π/2 = ei[6(2π)+3π/2] = ei3π/2
−i 1 0 0 0 0 i
2 2
or 0 −i i i −i −i z 5 + i = (z + i)(z 4 − iz 3 − z 2 + iz + 1)
1 −i −1 i 1 0

(d)(8 pts) Find the fifth roots of −i (i.e. Completely solve z 5 + i = 0)

Ans
z5 + i = 0

z 5 = r5 ei5θ = −i = ei(3π/2+n2π) , n = 0, 1, 2, . . .

r=1

5θ = + n2π
2
3π 2π
θ= +n
10 5
3π 7π 11π 15π 19π
= , , , ,
10 10 10 10 10
3π 7π 11π 3π 19π
= , , , ,
10 10 10 2 10

(e)(3 pts) Do the roots in (d) all lie on the unit circle?

Ans Yes, since |eiθ | = 1 for any angle θ

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

2 (20 pts)

Solve the initial value problem

y 00 + 4y 0 + 13y = 0
y(0) = −1
y 0 (0) = 1

Ans
Substituting y = erx gives the auxiliary equation r2 + 4r + 13 = 0 which has roots r =
−2 ± 3i so the fundamental solution set for the given homogeneous differential equation is
{e−2x cos 3x, e−2x sin 3x} and a general solution of the equation is therefore

y = c1 e−2x cos 3x + c2 e−2x sin 3x

where the constants c1 and c2 are arbitrary. We have to find the the values of c1 and c2 so
that the solution passes through the point (0, −1) with a slope of 1.

y = c1 e−2x cos 3x + c2 e−2x sin 3x

y 0 = (−2c1 e−2x cos 3x − 3c1 e−2x sin 3x) + (−2c2 e−2x sin 3x + 3c2 e−2x cos 3x)

= (−2c1 + 3c2 )e−2x cos 3x − (3c1 − 2c2 )e−2x sin 3x

y(0) = c1 = −1
1
y 0 (0) = −2c1 + 3c2 = 1 → c2 = −
3
1
y = −e−2x cos 3x − e−2x sin 3x
3

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

3 (20 pts)

Find a particular solution of

y 00 + 2y 0 + y = x2 e−x + xe−x + e−x

using the method of undetermined coefficients (not just the form of the particular solution,
you have to explicitly determine the constants).

Ans
Substituting y = erx into the corresponding homogeneous differential equation y 00 +2y 0 +y = 0
gives the auxiliary equation r2 + 2r + 1 = (r + 1)2 = 0 which has repeated roots r = −1, −1
so the fundamental solution set for the homogeneous equation is {e−x , xe−x }. Now the RHS
of the given nonhomogeneous equation is (x2 + x + 1)e−x which in Table 4.1 on Page 197 of
the text is Type (IV) so the particular solution form is

yp = x2 (Ax2 + Bx + C)e−x

Multiplying both sides by ex


yp ex = Ax4 + Bx3 + Cx2
and then implicitly differentiating twice gives

yp0 ex + yp ex = 4Ax3 + 3Bx2 + 2Cx

(yp00 ex + yp0 ex ) + (yp0 ex + yp ex) = 12Ax2 + 6Bx + 2C

(yp00 + 2yp0 + yp )ex = 12Ax2 + 6Bx + 2C

yp00 + 2yp + yp = (12Ax2 + 6Bx2 + 2C)e−x


1
A=
12
1
B=
6
1
C =
2
µ ¶
2 1 2 1 1 −x
yp = x x + x+ e
12 6 2

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

4 (20 pts)

Find a general solution of the differential equation

y 00 + y = sec θ

using the method of variation of parameters.

Ans
Substituting y = erθ into the corresponding homogeneous equation y 00 + y = 0 gives the
auxiliary equation r2 + 1 = 0 which has roots r = ±i so the fundamental solution set for
the homogeneous equation is {y1 , y2 } = {cos θ, sin θ}. The Wronskian of the fundamental
solutions is ¯ ¯
¯ cos θ sin θ ¯¯
¯
W [y1 , y2 ](θ) = ¯¯ ¯ = cos2 θ + sin2 θ = 1
− sin θ cos θ ¯
Now the method of variation of parameters gives
Z
−gy2 Z (− sec θ)(sin θ) Z
v1 = = dθ = − tan θ dθ = ln | cos θ| + C1
W 1
Z Z Z
gy1 (sec θ)(cos θ)
v2 = = dθ = 1 dθ = θ + C2
W 1
yp = v1 y1 + v2 y2

= cos θ ln | cos θ| + θ sin θ

Hence a general solution of y 00 + y = sec θ is

y = c1 cos θ + c2 sin θ + cos θ ln | cos θ| + θ sin θ

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

5 (20 pts)

Use the elimination method to find a general solution of the first-order linear syatem

x0 + y = sin t
−x + y 0 = sin t

Ans
d
In operator notation with D ≡ the given system is
dt
D[x] + y = sin t
−x + D[y] = sin t

In order to eliminate y, operate on the first equation by D to give

D2 [x] + D[y] = cos t


−x + D[y] = sin t

Now subtract the second equation from the first to give

D2 [x] + x (= x00 + x) = cos t − sin t

From Table 4.1 the RHS of this equation is Type (III) and, because the fundamental solution
set for the corresponding homogeneous equation x00 + x = 0 is {cos t, sin t}, the particular
solution form is
xp = tf where f = A cos t + B sin t
Use the method of undetermined coefficients to find the constants A and B
xp = tf

x0p = f + tf 0

x00p = f 0 + f 0 + tf 00 = 2f 0 − tf = 2f 0 − xp

x00p + xp = 2f 0 = 2(−A sin t + B cos t)


1
A=B=
2
1
xp = t(cos t + sin t)
2
Hence a general solution for x is
1
x = c1 cos t + c2 sin t + t(cos t + sin t)
2

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

A general solution for y follows immediately from

y = −x0 + sin t
n o
= − −c1 sin t + c2 cos t + 12 (cos t + sin t) + 12 t(− sin t + cos t) + sin t
µ ¶ µ ¶
1 1 1
= c1 + sin t − c2 + cos t + t(sin t − cos t)
2 2 2

If x is eliminated the general solution obtained for y is


1
y = a1 cos t + a2 sin t + t(sin t − cos t)
2
and the general solution for x that follows is

x = y 0 − sin t
µ ¶ µ ¶
1 1 1
= a2 − cos t − a1 + sin t + t(cos t + sin t)
2 2 2

Test II Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Test III

Wednesday, December 1, 1999


SC 162, 360, 362
8:30—9:30 p.m.

Name Student # Signature

If your last name begins with letter You are in


A-E SC 162
F-L SC 362
M-Z SC 360

1
Please do not detach pages 2
Loose pages will NOT be graded 3
√ 4
Put a check mark next 5
to your recitation section Total

Section Day Period Time Room Leader
11 Monday 2 9—9:50 SC 386 Scott Gregowske
12 Monday 4 11—11:50 SC 386 Sovia Lau
13 Monday 4 11—11:50 SC 342 Chiu Wah Cheng
14 Monday 7 3—3:50 Rowley 150 Chaya Tuok
15 Monday 8 4—4:50 SC 303 Phillip Allen
16 Tuesday 1 8—8:50 SC 356 Elizabeth Baker
17 Tuesday 5 1—1:50 SC 344 Tom Pearsall
18 Tuesday 7 3—3:50 SC 344 Wesley Kent
19 Tuesday 8 4—4:50 SC 305 Ed Landry

Test III Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

1a (10 pts)

A mass is attached to a spring suspended from a high ceiling, thereby stretching the spring
a certain distance on coming to rest at equilibrium. When the mass is given an initial
displacement and an initial velocity, the equation of simple harmonic motion of the mass is
µ ¶
π
x(t) = 1.1 sin 7t −
4
[This equation assumes that x(t) is positive upwards; x(t) is the displacement in meters of
the mass above the equilibrium position t seconds after the motion begins.]

(a)(2 pts) What was the initial displacement (direction and magnitude) of the mass? Explain
your answer in words too.

Ans

x(0) = 1.1 sin(−π/4) = −1.1/ 2 = −0.778 m
The mass was displaced 0.778 m downwards.

(b)(2 pts) What was the initial velocity (direction and magnitude) of the mass? Explain
your answer in words too.

Ans
x0 (t) = 7.7 cos(7t − π/4)

x0 (0) = 7.7 cos(−π/4) = 7.7/ 2 = 5.444m/sec
The spring was given an upwards velocity of 5.444 m/sec

(c)(6 pts) When will the mass first pass through the equilibrium position in a downwards
direction?

Ans
When the mass first goes through the equilibrium position x(t) = 1.1 sin(7t − π/4) = 0 and
7t − π/4 = 0 but at this time x0 (t) = 7.7 m/sec (upwards!). The next time the mass goes
through the equilibrium position x(t) = 1.1 sin(7t − π/4) = 0 and 7t − π/4 = π at which
time x0 (t) = −7.7 m/sec (downwards). Hence the first time that the mass passes downwards
through the equilibrium position is given by t = 5π/28 = 0.561 seconds.

Test III Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

1b (10 pts)
1 − 3i
Express the complex number in polar form.
2+i
Ans

1 − 3i 10 eiθ1 √
= √ iθ = 2 ei(θ1 −θ2 )
2+i 5e 2
1 3
cos θ1 = √ , sin θ1 = − √
10 10
θ1 = tan−1 (tan θ1 ) = tan−1 (−3) = −1.25 rad (= −0.40π = −71.57◦ )
2 1
cos θ2 = √ , sin θ2 = √
5 5
θ2 = tan−1 (tan θ2 ) = tan−1 (1/2) = 0.46 rad (= 0.15π = 26.57◦ )

1 − 3i 10 e−1.25i √ √ √ √
= √ 0.46i = 2 e−1.71i = 2 ei 4.57 (= 2 e−i0.55π = 2 ei1.45π )
2+i 5e

Ans
1 − 3i 1 − 3i 2 − i 2 − i − 6i + 3i2 −1 − 7i 1 7 √
= · = 2
= = − − i = 2 eiθ
2+i 2+i 2−i 4−i 5 5 5
1 7
cos θ = − √ , sin θ = − √
5 2 5 2
θ = tan−1 (tan θ) + π = tan−1 (7) + π = 1.43 + π = 4.57 rad (= 1.45π = 261.87◦ )
1 − 3i √ i 4.57 √ i1.45π
= 2e = 2e
2+i

Test III Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

2 (20 pts)
Z ∞
Find the Laplace Transform F (s) = L{f (t)} (s) = e−st f (t) dt of
0
(
1 0<t<3
f (t) =
e2t 3<t

being careful to state the domain of F .

Ans
Z 3 Z ∞
F (s) = e−st · 1 dt + e−st e2t dt
0 3

#3 " #N
e−st e−(s−2)t
= + lim
−s 0
N→∞ −(s − 2) 3

µ ¶
e−3s 1 e−(s−2)N e−(s−2)3
= − + lim −
−s −s N→∞ −(s − 2) −(s − 2)

1 e−3s e6−3s
= − + (s > 2)
s s s−2
Note that F (2) DNE.
Z ∞ Z 3 Z ∞ Z 3 Z N
−2t −2t −2t 2t −2t
F (2) = e f (t) dt = e · 1 dt + e · e dt = e dt + lim 1 dt
0 0 3 0 N→∞ 3

Since the limit does not converge, F is not defined at s = 2.

Test III Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

3 (20 pts)

Find the Laplace Transform of


t sin 3t sin 5t

Ans

Let f (t) = sin 3t sin 5t


1
= [cos(3t − 5t) − cos(3t + 5t)]
2
1
= (cos 2t − cos 8t)
2
µ ¶
1 s s
F (s) = L{f (t)} = −
2 s2 + 4 s2 + 64
d s (1)(s2 + b2 ) − (s)(2s) s2 − b2
− = − =
ds s2 + b2 (s2 + b2 )2 (s2 + b2 )2
dF
L{t sin 3t sin 5t} = L{tf(t} (s) = −
ds
" #
1 s2 − 4 s2 − 64
= −
2 (s2 + 4)2 (s2 + 64)2

Test III Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

4 (20 pts)

Find Y (s) = L{y(t)} (s) if y(t) satisfies the initial-value problem

y 00 + 3y 0 + 5y = cos 3t
y(0) = −1
y 0 (0) = 2

Ans
h i s
s2 Y (s) − sy(0) − y 0 (0) + 3 [sY (s) − y(0)] + 5Y (s) =
s2 +9
h i s
s2 Y (s) − s(−1) − 2 + 3 [sY (s) − (−1)] + 5Y (s) =
s2 +9
s
(s2 + 3s + 5)Y (s) + s − 2 + 3 =
s2 +9
s
(s2 + 3s + 5)Y (s) = −s−1
s2 +9

s − (s + 1)(s2 + 9)
=
s2 + 9

s − [s3 + 9s + s2 + 9]
=
s2 + 9

s3 + s2 + 8s + 9
Y (s) = − 2
(s + 3s + 5)(s2 + 9)

Test III Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

5 (20 pts)

Find the Inverse Laplace Transform of

2s2 − 3s + 13
(s2 − 2s + 5)(s + 3)

Ans

2s2 − 3s + 13 A(s − 1) + B(2) C


2
= 2 2
+
(s − 2s + 5)(s + 3) (s − 1) + 2 s+3
h i
2s2 − 3s + 13 = [A(s − 1) + B(2)] (s + 3) + C (s − 1)2 + 22
h i
s = −3 → 18 + 9 + 13 = 0 + C (−4)2 + 4 → C =2

1
s=1 → 2 − 3 + 13 = [0 + B(2)] (4) + (2) [0 + 4] → B= 2

s=0 → 13 = [−A + 1] (3) + 2[1 + 4] → A=0

2s2 − 3s + 13 1 2 2
2
= 2 2
+
(s − 2s + 5)(s + 3) 2 (s − 1) + 2 s+3
( ) ( ) ½ ¾
−1 2s2 − 3s + 13 1 2 2
L = L−1 −1
+L
(s2 − 2s + 5)(s + 3) 2 (s − 1)2 + 22 s+3

1
= et sin 2t + 2e−3t
2

Test III Clarkson University


MA232 Differential Equations Spring 1999

TEST I

Wednesday, February 17, 1999


8:30-9:30 p.m.
SC 360 & SC 362

Please show your working, use correct notation, and check to see that you have
indeed answered the question.

Wherever possible, check your answer.

Three blank pages are provided for additional workspace; please DO NOT
hand in loose pages, they WILL NOT be graded.

Feel free to use both sides of each page.

The last page is a formula sheet.

Problem Score
1
2
3
4
5
Total

Name Student ID # Signature


1 (20 pts)
Consider the first-order nonlinear separable ODE
dy
+ y 2 sin x = 0
dx
(a) What solution can you see immediately?
(b) Solve the ODE for the general solution.

Solution
(a)(5 pts)
y ≡ 0 clearly satisfies the ODE and therefore is a solution.

(b)(15 pts)
If y ≠ 0 , the variables x and y can be separated and the ODE can be written
as the equality of two differentials as
dy
− = sin x dx
y2
Integrating both sides of this equation gives
dy
∫− y 2
= ∫ sin x dx

1
= − cos x + C
y
Hence, the general solution for y not identically zero is
y −1 + cos x = C

Name Student ID # Signature


2 (20 pts)
A tank whose volume is 40 L initially contains 20 L of water. A solution
containing 10 g/L of salt flows into the tank at a rate of 4 L/min, and the well-
stirred mixture flows out at a rate of 2 L/min. How much salt is in the tank just
before the tank overflows?

Solution
Let t be the time in minutes [min] after the salt solution begins to flow, and let
x (t ) represent the amount of salt in the tank at time t . Then
dx  g  L   x (t ) g  L  x
= 10  4 −  2  = 40 −
dt  L  min   20 + 2t L  min  10 + t
dx
In the standard form + P(t ) x = Q , this equation is
dt
dx 1
+ x = 40
{ K (*)
dt 10 12+3t Q(t )
P(t )

1 1
wherein P(t ) = and Q (t ) = 40 . Now ∫ P(t ) dt = ∫ dt = ln (10 + t ) so the
10 + t 10 + t
integrating factor µ (t ) = e ∫
P ( t ) dt
= e ln (10+t ) = 10 + t , and the general solution of
(*) is
x (t ) =
1
µ (t )
{∫ µ (t )Q(t ) dt + C}= 101+ t {∫ 40(10 + t ) dt + C}
=
1
10 + t
{20(10 + t ) 2 + C}
C
= 20(10 + t ) +
10 + t
Now at time zero there is no salt in the tank so
C
x (0) = 200 +
= 0 → C = −2000
10
Thus the amount of salt in the tank at any time t is given by
2000
x (t ) = 20(10 + t ) −
10 + t
After 10 minutes, as the tank is about to overflow, the amount of salt in the
tank is

2000
x (10) = 400 − = 400 − 100 = 300 g .
20
Alternatively, one might do the integration above differently as per

Name Student ID # Signature


x (t ) =
1
µ (t )
{∫ µ (t )Q(t ) dt + C}= 101+ t {∫ 40(10 + t ) dt + C}
=
1
10 + t
{400t + 20t 2 + C }

1
x (0) = {0 + 0 + C} = C = 0 → C = 0
10 + 0 10
2
400t + 20t
x (t ) =
10 + t
4000 + 2000
x (10) = = 300 g
20

Name Student ID # Signature


3 (20 pts)
Solve the linear system shown here on the 3x1 − 2 x2 + 2 x3 = 9
right by performing elementary row operations x1 − 2 x2 + x3 = 5
on the augmented matrix. 2 x1 − x2 − 2 x3 = −1

Solution
3 − 2 2 9
 
1 − 2 1 5
2 −1 − 2 − 1

R2 1 − 2 1 5
 
→ R1 3 − 2 2 9
R3 2 −1 − 2 − 1

R1 1 − 2 1 5 
 
→ R2 − 3R1 0 − 4 −1 −6 
R3 − 2 R1 0 3 − 4 − 11

R1 1 − 2 1 5 
 
→ R2 0 4 −1 − 6
3R 2 − 4 R 3  0 0 13 26 

R1 1 − 2 1 5 
 
→ R2 0 4 −1 − 6
R3 / 2  0 0 1 2 
R1 − R3 1 − 2 0 3 
 
→ R2 + R3 0 4 0 − 4
R3 0 0 1 2 

R1 1 − 2 0 3
 
→ R2 / 4  0 1 0 − 1
R3 0 0 1 2 

R1 + 2 R2 1 0 0 1
 
→ R2 0 1 0 − 1
R3 0 0 1 2 

Name Student ID # Signature


4 (20 pts)
(a) Determine the largest interval on which the initial value problem
d2y dy
(t − 1) 2
− 3t + 4 y = sin t , y ( −2) = 2, y ′( −2) = 1
dt dt
is certain to have a unique solution. Do not attempt to find the solution.
(b) Show that the differential operator L defined by
L( y ) = y ′′ + y 2
is nonlinear (i.e. not linear).

Solution
(a)(13 pts)
d2y dy
Writing the ODE in the standard form 2
+ p (t ) + q(t ) y = g (t ) of Theorem 2
dt dt
(Page 157) gives (for t away from 1)
d2y 3t dy 4 sin t
2
− + y=
dt t − 1 dt t − 1 t −1
so by comparison
3t 4 sin t
p( t ) = −
, q(t ) = , g (t ) =
t −1 t −1 t −1
These functions are continuous on (−∞,1) and (1,+∞) , but by Theorem 2, in
order to guarantee existence and uniqueness, the initial point x 0 = −2 has to be
in the interval in question. Hence, the largest interval on which the given initial
value problem is guaranteed to have a unique solution is ( −∞,1) = {x : −∞ < x < 1} .

(b) (7 pts)
L( y1 + y 2 ) = ( y1 + y 2 )′′ + ( y1 + y 2 ) 2
= y1′′ + y 2′′ + y12 + 2 y1 y 2 + y 22 = L( y1 ) + L( y 2 ) + 2 y1 y 2 ≠ L( y1 ) + L( y 2 )
L(cy ) = ( cy )′′ + ( cy ) 2 = cy ′′ + c 2 y 2 ≠ cL( y )

Name Student ID # Signature


5 (20 pts)
(a) Show that the two functions y1 ( x ) = e 2 x and y 2 ( x ) = e 3 x are linearly
independent solutions of the linear second-order constant coefficient ODE
d2y dy
2
− 5 + 6y = 0 K (*)
dx dx
on the whole real line ( −∞, ∞) = {x : −∞ < x < ∞} .
(b) Find a general solution to (*).
(c) Find the solution that satisfies the initial conditions
y (0) = −1, y ′(0) = −4
Solution
(a)(10 pts)
d2y dy
Let L( y ) = 2
− 5 + 6 y , then
dt dt
d 2 y1 dy
L( y1 ) = 2
− 5 1 + 6 y1 = ( 4e 2 x ) − 5( 2e 2 x ) + 6( e 2 x ) = 0
dt dt
2
d y2 dy
L( y 2 ) = 2
− 5 2 + 6 y 2 = (9e 3 x ) − 5(3e 3 x ) + 6( e 3 x ) = 0
dt dt
so the two given functions are solutions to (*). The associated Wronskian
function is
e2x e3x
W ( x) = 2 x 3x
= 3e 5 x − 2e 5 x = e 5 x
2e 3e
Since W ( x ) ≠ 0 on ( −∞, ∞) , y1 ( x ) = e 2 x and y 2 ( x ) = e 3 x are linearly independent
solutions of (*) on ( −∞, ∞) .

(b)(5 pts)
Also by virtue of the same Wronskian result, the { y1 , y 2 } is a fundamental
solution set on ( −∞, ∞) and therefore it is immediately true that
y ( x ) = c1e 2 x + c 2 e 3 x
wherein c1 and c2 are arbitrary constants, is a general solution of (*).

(c)(5 pts)
y ( x ) = c1e 2 x + c2 e 3 x
y ′( x ) = 2c1e 2 x + 3c2 e 3 x
y (0) = c1 + c2 = −1
y ′(0) = 2c1 + 3c2 = −4
c1 = 1 → c2 = −2
y ( x ) = e 2 x − 2e 3 x

Name Student ID # Signature


MA232 Differential Equations Spring 1999

Test II
Wednesday, March 24, 1999
8:30—9:30 p.m.
SC 360 & 362

Name
Student ID#
Signature

Please show your work carefully and legibly.


The graders will assign credit for correct working.

Problem Score
1
2
3
4
5
Total

Period Recitation Day-Time-Room Instructor Check One


1 MA232-11 Mon 8-8:50 a.m. in SC 340 Tom Masser
2 MA232-12 Mon 9-9:50 a.m. in SC 342 Wesley Kent
8 MA232-13 Mon 4-4:50 p.m. in SC 342 Patrick Chan
1 MA232-21 Tues 8-8:50 a.m. in SC 344 Lisa Meeker
3 MA232-22 Tues 10-10:50 a.m. in SC 344 Sean Dorey
4 MA232-23 Tues 11-11:50 a.m. in SC 346 Sean Dorey
8 MA232-24 Tues 4-4:50 p.m. in SC 346 Kathy Christman
Problem 1 (20 pts) Student ID #

Use synthetic division to find a general solution of the third order constant coefficient dif-
ferential equation
y 000 − 5y 00 + 8y 0 − 6y = 0.

Solution

The auxiliary equation is r3 − 5r2 + 8r − 6 = 0; synthetic division for the factor (r − 3) gives

3 1 -5 8 -6
0 3 -6 6
1 -2 2 0

indicating that the cubic factorizes to (r − 3)(r2 − 2r + 2) = 0, so the roots of the auxiliary
equation are r = 1 ± i, 3, and a general solution of the third order differential equation is

y(x) = c1 ex cos x + c2 ex sin x + c3 e3x .


Problem 2 (20 pts) Student ID #

(a)(4 pts) Show that {e2x , xe2x } is a fundamental solution set for the homogeneous second
order constant coefficient differential equation

y 00 − 4y 0 + 4y = 0.

(b)(16 pts) Using Table 4.1 (see the Formula Sheet), determine the form of a particular
solution yp (x) for the nonhomogeneous second order constant coefficient differential equation

y 00 − 4y 0 + 4y = g(x),

for

(i) g(x) = 3 cos 2x, (ii) g(x) = x2 sin 2x, (iii) g(x) = e3x , (iv) g(x) = x2 e2x − e2x .

Solution

(a) y 00 − 4y 0 + 4y = 0 has the auxiliary equation r2 − 4r + 4 = (r − 2)2 = 0 which has the


repeated root r = 2, 2, so the fundamental solution set is {y1 = e2x , y2 = xe2x }. The linear
independence of y1 , y2 on (−∞, ∞) is demonstrated by noting that the Wronskian
¯ ¯
¯ ¯
¯ e2x xe2x ¯
¯ ¯
W [y1 , y2 ](x) = ¯
¯
¯ = e4x + 2xe4x − 2xe4x = e4x 6= 0 on (−∞, ∞).
2x 2x 2x ¯
¯ 2e e + x2e ¯

(b.i) yp (x) = A cos 2x + B sin 2x

(b.ii) yp (x) = (Ax2 + Bx + C) cos 2x + (Dx2 + Ex + F ) sin 2x

(b.iii) yp (x) = Ae3x

(b.iv) yp (x) = x2 (Ax2 + Bx + C)e2x

In fact, actual particular solutions are


(b.i) yp (x) = − 38 sin 2x
³ ´ ³ ´
1 2
(b.ii) yp (x) = 8
x + 18 x cos 2x + − 18 x − 3
32
sin 2x

(b.iii) yp (x) = e3x


³ ´
1 2 1
(b.iv) yp (x) = x2 12
x − 2
e2x
Problem 3 (20 pts) Student ID #

(a)(10 pts) Find a particular solution yp (x) of the nonhomogeneous second order constant
coefficient differential equation

y 00 − 2y 0 + y = x2 + 1

using the method of undetermined coefficients.


(b)(10 pts) Find a particular solution yp (x) of the the nonhomogeneous second order constant
coefficient differential equation

y 00 − 2y 0 + y = x−2 ex + x2 + 1

using the method of variation of parameters.


Solution

(a)

yp (x) = Ax2 + Bx + C
yp0 (x) = 2Ax + B
yp00 (x) = 2A
yp00 − 2yp0 + yp = 2A − 2(2Ax + B) + Ax2 + Bx + C
= Ax2 + (B − 4A)x + (2A − 2B + C) = x2 + 1
A = 1
B − 4A = 0 → B=4
2A − 2B + C = 1 → C =7
yp (x) = x2 + 4x + 7

(b) By linearity and the principle of superposition we need only find a particular solution
for y 00 − 2y 0 + y = x−2 ex using the method of variation of parameters and then add the result
obtained in part (a). The homogeneous ODE y 00 − 2y 0 + y = 0 has the auxiliary equation
r2 − 2r + 1 = (r − 1)2 = 0 so the fundamental solution set is {y1 , y2 } = {ex , xex }. The
Wronskian W [y1 , y2 ](x) = e2x as can be readily verified. Thus
Z Z
−x−2 ex · xex
v1 (x) = dx = −x−1 dx = − ln |x|
e2x
Z −2 x x Z
x e ·e 1
v2 (x) = 2x
dx = x−2 dx = −
e x
x 1 x x
yp (x) = (− ln |x|)e + (− )(xe ) = −e (1 + ln |x|)
x
yp (x) = −ex ln |x|

The last equation holds because ex satisfies the homogeneous equation. Hence, a particular
solution for x > 0 is
yp (x) = −ex ln x + x2 + 4x + 7
while for x < 0 it is
yp (x) = −ex ln(−x) + x2 + 4x + 7
Problem 4 (20 pts) Student ID #

Use the elimination method to find a general solution for the first order linear system
dx
− y = t2 ,
dt
dy
x+ = 1.
dt
.
Solution

In operator notation, the system is (with D ≡ d/dt)

D[x] − y = t2
x + D[y] = 1

Operating on the first equation by D gives

D2 [x] − D[y] = 2t
x + D[y] = 1

Adding the two equations eliminates y(t);

D2 [x] + x = x00 + x = 2t + 1.

The general solution of this equation is

x(t) = c1 cos x + c2 sin x + 2t + 1.

The first equation of the original system gives then


dx
y(t) = − t2 = −c1 sin x + c2 cos x + 2 − t2 .
dt
Problem 5 (20 pts) Student ID #

A mass of 4 kg is attached to a spring hanging from a ceiling, thereby stretching the spring
9.8 cm on coming to rest at equilibrium. The mass is then lifted up 10 cm above the
equilibrium point and given a downward velocity of 1 m/sec. Determine the equation for
the simple harmonic motion of the mass. When will the mass first reach its minimum height
after being set in motion.
Solution

Hooke’s law gives the spring constant;


9.8
mg = k` → (4)(9.8) = k → k = 400,
100
and the equation of motion is

mẍ + kx = 4ẍ + 400x = 4(ẍ + 100x) = 0,

the general solution of which is

x(t) = c1 cos 10t + c2 sin 10t


= A sin(10t + φ)
ẋ(t) = 10A cos(10t + φ)
1
A sin φ = x(0) = −
10
ẋ(0) 1
A cos φ = =
10 10
π
φ = −
4
π
x(t) = A sin(10t − )
4
x(t) = A
π
→ sin(10t − ) = 1
4
π π
→ (10t − ) =
4 2

→ t = = 0.236 sec
40
MA232 Differential Equations Spring 1999

Test III
Wednesday, April 21, 1999
8:30—9:30 p.m.
SC 360 & 362

Name
Student ID#
Signature

Please show your work carefully and legibly.


The graders will assign credit for correct working.

Problem Score
1
2
3
4
5
Total

Period Recitation Day-Time-Room Instructor Check One


1 MA232-11 Mon 8-8:50 a.m. in SC 340 Tom Masser
2 MA232-12 Mon 9-9:50 a.m. in SC 342 Wesley Kent
8 MA232-13 Mon 4-4:50 p.m. in SC 342 Patrick Chan
1 MA232-21 Tues 8-8:50 a.m. in SC 344 Lisa Meeker
3 MA232-22 Tues 10-10:50 a.m. in SC 344 Sean Dorey
4 MA232-23 Tues 11-11:50 a.m. in SC 346 Sean Dorey
8 MA232-24 Tues 4-4:50 p.m. in SC 346 Kathy Christman
Problem 1 (20 pts) Student ID #

A linear homogeneous differential equation with constant coefficients has the auxiliary equation

(r + 1)(r − 3)2 (r + 2)3 (r2 + 2r + 5)2 r4 = 0.

(a)(3 pts) What is the order of this equation?

14

(b)(3 pts) What does the fundamental theorem of algebra tell us about this auxiliary equation?

That there are 14 roots (counting


multiplicities) which may be real or complex.

(c)(5 pts) List the roots of this auxilary equation? If a root has mutiplicity m, repeat it m times.

r = −1, 3, 3, −2, −2, −2, −1 ± 2i, −1 ± 2i, 0, 0, 0, 0

(d)(7 pts) Write down a general solution of the linear homogeneous differential equation whose
auxiliary equation is shown above.

c1 e−x
+ (c2 + c3 x)e3x
+ (c4 + c5 x + c6x2 )e−2x
+ (c7 + c8 x)e−x cos 2x + (c9 + c10 x)e−x sin 2x
+ c11 + c12x + c13 x2 + c14 x3

(e)(2 pts) Should the number of arbitrary constants in your general solution agree with the number
of roots (counting multiplicities) listed in Part (c)?

Yes
Problem 2 (20 pts) Student ID #

(a)(4 pts) Let f (t) be a function defined on [0, +∞). The Laplace transform of f is the function
F defined by the integral

Z ∞
F (s) = e−st f (t) dt . . . (∗)
0

(b)(4 pts) Describe the domain of F (s)

All the values of s for which


the integral in (*) exists

(c)(4 pts) Explain mathematically what it means to say that the integral in (*) exists as an im-
proper integral

Z ∞ Z N
−st
e f (t) dt = lim e−st f (t) dt
0 N →∞ 0

(d)(4 pts) Determine the Laplace transform of the function f(t) = cos bt, where b is a nonzero
constant.

Z ∞ Z N
F (s) = e−st cos bt dt = lim e−st cos bt dt
0 N →∞ 0
 ¯N 
e−st ¯
 ¯ 
= lim (−s cos bt + b sin bt¯
¯
N →∞ s2 + b2
0
" #
e−sN 1
= lim 2 2
(−s cos bN + b sin bN ) − 2 (−s)
N →∞ s +b s + b2
s
= for s > 0
s2 + b2

(e)(4 pts) What is the domain of the Laplace transform determined in Part (d)? Explain why.

The domain is s > 0 since for values of s ≤ 0 the limit


lim e−sN (−s cos bN + b sin bN ) and the integral in (*)
N →∞
do not exist.
Problem 3 (20 pts) Student ID #

(a)(5 pts) If c1 , c2 are arbitrary constants, and if f1 , f2 are functions whose Laplace transforms
exist for s > α, what does the linearity of the Laplace transform operator L tell us about
L {c1 f1 + c2 f2 }?

c1L {f1 } + c2 L {f2}

(b)(10 pts) Use the linearity of L to determine the Laplace transform


n o
L 5 + 3e2t + 5t3 e2t + 7 cos 3t + 9e−5t cos 3t .

L {5 + 3e2t + 5t3 e2t + 7 cos 3t + 9e−5t cos 3t}

= 5L {1} + 3L {e2t } + 5L {t3 e2t } + 7L {cos 3t} + 9L {e−5t cos 3t}

1 1 3! s s+5
= 5 +3 +5 + 7 + 9
s s−2 (s − 2)4 s2 + 32 (s + 5)2 + 32

(c)(5 pts) What is the domain of the Laplace transform in (b)? Explain why.

The domain is s > 2 since the respective


domains of the Laplace transforms in (b) are, in order,

s > 0, s > 2, s > 2, s > 0, s > −5

and the domain common to all is s > 2


Problem 4 (20 pts) Student ID #

(a)(10 pts) Use an appropriate trigonometric identity to determine the Laplace transform

L {sin 3t cos 7t} (s)

From the identities on the formula sheet


1
sin A cos B = [sin(A + B) + sin(A − B)]
2
1
sin 3t cos 7t = [sin 10t + sin(−4t)]
2Ã !
1 10 −4
L {sin 3t cos 7t} (s) = + 2
2 s2 + 100 s + 16
5 2
= 2 − 2
s + 100 s + 16
or
1
cos A sin B = [sin(A + B) − sin(A − B)]
2
1
cos 7t sin 3t = [sin 10t − sin 4t]
2Ã !
1 10 4
L {cos 7t sin 3t} (s) = − 2
2 s2 + 100 s + 16
5 2
= 2 − 2
s + 100 s + 16
Problem 4 (Cont’d) Student ID #

√ 1 π 2

(b)(10 pts) Given that the Laplace transform of t is , what is the Laplace transform of t t?
2 s3/2

n√ o

1 π
L t (s) = F (s) =
2 s3/2√
n √ o dF 3 π
L −t t (s) = (s) = − 5/2
ds 4√s
n √ o d F
15 π
L t2 t (s) = 2
(s) =
ds 8 s7/2
Problem 5 (20 pts) Student ID #

(a)(6 pts) Given that Y (s) = L {y} (s), where y(t) satisfies the initial value problem

y 00 − 3y 0 + 7y = cos 3t; y(0) = −2, y 0 (0) = 1,

P (s)
find the rational function that Y (s) is equal to.
Q(s)

Taking the Laplace transform of both sides


s
[s2 Y (s) − sy(0) − y 0 (0)] − 3 [sY (s) − y(0)] + 7Y (s) =
s2 + 32
h i s
s2 Y (s) − s(−2) − 1 − 3 [sY (s) − (−2)] + 7Y (s) =
s2 + 9
s
(s2 − 3s + 7) Y (s) = − 2s + 7
s2 + 9
s − (2s − 7)(s2 + 9)
=
s2 + 9
s − (2s2 − 7s2 + 18s − 63)
=
s2 + 9
−2s3 + 7s2 − 17s + 63
Y (s) =
(s2 − 3s + 7)(s2 + 9)

(b)(4 pts) If y(t) satisfies the initial value problem

y 00 − 2y 0 + 7y = t2 et , y(0) = 0, y 0 (0) = 0,

then the Laplace transform of y(t), namely, Y (s) = L {y} (s), has the partial fraction expansion
2 1 s−1 1 1 1 1
Y (s) = = − + .
(s2 − 2s + 7)(s − 1)3 18 s − 2s + 7 18 s − 1 3 (s − 1)3
2

Find the solution of the initial value problem by inverting this Laplace transform?

1 t √ 1 t 1
y(t) = e cos 6t − e + t2 et
18 18 6
Problem 5 (Cont’d) Student ID #

(c)(10 pts) Determine the partial fraction expansion for the rational function

4s2 + 13s + 19
Y (s) = .
(s − 1)(s2 + 4s + 13)

4s2 + 13s + 19
Y (s) =
(s − 1) [(s + 2)2 + 32]

A B(s + 2) + 3C
= +
s−1 (s + 2)2 + 32

4s2 + 13s + 19 = A [(s + 2)2 + 9] + [B(s + 2) + 3C] (s − 1)

s = 1 → 4 + 13 + 19 = A(32 + 9) + 0 → 36 = 18A → A = 2

s = −2 → 16 − 26 + 19 = (2)(9) + (3C)(−3) → 9 = 18 − 9C → C = 1

s = 0 → 19 = (2)(4 + 9) + (2B + 3)(−1) → −4 = −2B → B = 2

2 2(s + 2) + 3
Y (s) = +
s−1 (s + 2)2 + 32
MA232 Differential Equations Spring 1999

Final

Wednesday, May 5, 3:15 - 6:15 p.m.

Name
Student ID#
Signature

Please show your work carefully and legibly.


The graders will assign credit for correct working.

Problem Score
1
2
3
4
5
6
7
8
9
10
Bonus
Total

Period Recitation Day-Time-Room Instructor Check One


1 MA232-11 Mon 8-8:50 a.m. in SC 340 Tom Masser
2 MA232-12 Mon 9-9:50 a.m. in SC 342 Wesley Kent
8 MA232-13 Mon 4-4:50 p.m. in SC 342 Patrick Chan
1 MA232-21 Tues 8-8:50 a.m. in SC 344 Lisa Meeker
3 MA232-22 Tues 10-10:50 a.m. in SC 344 Sean Dorey
4 MA232-23 Tues 11-11:50 a.m. in SC 346 Sean Dorey
8 MA232-24 Tues 4-4:50 p.m. in SC 346 Kathy Christman
1 (20 pts) Student ID #

(a)(15 pts) Find a general solution of the separable ODE

dy y cos x
=
dx 1 + 2y2

(b)(5 pts) Use your answer to Part (a) to solve the initial value problem

dy y cos x
= , y(0) = 1
dx 1 + 2y2

(a)

1 + 2y 2
dy = cos x dx
y
ln |y| + y 2 = sin x + C

(b)

0+1 = 0+C
ln |y| + y2 = sin x + 1
2 (20 pts) Student ID #

A 60 L tank initially contains 30 L of pure water. A solution containing 10 g/L of salt flows into the tank
at a rate of 6 L/min, and the well-stirred mixture flows out at a rate of 3 L/min. How much salt is in the
tank just before it overflows?

Let x(t) denote the amount of salt in the tank at time t.


Then
dx
= (rate in) − (rate out)
dt

x(t)
= (10)(6) − ·3
30 + 3t

x(t)
= 60 −
10 + t

dx 1
+ x(t) = 60
dt 10 + t
R dt
µ(t) = e 10+t = eln(10+t) = 10 + t
∙Z ¸
1
x(t) = µ(t)Q(t) dt + C
10 + t
∙Z ¸
1
= (10 + t)60 dt + C
10 + t

1 h i
= 30(10 + t)2 + C
10 + t

C
= 30(10 + t) +
10 + t

C
x(0) = 0 = 300 + → C = −3000
10

3000
x(t) = 30(10 + t) −
10 + t

3000
x(10) = 600 − = 600 − 150 = 450 g
20
3 (20 pts) Student ID #

(a)(4 pts) Show that


yh (x) = c1 ex cos 2x + c2 ex sin 2x
is a general solution of the homogeneous second order constant coefficient differential equation

y 00 − 2y 0 + 5y = 0.

(b)(16 pts) Using Table 4.1 (see the Test II Formula Sheet), determine the form of a particular solution
yp (x) of the corresponding nonhomogeneous second order constant coefficient differential equation

y 00 − 2y 0 + 5y = g(x),

for each of the following four right-hand sides:


(i) g(x) = x3 + 1, (ii) g(x) = cos 2x, (iii) g(x) = ex cos 2x, (iv) g(x) = xex cos 2x.
(Be sure in each answer to specify the appropriate value of s.)

(a)

r2 − 2r + 5 = 0
(r − 1)2 + 4 = 0
r = 1 ± 2i

So {ex cos 2x, ex sin 2x} is a fundamental solution set.

(b)

(i) yp (x) = Ax3 + Bx2 + Cx + D

(ii) yp (x) = A cos 2x + B sin 2x

(iii) yp (x) = x(Aex cos 2x + Bex sin 2x)

(iv) yp (x) = x{(Ax + B)ex cos 2x + (Cx + D)ex sin 2x}


4 (20 pts) Student ID #

(a)(4 pts) Find a general solution of the linear second order constant coefficient homogeneous differential
equation
y 00 − 6y 0 + 9y = 0
(b)(12 pts) Find a particular solution yp (x) of the nonhomogeneous differential equation

y 00 − 6y 0 + 9y = x−3 e3x

using the method of variation of parameters.


(c)(4 pts) From Parts (a) and (b), what is a general solution of the ODE in Part (b)?

(a)

r 2 − 6r + 9 = 0

(r − 3)2 = 0

r = 3, 3

yh (x) = c1 e3x + c2 xe3x

(b){y1 (x), y2 (x)} = {e3x , xe3x } is a fundamental solution set on (−∞, ∞) as the following
nonzero Wronskian attests.
¯ ¯
¯ 3x ¯
¯ e xe3x ¯
W (x) = ¯ ¯ = e6x + 3xe6x − 3xe6x = e6x
¯ ¯
¯ 3e3x 3x 3x
e + x3e ¯

Z Z Z
−g(x)y2 (x) −x−3 e3x · xe3x
v1 (x) = dx = dx = −x−2 dx = x−1
W (x) W (x)
Z Z
g(x)y1 (x) x−3 e3x e3x x−2
v2 (x) = dx = dx =
W (x) e6x −2

1 1
yp (x) = v1 (x)y1 (x) + v2 (x)y2 (x) = x−1 e3x − x−2 xe3x = x−1 e3x
2 2
(c)
1
y(x) = c1 e3x + c2 xe3x + x−1 e3x
2
5 (20 pts) Student ID #

Use the elimination method to find a general solution for the first order linear system
dx
+ y = t2 ,
dt
dy
x+ = 1.
dt

D[x] + y = t2
x + D[y] = 1

D 2 [x] + D[y] = 2t
x + D[y] = 1

x00 − x = 2t − 1
r2 − 1 = 0 → r = ±1

x(t) = c1 e−t + c2 et + 1 − 2t
dx
y(t) = − + t2
dt
= c1 e−t − c2 et + 2 + t2
6 (20 pts) Student ID #

A mass of 4 kg is attached to a spring hanging from a ceiling, thereby stretching the spring 9.8 cm on
coming to rest at equilibrium. The mass is then pulled down 10 cm below the equilibrium point and given
an upward velocity of 1 m/sec. Determine the equation for the simple harmonic motion of the mass. When
will the mass first reach its maximum height after being set in motion?

9.8
mg = k` → (4)(9.8) = k → k = 400
100
4x00 + 400x = 0
x00 + 100x = 0
r2 + 100 = → r = ±10i
x(t) = c1 cos 10t + c2 sin 10t
= A sin(10t + φ)
0
x (t) = 10A cos(10t + φ)
1
A sin φ = x(0) =
10
x0 (0) 1
A cos φ = =−
10 10

φ =
4
x(t) = −A → sin(10t + φ) = −1

10t + φ =
2
3π/2 − φ 3π
t = = = 0.236 sec
10 40
7 (20 pts) Student ID #

(a)(6 pts) Given that Y (s) = L {y(t)} (s), where y(t) satisfies the initial value problem

y 00 − 2y 0 + 5y = sin 2t; y(0) = −2, y 0 (0) = 1,

P (s)
find the rational function that Y (s) is equal to. (Fully expand the numerator polynomial P (s).)
Q(s)

h i 2
s2 Y (s) − sy(0) − y 0 (0) − 2 [sY (s) − y(0)] + 5Y (s) =
s2 + 22
h i 2
s2 Y (s) − s(−2) − (1) − 2 [sY (s) − (−2)] + 5Y (s) =
s2 + 4
³ ´ 2
s2 − 2s + 5 Y (s) + 2s − 1 − 4 =
s2 +4
³ ´ 2
s2 − 2s + 5 Y (s) = − 2s + 5
s2 +4

2 − (2s − 5)(s2 + 4)
Y (s) =
(s2 − 2s + 5)(s2 + 4)

−2s3 + 5s2 − 8s + 22
=
(s2 − 2s + 5)(s2 + 4)

(b)(4 pts) If the Laplace transform of y(t) is given by


1 1 7 − 6s
Y (s) = − + 2
s s + 4 s − 2s + 5
what is y(t)? (Simply invert this Laplace transform.)

1 1 −6(s − 1) + 1
Y (s) = − +
s s+4 (s − 1)2 + 22

1
y(t) = 1 − e−4t − 6et cos 2t + et sin 2t
2
7 (Cont’d) Student ID #

(c)(10 pts) Determine the partial fraction expansion for the rational function
3s + 5
Y (s) = .
s (s2− 2s + 5)

3s + 5 A B(s − 1) + C2
= +
s(s2 − 2s + 5) s (s − 1)2 + 22

3s + 5 = A[(s − 1)2 + 4] + [B(s − 1) + 2C]s

s = 0 → 5 = 5A → A = 1

s = 1 → 8 = (1)(4) + (0 + 2C)(1) → 2C = 4 → C = 2

s = −1 → 2 = (1)(8) + (−2B + 4)(−1) → 2B = −2 → B = −1

3s + 5 1 −(s − 1) + 2(2)
= +
s(s2 − 2s + 5) s (s − 1)2 + 22

1 5−s
= + 2
s s − 2s + 5
8 (20 pts) Student ID #

(a)(15 pts)
    
1 −2 3 x1 7
    
    
 −1 1 −2   x2  =  −5 
    
2 −1 −1 x3 4
Given the matrix equation Ax = b above, use augmented matrices and elementary row operations to
simultaneously determine A−1 and x.
(b)(5 pts) Compute the matrix product shown below
  
1 −2 3 x
  
  
 −1 1 −2   y 
  
2 −1 −1 z

 
R1 1 −2 3 1 0 0 7
 
 
(A|I|b) = R2  −1 1 −2 0 1 0 −5 
 
R3 2 −1 −1 0 0 1 4
 
R1 1 −2 3 1 0 0 7
 
 
→ R1 + R2  0 −1 1 1 1 0 2 
 
2R2 + R3 0 1 −5 0 2 1 −6
 
R1 1 −2 3 1 0 0 7
 
 
→ R2  0 −1 1 1 1 0 2 
 
R2 + R+3 0 0 −4 1 3 1 −4
 
4R1 + 3R3 4 −8 0 7 9 3 16
 
 
→ 4R2 + R3  0 −4 0 5 7 1 4 
 
R3 0 0 −4 1 3 1 −4
 
R1 − 2R2 4 0 0 −3 −5 1 8
 
 
→ R2  0 −4 0 5 7 1 4 
 
R3 0 0 −4 1 3 1 −4
 
R1 /4 1 0 0 − 34 − 54 1
4 2
  ³ ´
 −1
→ −R2 /4  0 1 0 − 54 − 74 − 14 −1  = I|A |x
 
−R3 /4 0 0 1 − 14 − 34 − 14 1
    
1 −2 3 x x − 2y + 3z
    
    
 −1 1 −2   y  =  −x + y − 2z 
    
2 −1 −1 z 2x − y − z
9 (20 pts) Student ID #

Rewrite the scalar equation


d4 w d3 w d2 w
− 3 + 2 − w = et ln |t|
dt4 dt3 dt2
as a first order system in normal form. Express the system in matrix form x0 = Ax + f .

x1 = w x01 = w0 = x2

x2 = w 0 x02 = w00 = x3

x3 = w00 x03 = w 000 = x4

x4 = w000 x04 = w iv = x1 − 2x3 + 3x4 + et ln |t|


 0    
x1 0 1 0 0 0
     
     
 x2   0 0 1 0   0 
  = + 
     
 x3   0 0 0 1   0 
     
x4 1 0 −2 3 et ln |t|
10 (20 pts) Student ID #

Solve the initial value problem


   
5 −1 2
x0 =   x, x(0) =  
3 1 −1

¯ ¯
¯ ¯
¯ 5−r −1 ¯
|A − rI| = ¯ ¯
¯ ¯
¯ 3 1−r ¯

= (5 − r)(1 − r) + 3

= r 2 − 6r + 8

= (r − 2)(r − 4) for r = 2, 4
  
3 −1 1
r1 = 2 → (A − 2I)u1 =   =0
3 −1 3

  
1 −1 1
r2 = 4 → (A − 4I)u2 =   =0
3 −3 1

   
1 1
x(t) = c1 e2t   + c2 e4t  
3 1

        
1 1 1 1 c1 2
x(0) = c1   + c2  =  = 
3 1 3 1 c2 −1

    
1 1 2 R1 1 1 2
  →   
3 1 −1 3R1 − R2 0 2 7

  
2R1 − R2 2 0 −3
→   
R2 0 2 7

   
c1 − 32
  =  
7
c2 2

     
3 7 1
1 1 −3e2t + 7e4t
x(t) = − e2t   + e4t   =  
2 3 2 1 2 −9e2t + 7e4t
Bonus (20 pts) Student ID #
Z ∞ √
−x2 π
(a)(15 pts) Use e dx = to show that
0 2
n o r
−1/2 π
L t (s) = , s>0
s
(b)(5 pts) Use Part (a) to show that
n o √
1/2 π
L t (s) = , s>0
2s3/2

(a) Letting t = x2 /s (which immediately implies that s > 0 since t ∈ [0, +∞)) gives
n o Z N
L t−1/2 (s) = lim e−st t−1/2 dt
N →∞ 0

Z √sN √
−x2 s 2x
= lim e dx, s>0
N →∞ 0 x s
Z ∞
2 2
= √ e−x dx, s>0
s 0

r
π
= , s>0
s
(b)

dF
L {tf (t)} = − (s)
ds
n o d ³√ −1/2 ´
L t1/2 = − πs , s>0
ds

1 √ −3/2
= πs , s>0
2

π
= 3/2
, s>0
2s
MA 232 Differential Equations Fall 1999 Kevin Dempsey

MA232 EXAM FORMULAS

Some Common Derivatives


d n d x
(x ) = nxn−1 , (x ) = xx (1 + ln x)
dx dx
d x d f (x) d f 0 (x)
(e ) = ex , e = ef (x) f 0 (x), ln |f (x)| =
dx dx dx f (x)
d d d
cos x = − sin x, sin x = cos x, tan x = sec2 x
dx dx dx
d d d
sec x = sec x tan x, csc x = − csc x cot x, cot x = − csc2 x
dx dx dx

Some Common Integrals


Z Z Z
xn+1
xn dx = + C, ex dx = ex + C, f 0 (x)ef (x) dx = ef (x) + C
n+1
Z Z Z
f 0 (x)
dx = ln |f (x)| + C, cos x dx = sin x + C, sin x dx = − cos x + C
f(x)
Z Z
sec x dx = ln | sec x + tan x| + C, csc x dx = ln | csc x − cot x| + C
Z Z
tan x dx = − ln | cos x| + C, cot x dx = ln | sin x| + C

Some Common Trigonometric Identities

cos2 x + sin2 x = 1, sin 2x = 2 sin x cos x


cos 2x = cos2 x − sin2 x = 2 cos2 x − 1 = 1 − 2 sin2 x
sin(A + B) = sin A cos B + cos A sin B, cos(A + B) = cos A cos B − sin A sin B
sin(A − B) = sin A cos B − cos A sin B, cos(A − B) = cos A cos B + sin A sin B

(Existence and Uniqueness) Theorem 1 (Page 51)

Suppose P (x) and Q(x) are continuous on the interval (a, b) that contains the point x0 .
Then, for any choice of initial value y0 , there exists a unique solution y(x) on (a, b) to the
initial value problem
dy
+ P (x)y = Q(x), y(x0 ) = y0 .
dx
In fact, the solution is given by
½Z ¾ R
1 P (x) dx
y(x) = µ(x)Q(x) dx + C , µ(x) = e
µ(x)
where the arbitrary constant C is determined by the initial condition y(x0 ) = y0 .

Exam Formulas Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

(Existence and Uniqueness) Theorem 2 (Page 157)

Suppose p(x), q(x) and g(x) are continuous on an interval (a, b) that contains the point x0 .
Then, for any choice of the initial values y0 and y1 , there exists a unique solution y(x) on
the interval (a, b) to the initial value problem

d2 y dy
2
+ p(x) + q(x)y = g(x), y(x0 ) = y0 , y 0 (x0 ) = y1 .
dx dx

Fundamental Solution Sets, Linear Independence, and the Wronskian (Page 165)

If y1 and y2 are solutions of y 00 + py 0 + qy = 0 on (a, b), then the following are equivalent:
1. {y1 , y2 } is a fundamental solution set on (a, b).
2. y1 and y2 are linearly independent on (a, b).
¯ ¯
¯
y (x) y2 (x) ¯
¯ ¯
3. W (x) = 10 ¯ ¯ = y1 (x)y20 (x) − y10 (x)y2 (x) 6= 0 for all x in (a, b).
y1 (x) y20 (x)
¯ ¯

4. W (x0 ) 6= 0 for some x0 in (a, b).

Table 4.1 (Page 197) Method of Undetermined Coefficients for L[y](x) = g(x)

Type g(x) yp(x)


(I) pn (x) = an xn + · · · + a1 x + a0 xs Pn (x) = xs {An xn + · · · + A1 x + A0 }†

(II) aeαx xs Aeαx

(III) a cos βx + b sin βx xs {A cos βx + B sin βx}

(IV) pn (x)eαx xs Pn (x)eαx

(V) pn (x) cos βx + qm (x) sin βx xs {PN (x) cos βx + QN (x) sin βx},
where qm (x) = bm xm + · · · + b1 x + b0 QN (x) = BN xN + · · · + B1 x + B0
and N = max(n, m)

(VI) aeαx cos βx + beαx sin βx xs {Aeαx cos βx + Beαx sin βx}

(VII) pn (x)eαx cos βx + qm (x)eαx sin βx xs eαx {PN (x) cos βx + QN (x) sin βx},
where N = max(n, m)

The nonegative integer s is chosen to be the smallest integer so that no term in the
particular solution yp (x) is a solution of the corresponding homogeneous equation
L[y](x) = 0.

Pn (x) must include all its terms even if pn (x) has some terms that are zero.

Exam Formulas Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Procedure for Solving Nonhomogeneous Equations y 00 + py 0 + qy = g (Page 191)


(a) Determine a general solution, c1 y1 + c2 y2 , of the corresponding homogeneous equation
y 00 + py 0 + qy = 0.
(b) Find a particular solution, yp , of the given nonhomogeneous equation.
(c) Form the sum of the particular solution and a general solution to the homogeneous equa-
tion; that is, y = c1 y1 + c2 y2 + yp , to obtain a general solution of the given nonhomogeneous
equation.

Variation of Parameters (Page 204)

If {y1 , y2 } is a fundamental solution set for the homogeneous second order not necessarily
constant coefficient differential equation y 00 + p(x)y 0 + q(x)y = 0, then a particular solution
yp of its nonhomogeneous counterpart y 00 + p(x)y 0 + q(x)y = g(x) is given by
yp (x) = v1 (x)y1 (x) + v2 (x)y2 (x),
where Z Z
−g(x)y2 (x) g(x)y1 (x)
v1 (x) = dx, v2 (x) = dx.
W [y1 , y2 ](x) W [y1 , y2 ](x)
Here, the Wronskian ¯ ¯
¯
y y ¯¯
¯
W [y1 , y2 ](x) = 10 20 ¯¯ = y1 y20 − y10 y2 ,
¯
¯
y1 y2
being nonzero is a property satisfied by fundamental solutions. Having determined yp , a
general solution of the nonhomogeneous differential equation is given by
y(x) = c1 y1 (x) + c2 y2 (x) + yp (x)
the first two terms of which comprise the general solution of the homogeneous equation.

Table 7.1 A Brief Table of Laplace Transforms (Page 362)


f (t) F (s) = L{f (t)} (s)
1
1 , s>0
s
1
eat , s>a
s−a
n!
tn , n = 1, 2, . . . n+1
, s>0
s
n!
eat tn , n = 1, 2, . . . , s>a
(s − a)n+1
b
sin bt , s>0
s + b2
2
s
cos bt , s>0
s + b2
2
b
eat sin bt , s>a
(s − a)2 + b2
s−a
eat cos bt , s>a
(s − a)2 + b2

Exam Formulas Clarkson University


MA 232 Differential Equations Fall 1999 Kevin Dempsey

Table 7.2 Properties of Laplace Transforms (Page 368)

L{f + g} = L{f } + L{g}

L{cf } = cL{f} for any constant c


n o
L eat f (t) (s) = F (s − a) where F (s) = L{f (t)} (s)

L{f 0 } (s) = sF (s) − f (0)

L{f 00 } (s) = s2 F (s) − sf(0) − f 0 (0)


n o
L f (n) s = sn F (s) − sn−1 f (0) − sn−2 f 0 (0) − · · · − f (n−1) (0)
n
d F (s)
L{tn f(t)} (s) = (−1)n
ds n

Properties of the Inverse Laplace Transform (Pages 372 & 379)

L−1 {F1 + F2 } = L−1 {F1 } + L−1 {F2 }

L−1 {cF } = cL−1 {F }


( n )
−1 dF
L (t) = (−t)n f (t)
ds n

Miscellaneous Z Z
u dv = uv − v du (Integration by Parts)
d x a
tan−1 = 2
dx a a + x2
Z
dx 1 −1 bx
= tan
a2 + b2 x2 ab a
Z ax
e
eax cos bx dx = 2 (a cos bx + b sin bx)
a + b2
Z
ax eax
e sin bx dx = 2 (a sin bx − b cos bx)
a + b2

Exam Formulas Clarkson University