GILBERT STRANG: OK, today is about differential equations.
That's where calculus really is applied.
And these will be equations that describe growth.
And the first you've already seen.
It's the most important and the simplest. The growth rate
dy dt is proportional to y itself.
Let's call c that constant that comes in there.
And all these problems will start from some known point y
at time 0 and evolve, grow, to k, whatever they do.
And this one we know the solution to.
We know that that will be an exponential growth with a
factor c, a growth rate c.
Actually, we should know that the solution has an e to the
ct because when we take the derivative of this, it will
bring down that factor c that we want.
And at t equals 0 this is correct.
We get started correctly because at t equals 0 we have
y of 0 is correctly given by the known starting point.
Because when t is 0, that's 1.
So that's the one we know.
The most fundamental.
Now, the next step.
Still linear.
That allows a source term.
This might be money in the bank growing with an interest
rate c per year.
And the source term would be additional money that you're
constantly putting in.
Every time step in goes that saving.
Or if s were negative, of course, it could be spending.
For us, that's a linear differential equation with a
constant right-hand side there.
And we have to be able to solve it.
And we can.
In fact, I can fit it into the one we already now.
Watch this.
Let me take that to be c times y plus s/c.
Remember, s and c are constants.
And let me write that right-hand side, dy dt.
I can put this constant in there too and still have the
same derivative.
So dy dt is exactly the same as the derivative of y plus
s/c because that s/c is constant; its derivative is 0.
So that dy dt is the same as before.
But now look.
We have this expression here that's just like this one,
only it's y plus s/c that's growing at this growth rate c,
starting from--
the start would be y at 0 plus s/c.
You see, this quantity in parentheses, I'm grabbing that
as the thing that grows perfect exponentially.
So I conclude that at a later time its value is its initial
value times the growth.
That is a rather quick solution to this
differential equation.
You might want me to put s/c on the right-hand side and
have y of t by itself, and that would be a formula for
the correct y of t that solves this equation that
starts at y of 0.
And of course, this one starts at y of 0 plus s/c and that's
why we see y of 0 plus s/c right there.
Do you see that that equation, well, it wasn't really
systematic.
And in a differential equations course you would
learn how to reach that answer without
sort of noticing that--
actually, I should do that too.
This is such a useful, important equation.
It's linear, but it's got some right-hand side there.
I should give you a system, say something about linear
equations before I go on.
The most interesting equation will be not linear, but let me
say a word about linear equations of which that's a
perfect example with a right-hand side.
So linear equations.
Linear equations.
The solutions to linear equations, y of t, is--
to all linear equations.
Actually, this is a linear differential equation.
When I'm teaching linear algebra I'm talking about
matrix equations.
The rule, it's the linear part that is important for these
few thoughts.
The solution to linear equations--
can I underline linear--
always has the form of some particular solution.
Some function that does solve the equation plus another
solution with a right side 0.
You will see what I mean by those two
parts for this example.
Can I copy again this example dy dt is cy plus s.
So I'm looking for a solution to that equation.
First, let me look for a particular solution.
That means just any function that solves the equation.
Well, the simplest function I could think of would be a
constant function.
And if my solution was a constant, then its derivative
would be 0.
So that would be 0.
And then c times that constant plus s would be 0.
I want the equation to be solved.
I claim that a particular solution is the constant y--
so when I set that momentarily to 0, I'll discover I'll move
the s over as minus s.
I'll divide by the c and I'll have a minus s/c.
That's a particular solution.
Let's just plug it in.
If I put in y.
That's a constant, so it's derivative is 0.
And c times that gives me minus s plus s is the 0.
OK.
That's a particular solution.
And then what I mean by right side 0.
What do I mean by that?
I'm not going to wipe out all this, I'm going to wipe out--
for this right side 0 part, I'm going to wipe out the
source term.
I mean, I keep the y's, but throw away the source in the
right side 0.
Maybe a book might often write the homogeneous equation.
And the homogeneous equation is where we started,
dy dt equals cy.
What's the solution to that?
The solution to dy dt is cy.
This is this solution, e to the ct.
Any a, any a times e to the ct will solve my simple equation.
Once I've knocked out this s, then if y solves it, a
times y solves it.
I could multiply the equation by a.
So a is arbitrary, any number.
But of course, I'm going to find out what it is by
starting at the right place.
By starting at y of 0, I'll find out what--
by setting t equals 0.
So put t equals 0.
To find a, put t equals 0.
Because we know where we started.
So we started at a known y of 0 equals minus s/c plus A.
Setting t equals 0 makes that 1.
You see we found out what A is.
A is y of 0 plus s/c.
And that's the thing that grows, that multiplies
the e to the ct.
And of course, it did it up here.
Up here what multiplied the e to the ct was this y of 0 plus
s/c, which is exactly our A.
As I said, my main point in this lecture is to bring in a
nonlinear equation.
That's quite interesting and important.
And it comes in population growth, ecology, it appears a
lot of places and I'll write it down immediately.
But just the starting point is always linear.
And here we've got the basic linear equation and now the
basic linear equation with a source term.
Ready for the population equation.
Population growth.
Population P of t.
OK, what's a reasonable differential equation that
describes the growth of population?
All right, so I'm interested in, what is a model?
So this is actually where mathematics is applied.
And many people will have models.
And people who have a census can check those models and
see, well, what are the constants?
Does a good choice of constant make this model realistic over
the last hundred years?
Lots to do.
Fantastic projects in this area.
If you're looking for a project, google "population
growth." See what they say.
Several sites will say--
Wikipedia, I did it this morning.
I looked at Wikipedia.
I'll tell you some things later about Wikipedia.
And also, the Census Bureau has a site and they all know
the population now pretty closely.
Everybody would like to know what it's
going to be in 50 years.
And to get 50 years out, you have to have some
mathematical model.
And I'm going to pick this differential equation.
There's going to be a growth.
That c would be sort of birth rate.
Well, I guess birth rate minus death rate.
So that would be the growth rate.
And if we only had that term the population would grow
exponentially forever.
There's going to be another term because that's not
realistic for the population just to keep growing.
As the earth fills up, there's some maybe competition term.
Some slowdown term.
So it's going to have a minus sign.
And maybe s for a slow down factor.
And I'm going to take P squared.
That reflects sort of population interacting with
population.
There are many problems. This is also a model for problems
in chemistry and biology, mass action it would
be called in chemistry.
Where I would have two different materials, two
different substances, two different chemicals.
And the interaction between the two would be proportional
to the amount of one and also proportional to the
amount of the other.
So it'll be proportional to the product.
One concentration times the other.
Well, there I would have to have two equations for the two
concentrations.
Here I'm taking a more basic problem where I just have one
unknown, the population P, and one equation for it.
And it's P times P. It's the number of people meeting other
people and crowding.
So s is a very small number.
Very small, like one over a billion or something.
Now, I want you to solve that equation.
Or I want us to solve it.
And we don't right now have great tools
for nonlinear equations.
We have more calculus to learn, but this one will give
in if we do it right.
And let me show you what the solution looks like because
you don't want to miss that.
We'll get into the formula.
We'll make it as nice as possible, but
the graph is great.
So the population.
Well, notice, what would happen if the population
starts out at 0?
Nobody's around.
Then the derivative is 0.
It never leaves 0.
So this 0 would be a solution.
P equals 0 constant solution.
Not interesting.
There's another case, important case, when the
derivative is 0.
Suppose the derivative is 0.
That means we're going to look for a particular very special
solution that doesn't move.
So if that derivative is 0, then cP equals sP squared.
Can I do this in the corner?
If cP equals sP squared.
And if I cancel a P, I get P is equal to c/s.
So there's some solution.
Can I call it that c/s?
Well, everybody would like to know exactly what those
numbers are.
It's maybe about 10 billion people.
So what I'm saying is if I got up to--
not me.
If the world got up to 10 billion, then at that point,
the growth and the competition would knock each other out,
would cancel each other.
There wouldn't be any further change.
So that's a kind of point that we won't go past.
But now, let me draw the real solution because the real
solution starts with--
who knows?
Two people, Adam and Eve.
100 people, whatever.
Whenever we start counting.
This is time.
You know, that's the time that we're starting.
We could start today.
This is time starting at some point where we know something.
Well, we have pretty good numbers back for
some hundreds of years.
So probably it wouldn't be today we'd start.
But wherever we start, we follow that equation.
Let me just draw the graph.
It grows.
It grows and then at a certain point, and it turns out to be
the halfway point, c over 2s.
It's beautiful calculus.
It turns out that that's a point of inflection.
It's not only growing, it's growing faster and faster up
to this time.
I don't know when that is, but that's a very critical moment
in the history of the world.
I think we may be a little passed it actually.
And after that point, the whole thing
is just like symmetric.
It's an s-shaped.
It goes up and now slows down and gets closer and closer to
this c/s steady state.
I would call c/s a steady state.
If it gets there it stays there steadily.
It won't quite get there.
This would be the s curve.
And if I went back in time, it would be going back, back,
back to nearly 0.
Probably to 2.
And up here, but not quite there.
That's the population curve that comes from this model.
I can't say that's the population curve that's going
to happen in the next thousand years because the model is a
good start.
But of course, you could add in more terms for epidemics,
for wars, for migration.
All sorts of things affect the model.
OK, now the math.
The math says solve the equation.
OK, how am I going to do that?
Well, there are different ways, but here's
a rather neat way.
It turns out that if I try y.
Let me introduce y as 1/P, then the equation for y is
going to come out terrific.
This is a trick that works for this equation.
Nonlinear equations, it's OK to have a few tricks.
All right, so this is y of t is 1/P of t.
So of course the graph of y will be different and the
equation for y will be different.
Let me say what that equation looks like.
OK, so I want to know, what's dy dt?
I know how to take the derivative.
We get to use calculus.
This is P to the minus 1.
So the derivative of P to the minus 1 is minus 1.
P to the minus 2 times dP dt.
That's the chain rule.
P to the minus 1, the derivative is minus 1, p to
the minus 2, and the derivative of P itself.
And now I know dP dt.
Now I'm going to use my equation.
So that's cP minus sP squared with a minus.
Oh, I can't lose that minus.
Put it there.
Keep your eye on that minus.
Divided by P squared.
So now I'll use the minus.
That looks like an s to me.
Minus minus is plus s.
And what do I have here?
Minus cP over P squared.
I think I have minus c/P. And you say OK, true.
But what good is that?
But look, that 1/P is our y.
So now I have s minus cy.
The equation for y, the dy dt equation turns out to be
linear with a source term s just as in the
start of the lecture.
And the growth rate term has a minus c, which we expect.
Because our y is now 1 over.
When this growth is going up exponentially, 1 over it is
going down exponentially.
And it turns out that same c.
In other words, we can solve this equation.
In fact, we have solved this equation just for--
shall I write down the answer?
So the answer for y.
You remember the answer for y is--
I'm going to look over here.
Up there.
This is our equation, the only difference is c is coming in
with a minus sign.
So I'm just going to write that same solution,
just copy that here.
y of t.
Now c is coming in with a minus sign, is
y of 0 minus s/c.
c has that minus sign.
e to the minus ct.
OK, good.
That's the solution for y.
So we solved the equation.
You could say, well, you solved the equation for y.
But now P is just 1/y.
Or y is 1/P. So I just go back now and change from y back to
P. 1 over P of t is--
here I have 1 over P of 0.
Is it OK if I leave the solution in that form?
I can solve for P of t and get it all-- you get P of t equals
and a whole lot of stuff on the right side.
I move this over.
I have to flip it upside down.
It doesn't look as nice.
Well, I guess I could.
I could move that over and then just put
to the minus 1 power.
That would do it.
And that is the solution.
Maybe I should do that.
P of t is--
I'm going to move this over.
So this same parenthesis times e to the ct plus s/c.
I moved that over.
And then I say I have to flip it.
So it's 1 over that.
1 over all that stuff, where this is just this
stuff copied again.
So we get an expression but to me, that top one
looks pretty nice.
And graphing it is no problem.
And that's what the graph looks like.
It's that famous s curve.
What we've solved here was the population equation and it's
often called the logistic equation.
I mention that word because you could see it there as the
heading for this particular model.
So let me let you leave open everything we've done today.
But maybe I can say the most interesting aspect is the
model itself.
To what extent is it accurate?
We could try it.
We could estimate c and s, those numbers, to fit the
model of what we know over one time period.
And then we could see, does it extend over
another time period?
I was going to say about Wikipedia.
And generally, Wikipedia is not too bad.
They made one goof, which I thought was awful.
The question was, what's the growth rate?
Actually, Wikipedia doesn't discuss
this particular equation.
It tells you a lot of other things about population.
Of course, they talk about the growth rate and at one point
they say at one time, it was 1.8%.
I say 1.8% is not a growth rate.
Growth rate, c, don't have--
they're not percentages.
Their units are 1 over time.
And maybe I could make that point, emphasize that point.
When I see ct together, that tells me that has the
dimension of time, of course.
So c must have the dimensions of 1 over time.
The growth rate is 1.8% per year.
And I will admit that three lines later on Wikipedia, when
they're referring to an earlier growth rate earlier in
the last century, they do say 2.2% per year.
They get it right.
The units are 1 over time.
The solution is telling us that and the equation is
telling us that.
This has the dimensions of population, number of people.
So does this.
I'm dividing by a time.
So c must be the source of that division by a time.
The units of c must be 1 over time.
You might like to figure out the units of s because in an
equation, everything has to have the same units, the same
dimension to make any sense at all.
So with that little comment, let me emphasize
the interest in just--
if you have a project to do, this could be a quite
remarkable one.
Now just I'll write down, but not solve--
since I have a little space and mathematicians tend to
fill space--
I'll write down one more equation.
Actually, it will be two equations because it's a
predator and a prey.
A hunter and a hunted.
And in ecology, or modeling, whatever.
Foxes and rabbits, maybe.
We might have these equations, the predator
and the prey equation.
And what would that look like?
So we have two unknowns.
The predator.
Can I call that u?
So I have a du dt.
What's the growth of the predators, the number or the
population?
These are both populations, but of two different species.
And the prey will be v. So u is the
population of the predator.
If the predator has nothing to eat, the populations of
predator is going to drop.
But the more prey that's around--
so here we'll have a u times v going positive.
So we'll have something like a minus cu as a term that if
there's nothing to eat, if that's all there is, if the
prey is all gone, the predator will die out.
But when there is a predator, there will be a source term
proportional to u and v. The more predators there are,
they're all eating away.
And the more prey there is the more they're eating.
And now what about dv dt?
OK, v is a totally different position.
I guess it's getting eaten.
So this term, well, I'm not sure what all the
constants are here.
The prey, this is now the prey, the little rabbits.
They're just eating grass.
Plenty of grass around.
So they're reproducing.
So they have some positive growth rate, capital C.
Multiple per year.
But then they will have a negative term as we saw in
population coming from the competition with a predator.
So this would be a model, a predator-prey model that also
shows up in many applications of mathematics.
So there you see two linear differential equations.
The simple one dy dt we'll see y.
We totally know how to solve that.
Now with a source term s, we're OK, and we got the
solution there and we found it a second way.
Then thirdly was the main interest, the population
equation, the logistic equation with a P squared,
which we were able to solve and graph the solution.
That s curve is just fantastic.
If you want a challenge, check that this--
so what do I mean at that inflection point?
What's happening there?
I claim that at this value of P, the curve stops bending up,
starts bending down, which means second
derivative of P is 0.
You could check that.
Take the equation, take its derivative to get the second
derivative.
Then that'll involve dP dts over here.
But then you know dP dt, so plug that in.
And then finally, you'll get down to P's.
And I think you'll find that the thing cancels itself out.
The second derivative, the bending in the s curve, is 0
at c over 2s.
So that's the moment of fastest growth.
And maybe that happened relatively recently.
And we're slowing down, but we've got a long way to go.
So roughly, I think the population now is
just under 7 billion.
And oh boy, if we just left--
if it was 7 billion at that point, it would be 14 billion
at the end.
I think we're a better further along now at 7 billion.
7 billion's somewhere about here.
So maybe the end with this model is more like 10 or 11
billion as the population of the earth at t equal infinity.
OK, that's a mathematical model.
Thank you.
ANNOUNCER: This has been a production of MIT
OpenCourseWare 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.