\(\def\ans#1{\bbox[border:1px solid green,6pt]{#1}}\)

Introduction to Differential Equations

We now come to one of the most widely-used areas in all of mathematics: differential equations. Of course, you may go on to take an entire course (or several) in differential equations, but we've gotten to the point where we can discuss them, and I believe that the more you see of these before going into those courses, the more prepared you'll be. The natural first question, of course, is: what is a differential equation? As the name suggests, it's an equation involving a derivative. For instance, \[y'=y\] is a differential equation.

We can use this simple example to get an idea of our goal. Notice, first of all, that the equation involves \(y\) and its derivative, so \(y\) must be a function. Therefore, there's an implied independent variable (usually \(x\) or \(t\)). Also, notice that all we're given is a relationship between this function and its derivative; we're not told explicitly what the function is. This brings us to our goal: our goal is to figure out what this function is. In Calc I, we were given a function and asked to find its derivative. In Calc II, much of our effort has been spent in reversing this process; given a derivative, we integrate to find the function. A differential equation is related, but it's different than either: here we're not given the function or its derivative, but rather a relationship between them, and we want to find the function \(y\).

I should warn you of a common rookie mistake: you might be tempted to do the following:

\[\begin{align} y' &= y\\ \int y' \ dy &= \int y \ dy\\ y &= \dfrac{1}{2}y^2 + C \end{align}\]

Although this actually looks similar to a method that we'll see later for solving differential equations, it's not valid. Can you spot the error? Notice that in doing this, we tried to integrate with respect to \(y\), which of course is wrong, since \(y\) is an unknown function of \(x\) (or possibly \(t\), but what we name the independent variable is irrelevant). Thus, we cannot integrate with respect to \(y\), making this integral meaningless. I caution you to avoid this mistake.

Solution to This Example

What, then, is this function \(y\)? You may have spotted the answer already, but if not, let me rephrase the problem: what function \(y(x)\) is equal to its derivative? The answer should be clear now; the only function that works is the exponential function. If \(y=e^x\), then \(y'=e^x\), so \(y'=y\). In fact, the general solution (we'll get to specific solutions later) to this problem is \[y=Ce^x.\]

When we get to actually solving diff eq later, we want to take advantage of the fact that we can (as we did here) check our answer by plugging it back into the differential equation and verifying it.

Applications

In general, we don't study differential equations for their own sake (although I must confess that I find them to be very fun), but rather because they are tremendously applicable. Whenever you study something that you'd like to model, and you find something out about how it is changing over time, there's a differential equation buried there. To illustrate this, I'll go through a few examples, showing differential equations that are associated with different applications. I'll give you the solutions for some, but for others we'll simply make a few observations. Don't worry if this isn't perfectly clear at the moment; if you'd like, you can come back and reread this section after you've gotten more comfortable with diff eq. No doubt it will be clearer then.

Population Models

Suppose we want to measure some population over time. This could be the population of a city, a country, the world, or the population of deer in a forest. Let's call this unknown function \(P(t)\). One simple observation we can make is that the rate of change of the population depends on the size of the population.

Simple Model

A simple model assumes that the rate of change of the population is simply proportional to the size of the population (thus, it equals a constant multiple of the population size):

\[P' = kP\]

Clearly, if \(k\) is positive, the rate of change is positive, so the population is increasing; if \(k\) is negative, the population is shrinking. Without going into how to solve this one, I'll tell you that the solution is \[P(t) = Ce^{kt}.\] We can check this: \[P(t) = Ce^{kt} \longrightarrow P'(t) = kCe^{kt} = kP(t)\]



This model is a good place to start, but it's far too simplistic to be of long-term use; looking at the graph above, it is clear that this model predicts that the population will increase without bound, which ingnores the presence of limiting factors. In reality, limited resources will lead to a slowing in the growth of the population.

Better (More Complicated) Model

Let's take a look at a slightly more complicated model of population growth. This one will take these limitations into account: \[P' = aP(1-kP)\] for some positive constants \(a\) and \(k\).

