Welcome to calculus. I'm Professor Ghrist, we're about to begin lecture 18, on a simple ODE. >> In this lesson we're going to do one thing and one thing only. We're going to look at a simple single differential equation. Consider some of its many applications. This is the subject of today's lesson, dx/dt equals a times x where a is a constant. This is a linear autonomous ordinary differential equation. It is extremely important that you know this and its solution, x equals the initial condition x nought times e to the at. And what does this solution mean? What does it look like? Well, at time, t equals 0, it passes through x nought, the initial condition. What it does from there depends on a. If a is positive then you get what is called exponential growth. You get an exponential function in t that is growing as t increases. On the other hand, if a is negative then you have exponential decay. Where the values of x are getting closer and closer to zero over time. Much of the importance of this equation comes from its ubiquity in modeling processes. You may have seen this equation used to model radioactive decay. If you look at, say, the radioactive isotope of carbon, carbon-14, then the amount i of that isotope changes to a degree that is proportional to i where that constant of proportionality is negative. Likewise if you look at the amount of a drug or medicine that is in a body, this changes over time according to the same differential equation. Though perhaps with a different constant of decay. Both of these have negative coefficients and thus connote an exponential decay. There are some situations where you have exponential growth, however. If we look at the most simplistic model for population growth, one in which the size of the population, P changes at a rate proportional to P, that constant of proportionality is a birth rate. And this doesn't work so well for modeling human populations, but for certain settings, it's reasonable. On the other hand, continuously compounded interest is a fairly realistic model, at least in the short term. It says that the rate of change of the amount of money you have invested is proportional to how much is there. What is that constant of proportionality? Well, that is an investment rate. But what do we mean by continuous compounding? Let's assume an annual interest rate of r and an initial investment of money at time 0. If we were to compound our interest yearly, then after one year, the amount of money we would have would be our initial investment plus that initial investment times the annual interest rate. We could write that as the initial investment times quantity (1 + r). If however, we compounded that interest monthly, then what would we get? After one year we would have the initial investment times quantity (1 + r/12), which is how much we would earn in January. Then we would multiple all of that by quantity (1 + r/12) at the end of February. We would continue on until the end of the year, giving another factor of (1 + r/12). That means at the end of the year we would have the initial investment times quantity (1 + r/12) to the 12th power. That's actually a little bit more than we would get from an annual compounding. Now, of course≤ monthly compounding is maybe not so accurate because they have different days per month, so we can do it daily and get the initial investment times quantity (1 + r/365) to the 365th power. I think you can see where this is going. If we take the limit, then after one year we get the initial investment times the limit as n goes to infinity of quantity (1 + r/n) to the nth power. Now I know you've seen that limit before. You may recall that it is, in fact, e to the r. This is a hint that the standard linear differential equation is really behind what's happening in continuous compounding. Let's see how that falls out. If we look at the amount of money at time t plus a small increment, 1/n. Then according to our previous reasoning this is the money at time t times quantity (1 + r/n). What we want to do is compute a limit as n goes to infinity. Now let's change variables a little bit, and instead of looking at n going to infinity, let us replace 1/n by h, where h is a small amount going to zero. Then the amount of money at time t + h is, from the above, the amount of money at time t times quantity 1 + r times h. And now, expanding out that multiplication, we see a familiar sight from our definition of a derivative. The coefficient in front of the h term tells us the derivative of the amount of money, function of t. And so we can see the differential equation, d dt of the amount of money equals r times the amount of money. That is our standard differential equation. Now there are many applications of this equation that go far beyond radioactivity and population and money. Let's look at an unusual one coming from linguistics. If we read English poetry from antiquity, we'll see some unfamiliar words. And if you look at Chaucer, the Canterbury Tales, many of the words are unfamiliar to us. But if we move the clock ahead to Shakespeare's time, then some of that poetry is familiar. Some is unfamiliar. Moving ahead a little bit further to Milton, things are still a little obtuse but more, the words make sense, and we could keep going with Blake and others. What we might guess is the following linguistic model. Namely, that the number of words in English remaining in common use decreases at a rate proportional to the remaining words. That means that words fall out of use. But this model states that words fall out of use according to a linear differential equation where W is the amount of words remaining in usage and alpha is a decay constant. Assuming this model, let's answer the following question. If we find 20% of the words in Milton's poem to be unusual, then what fraction of Chaucer's poetry did Shakespeare's audience recognize? Whew, that sounds difficult. What can we do with that? Well, let's say that t corresponds to the year. We're going to be interested in two functions of t. The first, W sub M, is the number of words in Milton's usage currently used at time t. That is, according to the solution to this differential equation, W sub M at 1667, the initial condition, times e to the minus alpha times the number of years that have elapsed since 1667. Likewise, we'll be interested in W c of t, the number of words from Chaucer's time still in common usage. This has the same solution with 1667 being replaced by 1400. Most importantly, the alphas are assumed same because this is all English. Now what is it that we are given? We are told that the number of words from Milton's time in common use today, let's say in 2012, is 80% of those originally available. Plugging in the solution to the differential equation for W sub M when t equals 2012, and then dividing by the initial condition gives us a single equation that has only alpha as an unknown. We can therefore solve for alpha and we get a quantity that is about 6.5 times 10 to the -4. Now, if we use that alpha in our solution for W sub C of t, then what can we get? Well, our goal is to find the fraction of words from Chaucer's time that people in Shakespeare's time would have understood. That is, W c of 1600 divided by W c of 1400. Plugging in our solution to the differential equation for W sub C gives us an answer of e to the negative 200 alpha. Since we know alpha we can compute it. It's about 0.88. Meaning that about 88% of Chaucer's words would have been recognizable to Shakespeare's audience. Well, that's pretty cool. But is that actually true? Well, I don't think so. This simple model that we've written down ignores so many features of linguistics, such as the creation of new words. Such as the evolution of words. Words are constantly changing their meaning. So that even though a word does not fall out of common usage, it's really a different word with an altogether different meaning. Lastly, there is whole scale evolution of language. I'm speaking American English which is in some respects very different then British English. If you look at, say, computer languages, you can see, even over short time scales, very rapid evolution in the language itself. This brings us to an important conclusion, that, even though our mathematics was perfectly accurate, a perfectly accurate solution is only as good as the model on which it's based. If you have a bad model, it doesn't matter how good your math is, you can't conclude truth. So with that in mind, let's talk about zombies, and we'll model the zombie apocalypse as follows. The rate of change of the infected population is proportional to the uninfected population. If we denote by u(t) the uninfected population, and z(t), the infected population, then p, the net population size, is a constant. That is u plus z equals p. Our model says that dZ/dt, the rate of change of the infected population, is proportional to u, that is P- Z, that constant of proportionality we'll call r. Now, what is happening to dU/dt? Let's think about that. U is P- Z. So differentiating gives us dU/dt = dP/dt- dZ/dt. Now, dP/dt, we know is 0, since P is constant. And we know dZ/dt = rU. And so we see that our zombie model is really just the linear differential equation in disguise for the uninfected population. We know the solution U(t) is the initial condition, U nought, times e to the -rt. That means that the solution for the zombie population, Z(t) is P- U(t), that is, P- U nought e to the -rt. Unfortunately, as t goes to infinity, this means that everyone is a zombie. Now, before you dismiss this differential equation as being ridiculous for modeling zombies, consider. It may also be used to model the spread of disease, or the spread of propaganda, or the adoption of new technology in a population. This simplistic equation is not rich enough to really model these complex phenomena. But it's a good first approximation. It's even better when applied to heat. Newton's law of heat transfer is essentially the same equation. It says the rate of change of temperature with respect to time is proportional to the difference in temperature with the ambient environment. So in our zombie equation, this constant of proportionality r was an infection rate, and P was a constant population size. In Newton's law of heat transfer, the constant is a thermal conductivity. How easy is it for heat to spread? And the constant A is an ambient temperature. Same equation, very different interpretations. That's one of the beauties of differential equations. And so we see one simple differential equation gives rise to so many applications. But what happens if we change that differential equation? How will we determine the solution? What is it going to be good for? In our next lesson, we'll consider some other classes of ordinary differential equations, their solutions, and their applications.