Learn
Lesson · Second-Order Linear Equations · Fitting the constants

Fitting the Initial Conditions

Whatever kind of root the equation has, the starting value and the starting rate give two linear equations for the two constants, because at t = 0 every exponential is 1, cos is 1 and sin is 0. The equations differ only in a few entries, and they are solved by elimination with exact fractions. When the roots are irrational the constants would be surds, and the lab declines to fit them and says so.

real roots: C₁ + C₂ = y(0) and r₁·C₁ + r₂·C₂ = y′(0) repeated: C₁ = y(0), r·C₁ + C₂ = y′(0) complex: C₁ = y(0), α·C₁ + β·C₂ = y′(0) y′(0) is the starting rate, not 0 irrational roots: the lab prints a dash
Two numbers in, two equations out

Core ideas

What this lesson establishes

Three ideas: each starting number is one equation, the three kinds of root change only a few entries of the pair, and a dash from the lab has a specific meaning.

1

Each starting number is one equation in C₁ and C₂

The general solution is a formula in t, C₁ and C₂. Putting t = 0 in it gives y(0), and putting t = 0 in its rate gives y′(0). Each is a linear expression in C₁ and C₂, so two starting numbers give two linear equations in two unknowns.

2

At t = 0 the exponential is 1, cosine is 1 and sine is 0

That is why the pair is short. For two real roots the first equation is C₁ + C₂ = y(0); for a repeated root it is C₁ = y(0); for a complex pair it is again C₁ = y(0). The second equation carries the roots, because the rate of e^(rt) at 0 is r.

3

A dash means the lab declined, not that no fit exists

When the roots contain a square root the constants do too, and the lab fits only rational constants. It prints a dash and gives the reason in its status line. The two equations still have an exact solution; it is a number the lab does not print.

The material

The two equations, and what the lab will solve

The pair for each kind of root, a general solution of the real case by elimination, a complex fit, and the case the lab declines.

Every earlier lesson on this course ended by fitting two constants, and each did it in one line. This lesson shows that the lines are one computation. The unknowns are C₁ and C₂, the data are the starting value y(0) and the starting rate y′(0), and the equations come from putting t = 0 in the general solution and in its rate.

real roots r₁, r₂: C₁ + C₂ = y(0) r₁·C₁ + r₂·C₂ = y′(0) repeated root r: C₁ = y(0) r·C₁ + C₂ = y′(0) complex α ± βi: C₁ = y(0) α·C₁ + β·C₂ = y′(0)

Read the second line of each pair as “the rate at the start”. For two exponentials it adds the roots in proportion to the constants. For the repeated root, the product rule on (C₁ + C₂·t)·e^(rt) at t = 0 gives r·C₁ + C₂. For the complex pair, the product rule on the exponential and the cosine and sine at t = 0 gives α·C₁ + β·C₂.

Eliminating, once, for two real roots

Multiply the first equation by r₂ and subtract it from the second, then multiply the first by r₁ and subtract the second from it. The unknowns separate.

(r₁ − r₂)·C₁ = y′(0) − r₂·y(0) (r₁ − r₂)·C₂ = r₁·y(0) − y′(0)

The factor r₁ − r₂ is why the roots have to differ. If they are different it is not zero and may be divided out, so there is exactly one pair C₁, C₂ for every starting value and rate. If they are equal the two exponentials are one function, and the repeated-root form takes over.

Example · The lab's first preset

For y″ + 3y′ + 2y = 0 the roots are r₁ = −1 and r₂ = −2, so r₁ − r₂ = 1. With y(0) = 0 and y′(0) = 1, the first formula gives C₁ = (1 − 0)/1 = 1 and the second C₂ = (0 − 1)/1 = −1.

The solution is e^(−t) − e^(−2t). It starts at 0 and is positive afterwards, with a starting rate of 1: the rate at the start is not the rate of the number 0.

A complex fit

For y″ + 2y′ + 5y = 0 the roots are −1 ± 2i, so the pair is C₁ = y(0) and −C₁ + 2·C₂ = y′(0). Take y(0) = 2 and y′(0) = 0. Then C₁ = 2 and −2 + 2·C₂ = 0, so C₂ = 1, and the solution is e^(−t)·(2·cos(2t) + sin(2t)). Its rate at 0 is zero because two effects cancel exactly: the exponential pulls it down by 2 and the sine pushes it up by 2. The rate is not zero because y(0) happens to be a constant.

When the lab declines