We won't see the details of the solution to this one, for sake of simplicity at this stage, but we can make one observation: we can see when the population will be growing and when it will be shrinking. Since \(a\), \(k\), and \(P\) are all positive, \(P'\) will be positive as long as \(1-kP\) is positive, and \(P'\) will be negative when \(1-kP\) is negative. Rearranging terms to solve for \(P\): \[1-kP > 0 \longrightarrow 1 > kP \longrightarrow P < \dfrac{1}{k}.\]

Therefore, whenever the population is below a certain point (\(1/k\) to be precise), the population is growing, but if the population is higher than that point, it will shrink. If the population is exactly equal to that value, \(P'\) will equal 0, so the population will remain unchanged.



For example, in the graph above, this limiting value is 100. If the population starts below this value, it increases toward it; if the population starts above it, it decreases to this limit. In other words, this is the natural population level for this habitat.

Newton's Law of Cooling

Suppose you leave a hot cup of coffee on a counter; you know that the cup will cool down, but it will only cool to the temperature of its surroundings (we'll call this \(T_m\), where m stands for the medium, another word for surroundings). This represents the limiting value, similar to the limiting population value in the model above. Specifically, Newton's Law of Cooling looks like \[T' = -k(T-T_m),\] where \(k\) is some positive constant (note: some people write this model without the negative sign, and let \(k\) be a negative constant).

Here again, I'll show you the solution without describing how we find it (that'll have to wait until we have some methods for solving diff eq). The solution is \[T(t) = T_m + (T_0 - T_m) e^{-kt},\] where \(T_0\) is the initial temperature. Let's check the solution; this can be hard to keep track of algebraically, but we'll do so by finding \(T'\) and \(-k(T-T_m)\), and showing that these are equal. \[\begin{align} T' &= -k(T_0 - T_m)e^{-kt}\\ -k(T-T_m) &= -k[(T_m + (T_0-T_m)e^{-kt}-T_m] = -k(T_0 - T_m)e^{-kt}\\ \implies T' &= -k(T-T_m) \end{align}\]

Spread of Epidemics

One model for measuring the spread of epidemics tracks the members of the population who are infected and those who are susceptible (including the infected). Obviously, there are many complexities that can be added, from whether someone who survives can be re-infected or develops an immunity to whether or not a vaccine exists. However, our simple model assumes that the number of infected changes in proportion to the product of those who are and those who aren't but could be: \[I' = rI(S-I),\] where \(r\) is the rate of infection.

Newton's Second Law of Motion

Recall: Newton's Second Law of Motion states that the force on an object is proportional to the acceleration of that body, where the constant of proportionality is its mass1: \[F=ma.\]

Consider a simple vibration model (like a car's suspension). There are three basic components to this model: a mass, a spring, and a damper. The damper (a shock) behaves like a simple bicycle pump: if you've ever used one, it shouldn't be surprising that the force on the damper is proportional to the speed with which it is traveling (\(x'\)). And we've already seen that the spring force is proportional to the displacement \(x\). Therefore, according to Newton's Second Law, the sum of the damper force, spring force, and possibly some external force equal the mass times acceleration: \[-cx'-kx+f(t) = mx''.\] Note that the spring and damper forces are both negative, since they both act in opposition to the motion.

Rearranging the terms: \[mx'' + cx' + kx = f(t).\] This is the first example we've seen of a second-order differential equation; this one involves the second derivative of \(x\). At the end of this unit, we'll learn how to solve second-order equations like this one.

General Features

In general, a differential equation involves an unknown function (or several) and its (or their) derivative(s). The highest-order derivative in the equation gives the order of the diff eq (meaning that all of the examples in this section except for the last were first order). Although we'll learn some methods to solve simple diff eq, you should know that the majority of these equations do not yield to these analytical methods. We'll shortly get to other ways of analyzing differential equations that we can't explicitly solve.

Our goal is to find this unknown function, or if that isn't possible, to analyze it more qualitatively.

Initial Value Problems

Let's go back to the simple population growth model: \[P' = kP \longrightarrow P(t)=Ce^{kt}.\] I pointed out that this solution is the general solution. So what's a specific solution? This general solution is really a family of solutions, where different values of \(C\) give different specific solutions. The key is that the value of this constant can be found if we know the initial value. If the population when \(t=0\) is \[P(0) = P_0\] then \[P_0 = Ce^{k \cdot 0} = C,\] so the specific solution is \[P(t) = P_0e^{kt}.\]

This is an example of an initial value problem. In general, when we solve a differential equation, we'll find the general solution, which will contain one or more arbitrary constants (specifically, a second order diff eq will have two constants, etc.), and to find a specific solution, we'll need an initial condition like this.


Footnotes

1. More precisely, Newton's Second Law of Motion states that the force on an object is equal to the rate of change of that object's momentum (momentum is defined as mass times velocity: \(p=mv\)). Using the product rule: \[F = \dfrac{dp}{dt} = \dfrac{d}{dt}[mv] = \dfrac{dm}{dt}v + m\dfrac{dv}{dt}.\] If mass is constant, this simplifies to the familiar form of \(F=ma\). This is the case for many applications, but there are some, such as the launching of a rocket, where the mass is changing and the more general version of this law must be used.