1.1 Classifying Differential Equations: Origins and Applications
Engineers rarely know a quantity directly. What they usually know is how fast that quantity changes. A capacitor charges faster when it is nearly empty. A hot part cools faster when it is much hotter than the room. A spring pulls harder the more you stretch it. Each of these statements is about a rate of change, and a rate of change is a derivative. Write the statement as an equation and you get a differential equation.
This first section has two goals. First, we learn to sort differential equations into types. This matters because the solution method depends on the type, so the first thing you do with any new equation is classify it. Second, we see where differential equations come from: physical laws, geometric conditions, and families of curves.
What is a differential equation?
The definition is short.
A differential equation is an equation whose unknown is a function (or several functions) and in which derivatives of that unknown appear. The unknown functions are the dependent variables; the variables we differentiate with respect to are the independent variables.
The unknown is a function, not a number. That is the key difference from the algebraic equations you met in school. In the unknown is a number. In the unknown is a whole function .
One small point: an equation that is true for every function is not counted as a differential equation. For example, the chain-rule formula contains derivatives, but it is an identity. It holds no matter which differentiable function is, so there is nothing to solve.
Here are seven differential equations. We will use them throughout the section.
They look very different. Some have one independent variable, some have two. Some contain only first derivatives, some contain fourth derivatives. Some contain products like or functions like . We now introduce three ways to sort them.
Ordinary versus partial
The first question is: how many independent variables are there?
In an ordinary differential equation (ODE) every unknown function depends on just one independent variable, so only ordinary derivatives such as occur.
In a partial differential equation (PDE) the unknown function depends on two or more independent variables, and partial derivatives such as occur.
In the list above, (A), (C), (F) and (G) are ODEs with independent variable (or, for (G), an unnamed variable, usually time ). Equation (B) is also an ODE: its independent variable is and its dependent variable is . Do not let the letters fool you. The letter is often the independent variable, but in (B) it is the unknown displacement of a vibrating mass.
Equations (D) and (E) are PDEs. In (D) the temperature depends on position and time ; this is the heat equation for a thin rod. In (E) the displacement of a string depends on and ; this is the wave equation. PDEs are important in engineering, but they need tools built on top of ODE theory. In this course we study ODEs only.
Order
The second question is: what is the highest derivative?
The order of a differential equation is the order of the highest derivative that appears in it.
Equation (A) is first order. Equations (B), (C) and (G) are second order. Equation (F) is fourth order. For the PDEs, (D) is second order (because of , even though the time derivative is only first order), and (E) is second order.
Order is about the highest derivative, not the highest power. In the first derivative is cubed, but there is no second derivative, so the equation is first order. In the same way, is a second derivative squared: it makes an equation second order, not fourth order.
Every ODE of order in the unknown can be written in the general form
where is some function of variables. For example, (C) has . When we can solve for the highest derivative, we get the normal form
For first-order equations the normal form is simply . This form will be the star of Section 1.3.
Linear versus nonlinear
The third question is the most important one for choosing a method: is the equation linear? Linear equations have a rich, complete theory, and many of them can be solved exactly. Nonlinear equations are usually much harder.
Let be the unknown. An ODE of order is linear if some algebra brings it to the shape
where is not identically zero. The functions are the coefficients, and is the right-hand side (or forcing term). An ODE that is not linear is called nonlinear.
Look closely at what the coefficients are allowed to depend on: only . They may be any functions of at all, such as , or . What matters is how and its derivatives appear. In practice you check three things.
- Powers. Each of appears only to the first power. No , no , no .
- Products. No two of them are multiplied together. No , no .
- Functions. None of them sits inside another function. No , no , no .
If all three checks pass, the equation is linear. If any one fails, it is nonlinear.
Let us apply the test to the ODEs in our list.
- (A) . Here , , . The factor is fine because it depends only on . Linear.
- (B) The unknown is . The coefficients , , are constants and . Linear.
- (C) The term is a product of the unknown with its second derivative, and is a square. Nonlinear (it fails two checks).
- (F) , , all other coefficients are zero, and . Linear.
- (G) The unknown sits inside . Nonlinear. This is the equation of a swinging pendulum; we will see later that replacing by for small swings gives a linear equation.
Think of the left-hand side as a machine that takes in a function and returns . Because derivatives of sums are sums of derivatives, this machine satisfies for any constants . That is exactly what "linear" means in linear algebra. A term like breaks this rule, because .
Two finer labels
Linear equations are sorted further in two ways.
- Constant or variable coefficients. If every is a constant, the equation has constant coefficients, like (B). If at least one really depends on , it has variable coefficients, like (A) and (F). Constant-coefficient equations are the easiest to solve; Chapter 4 is built around them.
- Homogeneous or nonhomogeneous. If for all , the linear equation is homogeneous. Otherwise it is nonhomogeneous. In engineering, is usually an external input: an applied voltage, a driving force, a heat source.
Linearity is about the dependent variable only. The equation is perfectly linear, even though , and are "nonlinear functions" of . On the other hand, is nonlinear even though it looks very simple.
Worked examples: classification
For each equation, state whether it is an ODE or a PDE, give its order, and, for ODEs, say whether it is linear or nonlinear.
(a) (b) (c) (d)
Solution
- (a) One independent variable, so it is an ODE. The highest derivative is , so the order is 3 (the square does not change the order). The term fails the "powers" check, so the equation is nonlinear.
- (b) An ODE of order 2. The coefficients , and depend only on , and appear to the first power with no products. So it is linear, with variable coefficients. The right-hand side is , so it is also homogeneous.
- (c) An ODE of order 1. The unknown appears inside , so it fails the "functions" check: nonlinear. (The is harmless.)
- (d) The unknown depends on and , and partial derivatives appear: a PDE of order 1. (It is also nonlinear because of the product of the two derivatives, but we leave PDE classification aside.)
Classify the following ODEs. Be careful: each one hides a small trap.
(a) (b) (c)
Solution
- (a) Expand first. By the product rule, So the equation is . This is a second-order, linear, homogeneous equation with variable coefficients. The trap: the equation contains only one visible prime, yet it is second order.
- (b) Coefficient that depends on . The factor in front of is . Multiplying out gives , and the term is a product of the unknown and its derivative. So the equation is second order and nonlinear. The trap: coefficients of a linear equation may depend on only.
- (c) Differential form. Equations are often written with and separately. If we regard as the unknown function of , divide by : This is first order and linear in . The trap: if we instead regard as a function of and divide by , we get , which contains the product and is therefore nonlinear in . Linearity depends on which variable is the unknown. Unless told otherwise, we always take as the unknown function of .
Where do differential equations come from?
There are two main sources. The first is science: physical laws are almost always statements about rates. The second is geometry: conditions on slopes of curves, and families of curves, lead directly to differential equations.
From physical laws
The recipe is always the same. Identify the quantity that changes. Write its rate of change as a derivative. Use the physical law to express that rate in terms of the quantity itself (and perhaps time). Here are four laws you will meet again and again.
- Newton's law of cooling. An object at temperature sits in surroundings at constant temperature . The law says the cooling rate is proportional to the temperature difference: The minus sign makes decrease when . For a machined part in a workshop with , the model is : a first-order, linear, constant-coefficient ODE.
- Newton's second law for a mass on a spring. Mass times acceleration equals total force. With spring force , damping force and an applied force , This is second order and linear. Chapter 5 is devoted to it.
- Kirchhoff's voltage law. Around a closed loop, the voltage drops add up to the applied voltage. This gives linear ODEs for currents and charges in circuits (see Example 1.1.3).
- Torricelli's law. Water leaves a hole at the bottom of a tank with speed , where is the water depth. If the tank has cross-sectional area and the hole has area , the volume decreases at the rate (hole area) (speed): Because of , this model is nonlinear. Nature does not promise linear equations.
Every model involves simplifications. We ignore air resistance, assume the room temperature stays fixed, treat a wire as having zero resistance. A good model keeps the effects that matter and drops the rest. Its ODE is exact for the simplified system, not for the real one, and the skill lies in choosing which effects to keep.
A series circuit contains a battery, a resistor and an inductor . Derive the differential equation for the current and classify it. Then check that satisfies the equation and .
Solution
- Voltage drops. The drop across the resistor is (Ohm's law). The drop across the inductor is .
- Kirchhoff's law. The sum of the drops equals the battery voltage:
- Tidy up. Multiply both sides by : This is a first-order, linear, nonhomogeneous ODE with constant coefficients.
- Check the given current. From we get . Then Also . As the current approaches , which is just Ohm's law once the inductor stops resisting change. In Chapter 2 you will learn how to find this solution rather than just check it.
From geometric conditions
The derivative is the slope of the tangent line to the curve . So any condition on tangent lines becomes a differential equation.
A curve lies above the -axis and has the following property: at every point of the curve, the tangent line meets the -axis at the point . Find a differential equation satisfied by the curve.
Solution
- Slope of the tangent. The tangent line at has slope .
- Slope from two points. The same line passes through and , so its slope is also
- Equate the two slopes. This is a first-order linear ODE. You can check that every curve with satisfies it: .
From families of curves: eliminating constants
Here is a different point of view. Take a formula with an arbitrary constant, such as . Each value of gives one curve, so the formula describes a whole family of curves. Can we find one differential equation that all of these curves satisfy, no matter which we choose?
Yes. The idea is to differentiate and then eliminate the constant. A family with one constant needs one differentiation. A family with two constants needs two, and so on.
- Start with the family, containing arbitrary constants.
- Differentiate it times with respect to . You now have equations.
- Use these equations to eliminate all constants. What remains is a relation among : an ODE of order .
Find a differential equation satisfied by every curve of the family .
Solution
- Differentiate once. .
- Solve the family for . From , for ,
- Substitute into .
- Clear the fraction. Multiply by and move everything to one side: The constant is gone. This first-order linear ODE is satisfied by every member of the family.
- Check. With and : .
Find a differential equation satisfied by every function , where and are arbitrary constants.
Solution
- Differentiate twice. Two constants, so we need two derivatives:
- Look for a combination that kills the constants. We want numbers and such that for all . Collect the terms and the terms:
- Set both brackets to zero. Subtract the first equation from the second: , so . Then .
- Result. This is a second-order, linear, homogeneous ODE with constant coefficients.
- Check with . gives . With : . Because the equation is linear, any combination works too.
Examples 1.1.5 and 1.1.6 show a pattern: a family with arbitrary constants leads to an ODE of order . Most of this course runs the process backwards: we are given the ODE and want to recover the family. Section 1.2 makes this precise with the idea of an -parameter family of solutions.
Exercises
In Exercises 1–7, state whether the equation is an ODE or a PDE, give its order, and (for ODEs) decide whether it is linear or nonlinear.
-
Answer
ODE, order 2, linear (variable coefficients, nonhomogeneous). -
Answer
ODE, order 1, nonlinear (cube of ). -
Answer
PDE, order 2. -
Answer
ODE, order 5, linear, homogeneous, constant coefficients. -
Answer
ODE, order 2, nonlinear ( inside a square root). -
Answer
ODE, order 3, linear, homogeneous, variable coefficients. -
Answer
ODE, order 2, nonlinear ( inside the exponential). - Find a differential equation satisfied by every curve .
Answer
- Find a differential equation satisfied by every function . Hint: look for an equation of the form .
Answer
- Find a differential equation for the family of circles of radius whose centres lie on the -axis, . Is it linear?
Answer
; first order, nonlinear. - A vertical cylindrical tank has cross-sectional area and a hole of area at the bottom. Using Torricelli's law with , write the ODE for the water depth and classify it.
Answer
; first order, nonlinear. - A cup of tea at is placed in a room. Write Newton's law of cooling with , and check that satisfies it and .
Answer
. With the given : and ; .