For y″ − y′ − y = 0 the roots are (1 ± √5)/2. The two equations are exactly as above, and they have a solution; by hand it is C₁ = (5 − √5)/10 and C₂ = (5 + √5)/10 for y(0) = 1 and y′(0) = 0, and the first equation checks, since the two add to 1. The constants contain √5, though, and the lab fits rational constants only. It prints a dash in the constants tile and the solution tile and says in its status line that the roots are irrational.

That is a limit of the arithmetic. The lab differentiates and substitutes solutions whose exponents and constants are fractions, which it can do without rounding; a surd in an exponent or a constant would have to be rounded, and then the residual would be a rounded number instead of a zero. A complex pair whose β is a surd is declined for the same reason, as in y″ + 3y = 0 with the roots ±√3·i, and the status line names the irrational frequency. The method is the same for any roots, and a solution with irrational constants is a perfectly good one.

Interactive

The characteristic equation

Roots, the general solution and the constants, exactly

The characteristic equationy = e^(rt) turns a·y″ + b·y′ + c·y = 0 into a·r² + b·r + c = 0
the curve shownsecond solutionroots

Method

Fitting two constants from a start

Five moves, the same for every kind of root.

1

Write the general solution for the kind of root

Two exponentials, (C₁ + C₂·t)·e^(rt), or e^(αt) with a cosine and sine. The lab names the kind.

2

Put t = 0 in it

That gives the first equation. The exponentials become 1, the cosine 1 and the sine 0.

3

Put t = 0 in its rate

Differentiate once, by the product rule where t or an exponential multiplies something. This gives the second equation, which equals y′(0).

4

Solve by elimination

Keep the fractions exact. Check that the number you divide by is not zero.

5

Check both starting values and the residual

Put t = 0 into the answer and into its rate, and read the status line of the lab for the residual.

Setting up and solving the pair

Score 0 / 0

y″ + 2y′ + 5y = 0 with y(0) = 2 and y′(0) = 0

A complex pair, the pair of equations, and the answer checked at the start.

r = −1 ± 2i, α = −1, β = 2 y = e^(−t)·(C₁·cos(2t) + C₂·sin(2t)) y(0) = C₁ = 2 y′(0) = −C₁ + 2·C₂ = 0 −2 + 2·C₂ = 0, C₂ = 1 y = e^(−t)·(2·cos(2t) + sin(2t)) check: y′(0) = −2 + 2·1 = 0

The fourth line is the rate of the general solution at t = 0. A wrong sign on the −C₁ shows up in the last line as a starting rate that is not 0.

The lab prints the same solution expanded, as 2·e^(−t)·cos(2t) + e^(−t)·sin(2t). The status line also reports the residual of the whole solution, which is exactly 0; the check on the last line covers the starting values, and the residual covers the equation.

Common mistakes

1
Finding y′(0) by differentiating the number y(0)The starting rate is a second piece of data, and it is not computed from the first. A constant has rate zero, so y(0) = 0 would suggest y′(0) = 0 and the zero solution. The first preset has y(0) = 0 and y′(0) = 1, and its solution e^(−t) − e^(−2t) starts at 0 and rises at rate 1. Every question of this kind needs both numbers.
2
Putting the constants on the wrong rootsThe lab writes the larger root first, so in C₁·e^(−t) + C₂·e^(−2t) the constant C₁ goes with −1. Reading it the other way gives −e^(−t) + e^(−2t) for the first preset, whose rate at 0 is 1 − 2 = −1, not 1. Name the root beside each constant before solving.
3
Taking a dash for a failure of the methodThe dash means that the constants contain a surd and the lab only fits rational ones. For y″ − y′ − y = 0 they are (5 − √5)/10 and (5 + √5)/10, and they add to 1 as the first equation requires. The method works for any roots, and an exact fit by hand is the way to see it.

Check your understanding

✓
Finish when you can write and solve the two equations for the constants for any kind of root, and say what a dash from the lab means.

You should be able to set t = 0 in the general solution and in its rate, solve the resulting pair exactly, check both starting values, and say why irrational roots make the lab decline.

Note: The fit is guaranteed for the three forms in this course. “Superposition and the Wronskian” asks the general question: for which pairs of solutions is a fit always possible, and what number says so?

Kept in this browser only, for you. Nothing is sent anywhere and nothing checks it. Carry it to another device.

Feedback and recommendations

Something to change about this lesson? Write it down, tick it off when it is handled, and export the list when you want to act on it. Kept in this browser only: nothing is sent anywhere, and nobody is notified.

No recommendations yet for this lesson.