Differential Equations
Units and Topics
Unit 3. Second Order Linear Equations
3.2 Constant Coefficients: Real Roots
A homogeneous linear equation with constant coefficients has solutions of the form ert. The number r is a root of a quadratic equation that is read directly from the differential equation. This topic covers the characteristic equation, the general solution for two different real roots, the initial conditions, and the behavior of the solutions after a long time.
You need Topic 3.1 for this topic. The topic uses the quadratic formula and the derivatives of exponential functions.
1. The Characteristic Equation
The equation of this topic is
ay″ + by′ + cy = 0with constants a, b, and c, where a is not 0. A solution must have derivatives that are multiples of the function itself, so that the three terms can cancel. The exponential function has this property. The method substitutes y = ert with an unknown constant r.
y = ertthe trial functiony′ = rertthe first derivativey″ = r²ertthe second derivativear²ert + brert + cert = 0substitute in the equation(ar² + br + c)ert = 0factor out ertar² + br + c = 0ert is not 0 at any timeThe characteristic equation. The function y = ert is a solution of ay″ + by′ + cy = 0 exactly when ar² + br + c = 0. This quadratic equation is called the characteristic equation.
The characteristic equation is read from the differential equation: y″ becomes r², y′ becomes r, and y becomes 1.
| Differential equation | Characteristic equation | Roots |
|---|---|---|
| y″ + 3y′ + 2y = 0 | r² + 3r + 2 = 0 | −1 and −2 |
| y″ − y = 0 | r² − 1 = 0 | 1 and −1 |
| y″ − y′ − 6y = 0 | r² − r − 6 = 0 | 3 and −2 |
| 2y″ + 5y′ + 2y = 0 | 2r² + 5r + 2 = 0 | −1/2 and −2 |
| y″ + 2y′ = 0 | r² + 2r = 0 | 0 and −2 |
2. Two Different Real Roots
When the characteristic equation has two different real roots r₁ and r₂, the functions er₁t and er₂t are both solutions. Their Wronskian is
W = er₁t(r₂er₂t) − r₁er₁ter₂tW = y₁y₂′ − y₁′y₂W = (r₂ − r₁)e(r₁ + r₂)tfactor out the product of the exponential functionsThe roots are different, so the Wronskian is not 0, and the two functions are a fundamental set.
Two different real roots. When ar² + br + c = 0 has the real roots r₁ and r₂, and r₁ is not equal to r₂, the general solution of ay″ + by′ + cy = 0 is y = c₁er₁t + c₂er₂t.
3. A Complete Example
Solve y″ + 3y′ + 2y = 0 with the initial conditions y(0) = 1 and y′(0) = 1.
r² + 3r + 2 = 0the characteristic equation(r + 1)(r + 2) = 0factor the left sider₁ = −1 and r₂ = −2the rootsy = c₁e−t + c₂e−2tthe general solutiony′ = −c₁e−t − 2c₂e−2tits derivativec₁ + c₂ = 1the condition y(0) = 1−c₁ − 2c₂ = 1the condition y′(0) = 1−c₂ = 2add the two equationsc₂ = −2multiply by −1c₁ = 3from c₁ + c₂ = 1y = 3e−t − 2e−2tthe solutionThe check substitutes the solution in the equation.
y′ = −3e−t + 4e−2tthe first derivativey″ = 3e−t − 8e−2tthe second derivativey″ + 3y′ + 2y = (3 − 9 + 6)e−t + (−8 + 12 − 4)e−2tcollect the terms with e−t and with e−2ty″ + 3y′ + 2y = 0both parentheses are 0The solution starts at 1, rises to a largest value, and then approaches 0. The largest value is at the time at which y′ = 0.
−3e−t + 4e−2t = 0the condition y′ = 04e−2t = 3e−tmove one term to the right sidee−t = 3/4divide both sides by 4e−tt = ln(4/3)take the natural logarithm, so t = 0.288y = 3(3/4) − 2(9/16)substitute e−t = 3/4 and e−2t = 9/16y = 9/8the largest value, which is 1.1254. The Quadratic Formula and the Three Cases
When the characteristic equation does not factor easily, the quadratic formula gives the roots.
r = (−b ± √b² − 4ac)/2aThe expression b² − 4ac under the root is called the discriminant. Its sign decides the kind of the roots.
| Discriminant | Roots | Topic |
|---|---|---|
| b² − 4ac is positive | Two different real roots | This topic |
| b² − 4ac is 0 | One repeated real root | Topic 3.3 |
| b² − 4ac is negative | Two complex roots | Topic 3.3 |
An example with the quadratic formula
Find the general solution of y″ − 2y′ − y = 0.
r² − 2r − 1 = 0the characteristic equation, with a = 1, b = −2, and c = −1b² − 4ac = 4 + 4the discriminant is 8, which is positiver = (2 ± √8)/2the quadratic formular = 1 ± √2because √8 = 2√2y = c₁e(1 + √2)t + c₂e(1 − √2)tthe general solutionThe roots are about 2.414 and −0.414.
5. The Behavior After a Long Time
The sign of each root decides what its term does as t increases. The term ert approaches 0 for a negative r, stays equal to 1 for r = 0, and grows without limit for a positive r.
| Roots | Example | Solutions as t increases |
|---|---|---|
| Both negative | y = c₁e−t + c₂e−2t | Each solution approaches 0 |
| One negative, one 0 | y = c₁ + c₂e−2t | Each solution approaches the constant c₁ |
| One negative, one positive | y = c₁e3t + c₂e−2t | The solution grows without limit unless c₁ = 0 |
| Both positive | y = c₁et + c₂e2t | Each solution other than y = 0 grows without limit |
When both roots are negative, the term with the root closer to 0 decreases more slowly. After a long time the solution is close to this term alone. In the example of Part 3, the solution is close to 3e−t for large t.
One positive root
Solve y″ − y′ − 6y = 0 with y(0) = 5 and y′(0) = 0.
r² − r − 6 = 0the characteristic equation(r − 3)(r + 2) = 0factor the left sidey = c₁e3t + c₂e−2tthe general solution, with the roots 3 and −2c₁ + c₂ = 5the condition y(0) = 53c₁ − 2c₂ = 0the condition y′(0) = 05c₁ = 10add 2 times the first equation to the second equationc₁ = 2divide by 5c₂ = 3from c₁ + c₂ = 5y = 2e3t + 3e−2tthe solutionThe term 3e−2t approaches 0, and the term 2e3t grows without limit.
Try it: two real roots
The blue curve is the solution of the equation with the roots r₁ and r₂ that satisfies y(0) = 1 and y′(0) = v₀. The gray dashed curves are the two terms c₁er₁t and c₂er₂t. The sliders set r₁, r₂, and v₀.
6. The Constants in Symbols
For the conditions y(0) = y₀ and y′(0) = v₀, the two equations for the constants can be solved once for all equations with two different real roots.
c₁ + c₂ = y₀the condition for the valuer₁c₁ + r₂c₂ = v₀the condition for the slope(r₁ − r₂)c₁ = v₀ − r₂y₀subtract r₂ times the first equation from the second equationc₁ = (v₀ − r₂y₀)/(r₁ − r₂)divide by r₁ − r₂, which is not 0c₂ = (r₁y₀ − v₀)/(r₁ − r₂)from c₂ = y₀ − c₁For the example of Part 3, r₁ = −1, r₂ = −2, y₀ = 1, and v₀ = 1. The formulas give c₁ = (1 + 2)/1, which is 3, and c₂ = (−1 − 1)/1, which is −2.
7. An Example from Physics: A Door with a Strong Damper
A door closer contains a spring that turns the door toward the closed position and a damper that resists the motion. Let x be the angle of the door in radians, with x = 0 for the closed door. For one door, the second law of Newton for rotation gives
x″ + 5x′ + 4x = 0with t in seconds. The term 4x comes from the spring, and the term 5x′ comes from the damper. The door is opened to the angle 0.6 radians and released from rest.
r² + 5r + 4 = 0the characteristic equation(r + 1)(r + 4) = 0factor the left sidex = c₁e−t + c₂e−4tthe general solution, with the roots −1 and −4c₁ + c₂ = 0.6the condition x(0) = 0.6−c₁ − 4c₂ = 0the condition x′(0) = 0−3c₂ = 0.6add the two equationsc₂ = −0.2divide by −3c₁ = 0.8from c₁ + c₂ = 0.6x = 0.8e−t − 0.2e−4tthe angle in radiansBoth roots are negative, so the angle approaches 0. The door closes without swinging through the closed position, because for t greater than 0 the term 0.8e−t is larger than 0.2e−4t, and x stays positive.
After a short time the term with e−4t is very small, and the angle is close to 0.8e−t. The time at which the angle is 0.06 radians, which is one tenth of the starting angle, follows from this term.
0.8e−t = 0.06the condition, without the small terme−t = 0.075divide by 0.8t = −ln 0.075take the natural logarithmt = 2.6 secondswith ln 0.075 = −2.59At this time the term 0.2e−4t is about 0.000006, so leaving it out does not change the result. Topic 3.6 studies damped motion in general.
Common Mistakes
- Writing the characteristic equation with the wrong powers. The term y″ gives r², the term y′ gives r, and the term y gives the constant.
- Writing the roots with the wrong sign. The factor (r + 2) gives the root −2 and the solution e−2t.
- Using the quadratic formula without the coefficient a in the denominator. The denominator is 2a.
- Leaving out the root 0. The equation r² + 2r = 0 has the roots 0 and −2, and the solution for the root 0 is the constant 1.
- Leaving out the factors r₁ and r₂ in the condition for the slope. The derivative of c₁er₁t is r₁c₁er₁t.
- Using this method for an equation with coefficients that depend on t. The trial function ert works for constant coefficients.
Summary
| Idea | Statement |
|---|---|
| Equation | ay″ + by′ + cy = 0 with constants a, b, and c |
| Trial function | y = ert |
| Characteristic equation | ar² + br + c = 0 |
| Roots | r = (−b ± √b² − 4ac)/2a |
| Two different real roots | y = c₁er₁t + c₂er₂t |
| Constants for y(0) = y₀ and y′(0) = v₀ | c₁ = (v₀ − r₂y₀)/(r₁ − r₂) and c₂ = (r₁y₀ − v₀)/(r₁ − r₂) |
| Both roots negative | Each solution approaches 0 |
| A positive root | The solution grows without limit unless the constant of that term is 0 |
Practice
Work each problem on paper first. Then open the answer to check your work.
1. Write the characteristic equation of each equation and find its roots: y″ − 5y′ + 6y = 0, y″ + 4y′ + 3y = 0, and y″ − 9y = 0.
y″ − 5y′ + 6y = 0 gives r² − 5r + 6 = 0, which is (r − 2)(r − 3) = 0. The roots are 2 and 3.
y″ + 4y′ + 3y = 0 gives r² + 4r + 3 = 0, which is (r + 1)(r + 3) = 0. The roots are −1 and −3.
y″ − 9y = 0 gives r² − 9 = 0. The roots are 3 and −3.
2. Solve y″ − 5y′ + 6y = 0 with y(0) = 1 and y′(0) = 0.
y = c₁e2t + c₂e3tthe general solution, with the roots 2 and 3c₁ + c₂ = 1the condition y(0) = 12c₁ + 3c₂ = 0the condition y′(0) = 0c₂ = −2subtract 2 times the first equation from the second equationc₁ = 3from c₁ + c₂ = 1y = 3e2t − 2e3tthe solution
3. Solve y″ + 4y′ + 3y = 0 with y(0) = 2 and y′(0) = −4.
y = c₁e−t + c₂e−3tthe general solution, with the roots −1 and −3c₁ + c₂ = 2the condition y(0) = 2−c₁ − 3c₂ = −4the condition y′(0) = −4−2c₂ = −2add the two equationsc₂ = 1divide by −2c₁ = 1from c₁ + c₂ = 2y = e−t + e−3tthe solution
4. Find the general solution of y″ + 4y′ + y = 0.
r² + 4r + 1 = 0the characteristic equationb² − 4ac = 16 − 4the discriminant is 12, which is positiver = (−4 ± √12)/2the quadratic formular = −2 ± √3because √12 = 2√3y = c₁e(−2 + √3)t + c₂e(−2 − √3)tthe general solution
The roots are about −0.268 and −3.732. Both are negative, so each solution approaches 0.
5. Solve y″ + 2y′ = 0 with y(0) = 3 and y′(0) = 4. Which value does the solution approach?
r² + 2r = 0the characteristic equationr(r + 2) = 0factor the left sidey = c₁ + c₂e−2tthe general solution, with the roots 0 and −2c₁ + c₂ = 3the condition y(0) = 3−2c₂ = 4the condition y′(0) = 4c₂ = −2divide by −2c₁ = 5from c₁ + c₂ = 3y = 5 − 2e−2tthe solution
The solution approaches 5.
6. The angle of a door satisfies x″ + 7x′ + 10x = 0, with x in radians and t in seconds. The door is released from rest at x = 0.9. Find x(t).
r² + 7r + 10 = 0the characteristic equation(r + 2)(r + 5) = 0factor the left sidex = c₁e−2t + c₂e−5tthe general solutionc₁ + c₂ = 0.9the condition x(0) = 0.9−2c₁ − 5c₂ = 0the condition x′(0) = 0−3c₂ = 1.8add 2 times the first equation to the second equationc₂ = −0.6divide by −3c₁ = 1.5from c₁ + c₂ = 0.9x = 1.5e−2t − 0.6e−5tthe angle in radians
Python Practice
Step 1. The roots of the characteristic equation
The instruction np.roots finds the roots of a polynomial. It receives the list of the coefficients, starting with the highest power. For r² + 3r + 2, the list is [1, 3, 2].
Python
The roots are −2 and −1, as in Part 3. Now find the roots of the characteristic equation of y″ − y′ − 6y = 0. The roots should be 3 and −2.
Python
Step 2. Check the solution of Part 3
The code below checks that y = 3e−t − 2e−2t satisfies y″ + 3y′ + 2y = 0. The derivatives are typed by hand, so the result is exact up to rounding.
Python
The largest difference is 0 up to rounding, and the two initial values are 1 and 1. Now check the solution y = 2e3t + 3e−2t of y″ − y′ − 6y = 0 of Part 5, for times between 0 and 1. Five lines need a change. The two initial values should be 5 and 0.
Python
Step 3. The constants from the formulas
Part 6 found the constants in symbols. The code below calculates them for the example of Part 3.
Python
The constants are 3 and −2. Now calculate the constants for the door of Part 7, which has the roots −1 and −4, the initial angle 0.6, and the initial velocity 0. The constants should be 0.8 and −0.2.
Python
Step 4. The slower term decides the behavior after a long time
The code below compares the solution y = 3e−t − 2e−2t with its slower term 3e−t at four times. It prints the ratio of the two values.
Python
The ratios are 0.333, 0.755, 0.967, and 0.998. They approach 1, so the solution is close to its slower term for large t. Now compare the angle of the door, x = 0.8e−t − 0.2e−4t, with its slower term 0.8e−t. The last ratio should be 1.000 to three decimal places.
Python
The ratios for the door are 0.75, 0.988, 1.000, and 1.000. The fast term e−4t disappears sooner than the term e−2t of the first example.
Step 5. The method of Euler
The code below follows the door of Part 7 with the method of Euler. The equation x″ + 5x′ + 4x = 0 is written as the pair x′ = v and v′ = −5v − 4x. The loop runs up to the time t = 2.
Python
Both values are close to 0.1082 radians. Now follow the door of practice problem 6, which satisfies x″ + 7x′ + 10x = 0 and starts from rest at x = 0.9. Its solution is x = 1.5e−2t − 0.6e−5t. Three lines need a change. Both values should be close to 0.0274.
Python
Quiz
This quiz has 5 questions on this topic. A question asks you either to choose one answer or to type numbers. The page grades your answers and explains each one. A number can be typed as a whole number, a decimal, a fraction such as 1/3, or a calculation such as sqrt(18)/2 or arccos(1/2). The page shows the value of a calculation next to the box. Angles in a calculation are in degrees. The Calculator button under each question opens a calculator. Your answers are saved in your browser, so they are still on the page when you come back to it.
Choose how your answers are checked
1. What is the characteristic equation of y″ − 4y′ + 3y = 0?
The term y″ becomes r², the term −4y′ becomes −4r, and the term 3y becomes 3. The characteristic equation is r² − 4r + 3 = 0, with the roots 1 and 3.
2. Find the two roots of the characteristic equation of y″ + y′ − 12y = 0. Type the smaller root first.
r² + r − 12 = 0the characteristic equation(r + 4)(r − 3) = 0factor the left sider = −4 or r = 3the roots
3. The solution y = c₁e−t + c₂e−3t of y″ + 4y′ + 3y = 0 satisfies y(0) = 0 and y′(0) = 4. Find c₁ and c₂.
c₁ + c₂ = 0the condition y(0) = 0−c₁ − 3c₂ = 4the condition y′(0) = 4−2c₂ = 4add the two equationsc₂ = −2divide by −2c₁ = 2from c₁ + c₂ = 0
4. For which equation does each solution approach 0 as t increases?
The equation y″ + 6y′ + 5y = 0 has the characteristic equation (r + 1)(r + 5) = 0. Both roots are negative, so both terms approach 0. The first equation has the roots 1 and 2, the second has the roots 1 and −2, and the third has the roots 0 and −3.
5. What is the general solution of y″ − 2y′ − 8y = 0?
r² − 2r − 8 = 0the characteristic equation(r − 4)(r + 2) = 0factor the left sider = 4 or r = −2the rootsy = c₁e4t + c₂e−2tthe general solution