OK, this lecture, this day is differential equations day
I just feel even though, these are not on the BC exams
that we've got everything we need to actually see calculus in use
We've got the derivatives of the key functions
and ready for a differential equation
And there it is
When I look at that equation
So it's a differential equation because it has
the derivatives of y as well as y itself in the equation
And, when I look at it
I see it's a 2nd order equation
because of this 2nd derivative
It's a linear equation
because y-- 2nd derivative, 1st derivative, and y itself so forth, separate
no multiplying of y times y'
In fact, the only multiplications are by these numbers
m r k
And those are constant number coming from the application
So I have a constant coefficient, linear, 2nd order, differential equation
And I'd like to solve
And we can do it
Because it uses the very functions that we know how to find derivatives of
Let me take 2 or 3 special cases
where those functions appear purely
So one special case is that if I knock out the 2nd derivative term
and let me just choose--
Rewrite it in the way it looks easier, the best
It's just the derivative of y is some multiple of y, it's now 1st order
And we know the function that solves that equation
The derivative equal the function itself, that's the exponential
If I want to have an extra factor a here
then I need e to the at
And usually,
in fact, we expect that
with a 1st order equation, in the solution, there'll be some constant
that we can set later to match the starting condition
And that constant shows up here
It's just, if e^at solves that equation as it does
because I take the derivatives, down comes an a
So the C times e^at, that's because
the equation was linear
So, that's a nice one
Pure exponential
OK, ready for this one
So this one, I'm-- I don't have this middle term
I just have the 2nd derivative and the function
And let me again change to letters I like
putting the ky on the other side
with a minus sign
So this omega² will be
omega² will be k/m
when I reorganize that equation
My point is
we can solve this equation
the 2nd derivative equaling minus the function
We've met that
That's the equation that the sine and the cosine, both solve
There we get 2 solutions for this 2nd order equation
And just as with the a in this problem, so with this number here
I'll just jiggle the sine and the cosine a little bit
so that, we get omega, to come down twice, when I take 2 derivatives
So the solution here will be
One solution will be the cosine of omega t
because 2 derivatives of the cosine is minus the cosine
that's what this ask for
with the factor omega coming out twice
And another solution will be sine of omega t
for the same reason
And again, now, with a 2nd order equation
I'll be expecting a couple of constants to be able to choose later
And here they are, C cos omega t
and a D sin omega t
That's the general solution to that equation
So we know that
And these are the 2 important ones
There's another less important one, and extremely simple one
Suppose all that went away, and I just had
that's the 3rd very special case
d second y dt squared equal 0
We sure know the solution to that
What functions have 2nd derivative equal 0?
Well, a constant function does, certainly
A constant, even its 1st derivative is 0, much less its 2nd
And then, t does
Its 1st derivate is 1
And then the 2nd derivative is 0
So there show up the powers of t
Well, the first 2 powers, t^0 and t^1 show up
in that very special case
Sine and cosine show up here
e^at show up here
And now, let me tell you the good part of this lecture
The solution to this equation
and in fact, to a equation of 3rd, 4th, all orders
are products of these ones that we know
exponentials
times sines and cosines
times powers of t
That's all we need to solve constant coefficient differential equations
So I planned out to go ahead and solve-- and move toward this
this equation, but I should have said
that's a fundamental equation of engineering
m stands for some mass
Oh, yeah, let me draw a picture
And you'll see why I chose t rather than x
Because things are happening in time
And what is happening?
Let me show you
What's happening in time is typically
this would be a problem with
some kind of a spring
hanging down, and on that spring is a mass, m
So what happens? So what happens if I--
I pulled that mass down. So I stretch the spring
And then I let go
Then what does the spring do?
Well, the spring will pull the mass back upwards
And it will pull it, sort of, back up to the point where it
squeezes, compresses the spring, the spring will be
like, instead of being stretched down, it'll be the opposite
It'll be compressed in
And then
when compressed in, it'll push the mass, it'll
being compressed, the spring will push
It'll push the mass down again
And up again
And I get oscillation
Oscillation is what I'm seeing here
And what are examples of oscillation in real life?
The spring
Or a
a clock
especially a grandfather clock
It's swinging back and forth, back and forth
So I'll just put a clock
Ugh, music
A violin string is oscillating, that's
where the beautiful sound comes from
Our heart
is in and out, in and out, a regular oscillation
I could add molecules
they oscillate extremely quickly
So this equation that I'm aiming for
comes up in biology
In chemistry, in molecules, it's a very important equation
In physics, and mechanics, and engineering for springs
it comes up in economics, it's in everywhere
So-- and by choosing constant coefficients
I have the basic model and the simplest model
OK, I'll talk in this language of springs
But it's-- all these oscillations have the equations like that
Actually, this model often would have r=0
So let me take that case, r=0, we get
So where does this equation come from?
Can I do two things for the physics?
And then go back to the math
solving the equation
The physics is just remember Newton's law
F=ma
So, there's the m, the mass
The a is the acceleration, that's the 2nd derivative, right?
You don't mind, if I write that as 2nd derivative
Acceleration.
The mass is constant, we're not--
we're not going at the speed of light here
So we assume that mass is not being converted to energy, it's mass
And then, what's the force?
Well, for this spring force
for the spring
what did we say?
When the y-- so y is going this way
It's the position, the displacement of the spring
When it's down like that, when y is positive
the spring is pulling back, the force of the spring is pulling back
And the force of the spring is proportional to y
And the proportionality constant is my number k
That factor I just said, is
and I guess, it's pulling
opposite to a positive y
When y is positive, and this spring is way down
the force is pulling it up
pulling in the negative direction, upwards
So, I need that minus sign
So that k is the stiffness of the spring
This is Hooke's law that the
force coming from a spring
is proportional to the stretch
And, the constant in there Hooke's constant, the spring constant, k
So now, that if I put the -ky over there
plus ky, you see my equation again
But this is the one that we were able to solve right here
Do you see that this is k², the r=0 in this first model?
r=0 because, r involves resistance
r for air resistance
damping
And, right now, I don't have that
I just have a little spring that'll oscillate forever
It'll oscillate forever
following sine and cosine
That's exactly what the spring will do, it'll just go on forever
And the C and D, the constants will depend on how it started
Did it start from rest?
If it started from rest, it would be no sine term
It's easy to find C and D later
The real problem is to solve the equation, and we've done it
for this equation
And let's just remember this, oh, let me repeat that
when I put that on to the other side
and divide by k
then I see the-- oh, divide by m, sorry
then I see the omega²
So omega² is k/m, right
Oh, it's k over-- right
OK, that's the simple case
Pure sines and cosines
Now, I'm letting in some resistance
So now, I'm coming back to my equation
Let me write it again, m y'' 2nd derivative
plus 2r y', 1st derivative
plus ky, 0th derivative, equal 0
I want to solve that equation now for any numbers m and r and k
OK
Well, the nice thing is
that the exponential function takes this right to the answer
The best plan here--
So this is the most important equation you'll see in a differential equation course
And then the course kind of goes passed it, and you'll easily forget
This is the most important and the simplest
Why is it simple? Because you give the, key idea
This is the key idea
Try y equals the exponential of e to the something times t
Let me call that something lambda
You might prefer C, I'm happy with C or any other number here, yeah
I'll call it lambda, just because of a little Greek importance
Alright, so I try this
I substitute that into the equation
and I'm gonna choose lambda to make things work
But-- here's the key idea, so easy
Now, put it into the equation
So what happens? What I put-- when this is y, take 2 derivatives
Well, let me start with taking no derivatives
So I have done here ke^ lambda t
And over here is 0
And now, let me back up to the 1st derivative
So that's 2r times the derivative of this guy
y', I just substitute in this into the equation
So what's the derivative?
We know, the derivative of this
bring this down, this lambda, we already did it
lambda, e to the lambda t
That's the derivative
And what about this one?
This one is gonna be an m
y'', what happens to 2 derivatives?
Bring down lambda
twice, two times
So I have lambda²
e to the lambda t
And then, in a minute, you know what I am gonna do
I'm gonna cancel
the common factor e to the lambda t
which is never 0, so I safely divide it out
And then
write the equation we get
OK, let me write that out with more space
m lambda² + 2r lambda + k = 0
This is the equation. It's just an ordinary quadratic equation
It's our high school algebra equation
Lambda appeared squared, because we had two derivatives, we had a 2nd derivative
And so I need a quadratic formula to know--
I expect 2 answers, 2 lambdas
And that's normal for
the 2nd order equation, I'll get 2 solutions
e to the lambda 1 t, e to the lambda 2 t
2 different exponentials will both solve the problem
Alright, what's the lambda?
Well, can I just recall the quadratic formula?
Well, it's a little messy, but not too bad here
Just to show that I remember it
The 2 here is kind of handy with quadratic formula
Because then I just get -r plus or minus the sqrt
of r²
And it's not -4km
because of the 2 there, it's just -km
And then I divide by m
OK, well, big deal
I get 2 roots
Let me use numbers
So this-- what you see there is like solving the differential equation
Not too bad
Now, let me put in number
to show what's typical
and of course, as those number change
we'll see different lambdas
And actually, as the number change
that would take us between the exponential stuff and the oscillation stuff
Let me take one where, I think it just will be-- so this is example 1
Let me choose m=1
y''
plus, let me take r=3, so then I have 6
y'
And let choose k=8
y equal 0
Alright, now we get numbers
So the numbers are m=1, r=3, k=8
And, we can write the solution to that equation
or the 2 solutions, because there're 2 lambdas
OK, so when I try e to the lambda t
Plug it in, I'll get lambda twice
And I'll get 6 lambda once
And then I'll get 8 without a lambda coming down
All multiplying by e to the lambda t, which I'm canceling
equal 0
So I solve that equation
Either directly, you're recognizing that a factor's in the lambda+2
times lambda+4 =0
Or by plugging in r k and m in the quadratic formula. Either way
I'm learning that lambda is -2, or -4
Those are the 2 solutions
The 2 decay rates, you could call it
Because they're up in the exponent
So what's the solution? y(t)
the solution to that equation
The general solution with a constant C and a constant D
It's e^(-2t) and e^(-4t)
The 2 lambdas are in the exponent
And we've solved
So that's the point, we have the ability to solve differential equations
based on the 3 most important derivatives
we know exponentials, sines, cosines, powers of t
OK
Ready for example 2. Example 2, I'm just gonna change that 8 to a 10
So, you're gonna see a 10 show up here
Alright, but that will make a difference
It won't be just some new number. It'll be a definite difference here
OK, let me go over across here to the one with 10
OK, so now my equation is 1y''+6y'+10y=0
Remember prime means derivative
OK, so again, I try y is e to the lambda t
I plug it in
Two derivatives bring down lambda²
One derivative brings down lambda
No derivatives leave it to 10, equal 0
That's my equation for lambda
Hah, I don't know how to factor that one
And in fact
I'd better use the quadratic formula, just to show what happens here
So the quadratic formula will be
The two roots, lambda
You remember? So it's my-- can I remember that?
The formula, -r +/- the sqrt of r²-km, all divided by m
I got the 2's and 4's out of it, by taking r to be 3 here
OK, so it's -3
plus or minus the sqrt of r² is 9
minus
1 times 10
k and m is 10, divided by 1
Hah, you see something different going on here
I have the sqrt of a negative number
Over there, if I wrote out the sqrt, you would have seen the sqrt of a plus 1
And gave me -3+1 or -3-1
That was the -2 and -4
Now, I'm different
Now, I'm seeing the sqrt of -1, so this is -3 +/- i
So I see the solution y(t)
you see that this is i
The sqrt of -1
We can deal with that
It's a complex number, imaginary number
And the combination -3+i is a complex number
and we have to accept that that's our lambda
So I have even a multiple of C
and the lambda here is -3+i, t
And, the 2nd solution is e -3-i t
I found the general solution
We could say done, except
you might feel, well
What are we gonna do with these imaginary numbers here?
How did they get in this perfect real differential equation?
Well, they slipped in because the solutions were not real numbers
The solutions were -3+/-i
But we can get real again
So, this is one way to write the answer
But I just want to show you using the earlier lecture
Using the beautiful fact that Euler discovered
So now let me complete this example by remembering Euler's great formula
for e^it
because you see
we have an e to the -3t perfectly real decaying
the spring is slowing down because of air resistance
But we also have an e to the it
That's what Euler's formula's about
And Euler's formula says that e^it is cost+isint
So it's through Euler's formula that these oscillations are coming in
The direct method led to an e to the it
but Euler-- the next day, Euler realized
that e to the -it, or probably
Euler didn't take till next day
will be -isint
So, both e^it and e^(-it)
They both can be replaced by sines and cosines
If I-- so you replace e^it
I'll put that
in place of e^(-it), I put that one
The final result is
Can I just jump to that?
The final result it, that with some different constants
We have the cosine-- oh
Let me not forget e^(-3t)
That's part of this answer
I can't-- I'm damping this out by e^(-3t)
This resistance r
times cost and e^(-3t) sint
OK, that's good
General solution
back to real numbers
it just describes a damped oscillation
It's damped out, it's slowing down, rather it's--
it's decaying
The amplitude, the spring is like--
It's like having a shock absorber or something
It's settling down
to the center point pretty fast
But as it settles, it goes back and across that center point, oscillate across
OK, now you might finally ask, the last step of this lecture
Where do powers of t come in?
Where does t come in?
So far we've seen exponentials come in
We've seen sines and cosines come in
Can I do a last example?
Just here in the corner
Which will be y''+6y'
and now this time instead of 8 or 10
I'm gonna take 9y
equal 0
This is example 3, which we can solve
You know, I'm gonna try y=e^(lambda t)
Let me substitute that
I'll get lambda² coming from 2 derivatives
Lambda from 1 derivative, 9 from no derivatives
I've got by quadratic equation
that's supposed to give me 2 lambdas
Little problem here
When I factor this
It factors into lambda+3 squared = 0
So, the answer, the lambda is -3 twice
Twice
The two lambdas happen to hit the same value, -3
OK, we don't have a complex stuff here
It's two real values that happen to coincide
And when that happens
Well, -3 tells us that a solution e^(-3t) works
Where do we get the other solution?
We want 2 solutions to a 2nd order equation
I can's just use e^(-3t) again
I need a 2nd solution, and it shows up at this typical of math
something special happens, and this special situation of a double root
And the solutions will be e^(-3t)
and, t e to the -3t
That's the last step, and maybe I'll just put it
Where am I gonna put it?
Ah, I'll bring this down, and just put it here
So now I'm solving this particular problem
y is a multiple of e^(-3t), good
But I can't just repeat it for the 2nd one
So the 2nd one, it just turns out that then is when a little factor t appears
You might like to substitute that for practice with the product rule
If you substitute that into the differential equation, you'll find
everything cancels and it works
So, the conclusion is
Linear constant coefficient differential equations
are completely solved by trying e^(lambda t)
and finding that number lambda
If it's a real number
we have exponentials
If it's an imaginary number, we have sines and cosines
If it's a repeated number
We have an extra factor t showing up
That's the exceptional event in that particular case
So there you go
Differential equations with constant coefficients
we can handle
You can handle
Thank you
This has been a production of MITOpenCourseWare
and Gilbert Strang
Funding for this video was provided by the Lord Foundation
To help OCW continue to provide free and open access to MIT courses
please make a donation at ocw.mit.edu/donate