Learn
Lesson · First-Order Linear Equations · The linear form

Constant Coefficients and the Steady State

When both a and b are constants the equation has one constant solution, the steady state b/a, and every other solution is that constant plus a gap that is multiplied by the same factor in equal stretches of time. The gap shrinks to nothing without ever reaching it when a is positive and grows away when a is negative. Euler's method multiplies the gap by 1 − a·h at each step, an exact geometric sequence beside a curve that is not.

y′ + a·y = b steady state y* = b/a y = b/a + (y₀ − b/a)·e^(−a·t) a > 0 pulls toward y*; a < 0 pushes away Euler multiplies the gap by 1 − a·h the gap is never zero at a finite time
A constant plus a gap that decays

Core ideas

What this lesson establishes

Three facts, each one line of algebra, and the second one is the solution. The third is what the lab shows beside it.

1

The steady state is where the rate is zero

From y′ + a·y = b the rate is y′ = b − a·y, and that is zero when y = b/a. So y = b/a is a constant solution, the only one when a is not zero. It is the equilibrium from Equilibria, Stability and Phase Lines, and here it can be written down without drawing a phase line.

2

The gap to it obeys y′ = −a·y

Let u = y − b/a, the gap. Then u′ = y′ = b − a·y = −a·(y − b/a) = −a·u. The gap satisfies the equation from Separable Equations, Growth and Decay, so u = u₀·e^(−a·t), and y = b/a + (y₀ − b/a)·e^(−a·t). The starting value enters only as the starting gap.

3

Euler multiplies the gap by 1 − a·h, exactly

One Euler step is yₙ₊₁ = yₙ + h·(b − a·yₙ). Subtracting b/a from both sides gives yₙ₊₁ − b/a = (1 − a·h)·(yₙ − b/a). So the gap after n steps is the starting gap times (1 − a·h)ⁿ, a geometric sequence of fractions, to be compared with the true factor e^(−a·h) per step, which is irrational.

The material

A constant, a gap, and the factor that shrinks it

The steady state, the shifted exponential and why it solves the equation, what never reaching the steady state means, the repelling case, and Euler's geometric sequence beside the closed form.

Take y′ + 2y = 6 with y(0) = 0. Before solving anything, ask where the rate is zero: y′ = 6 − 2y, which is 0 at y = 3. If y ever sat at 3 it would stay there for ever. The question the rest of the lesson answers is what a solution does when it starts somewhere else.

Definition · Steady state

For y′ + a·y = b with a ≠ 0, the steady state is the constant y* = b/a. It is the one constant solution, and it is attracting when a > 0, repelling when a < 0.

Theorem · The shifted exponential

The solution of y′ + a·y = b with y(0) = y₀ is y = b/a + (y₀ − b/a)·e^(−a·t).

Let u = y − b/a. Then u′ = y′, and from the equation y′ = b − a·y = −a·(y − b/a) = −a·u.

So u′ = −a·u, which is the decay equation and has the solution u = u₀·e^(−a·t), a claim from Separable Equations, Growth and Decay that is not reproved here. The starting gap is u₀ = y₀ − b/a, and adding b/a back gives the formula.

□

y′ + 2y = 6, y(0) = 0 steady state: 6 − 2y = 0, so y* = 3 starting gap: 0 − 3 = −3 y = 3 − 3·e^(−2t)

The gap is never zero

The gap 3·e^(−2t) is positive for every t, because an exponential is never zero. So y comes closer to 3 and does not reach it at any finite time, however long you wait. A reader who sees the curve flatten in the drawing is looking at the gap getting smaller than a pixel, which is not the same as the gap being zero. The claim the lesson makes is about every finite t, and the formula proves it.

Nor is the steady state the starting value. The solution starts at y(0) = 0 and the steady state is 3; the starting value fixes the gap and the steady state fixes where the gap is measured from. Start at 5 instead and the gap is +2, giving y = 3 + 2·e^(−2t), which falls toward 3 from above and never crosses it, since the gap never changes sign.

When a is negative the steady state repels

Take y′ − y = 2, so a = −1, b = 2 and y* = −2. The solution from y(0) = 0 is y = −2 + 2·e^t: the gap is multiplied by e^t, so it grows. The lab prints the steady state as −2 (repelling). Starting exactly at −2 stays there; starting anywhere else, however close, leaves.

Euler's steps, exactly, beside the closed form

Run Euler on y′ + 2y = 6 from y(0) = 0 with h = 1/4. The factor 1 − a·h = 1 − 1/2 = 1/2 is an exact fraction, and so is every value: yₙ = 3 − 3·(1/2)ⁿ. The closed form at the same times is irrational, so the lab prints it rounded, to six figures, with ≈, in a separate column.

n tₙ yₙ (Euler, exact) y(tₙ) (rounded) 0 0 0 0 1 1/4 3/2 ≈ 1.18041 2 1/2 9/4 ≈ 1.89636 3 3/4 21/8 ≈ 2.33061 4 1 45/16 ≈ 2.59399

The fraction 45/16 is exactly 3 − 3/16, and it is 2.8125. The true value is 3 − 3·e^(−2) ≈ 2.59399, so Euler's polygon ends about 0.218506 above the curve. Every fraction in the column is right; none of them is the solution. Euler's gap shrinks by 1/2 per step, and the true gap shrinks by e^(−1/2) ≈ 0.606531 per step, which is why the polygon runs ahead.

Example · The same equation from above, and the repelling one

From y(0) = 5 the gap is +2 and Euler gives yₙ = 3 + 2·(1/2)ⁿ, so y₄ = 3 + 2/16 = 25/8: above the steady state at every step, as the true curve is.

For y′ − y = 2 from y(0) = 0 the factor is 1 − (−1)·(1/4) = 5/4, so y₄ = −2 + 2·(5/4)⁴ = 369/128. The gap is multiplied by a number bigger than one, and the polygon leaves the steady state exactly as the curve does.

One warning for later. The factor 1 − a·h is positive and below one for a small step, but it goes negative when h > 1/a, and its size passes one when h > 2/a. At h = 1/2 exactly, here, the factor is 0: the polygon lands on 3 after one step and stays there, which the curve never does. A polygon that follows the curve for h = 1/4 can run away for a larger step on the same equation. “Stiffness: When the Step Is Too Big” takes that up.

Interactive

First-order linear equations

μ, y_h, y_p and the constant, exactly

A first-order linear equationy′ + p(t)·y = q(t), solved symbolically
solutiony_py_hEuler's steps (exact)

Method

Solving y′ + a·y = b from any start

Find the constant, measure the gap, let the gap decay or grow, then check. Euler is one more line.

1

Find the steady state

Set the rate to zero: b − a·y = 0, so y* = b/a. Say whether it attracts (a > 0) or repels (a < 0).

2

Write the starting gap

y₀ − y*, with its sign. The sign says which side of the steady state the solution lives on for ever.

3

Put the gap on an exponential

y = y* + (y₀ − y*)·e^(−a·t). The exponent is −a·t: negative for an attracting steady state, positive for a repelling one.

4

Check the start and the equation

At t = 0 the exponential is 1, so y = y* + (y₀ − y*) = y₀. Then substitute into y′ + a·y and read b.

5

Run Euler by one factor

The gap after n steps is (y₀ − y*)·(1 − a·h)ⁿ. Add y* and the whole column follows, as exact fractions.

Steady states, gaps and factors

Score 0 / 0

y′ + 2y = 6 from zero: the closed form, then four steps

The equation is y′ + 2y = 6 with y(0) = 0 and step h = 1/4. The steady state comes first, then the gap, then the formula, then Euler as one factor.

steady state: 6 − 2y = 0, so y* = 3 gap at the start: 0 − 3 = −3 y = 3 − 3·e^(−2t) check at t = 0: 3 − 3 = 0, matches y(0) = 0 Euler factor: 1 − 2·(1/4) = 1/2 yₙ = 3 − 3·(1/2)ⁿ y₄ = 3 − 3/16 = 45/16 = 2.8125 y(1) = 3 − 3·e^(−2) ≈ 2.59399

The two numbers at the foot are different quantities and the lab prints both: 45/16 is exact arithmetic on Euler's approximation, and 2.59399 is a rounded value of the curve. The distance between them, about 0.218506, is the error of this method at this step, and it is the only part of the table that is not exact. Halve the step and it falls, as Differential Equations and Euler's Method measured.

For a rehearsal, change the start to y(0) = 5 without running the lab. The steady state is unchanged, the gap is now +2, and the factor is still 1/2. Predict y₄ as a fraction, then pick the second preset and compare.

Common mistakes

1
Thinking the steady state is the starting value, or that it is reachedThe solution of y′ + 2y = 6 from y(0) = 0 starts at 0 and approaches 3; the starting value fixes the gap, not the steady state. The gap 3·e^(−2t) is positive at every t, so y is below 3 for ever, and Euler's gap 3·(1/2)ⁿ is positive at every step. A curve that looks flat has a gap smaller than the drawing can show, and the gap is still there.
2
Reading the steady state off the right-hand sideIn y′ + 2y = 6 the number 6 is the forcing, and y = 6 gives 0 + 12 = 12, not 6. The steady state is b/a = 3, the value that makes b − a·y zero. The right-hand side and the steady state are equal only when a = 1.
3
Taking Euler's final fraction for the value of the solutionAt t = 1 the lab prints 45/16, which is 2.8125, and the true value is ≈ 2.59399. The fraction is correct arithmetic on a polygon whose gap shrinks by 1/2 per step; the curve's gap shrinks by e^(−1/2) ≈ 0.606531. The difference is the error of the method at this step, not a slip in the arithmetic.

Check your understanding

✓
Finish when you can solve y′ + a·y = b from any starting value, name the steady state and say whether it attracts, and compute Euler's step factor.

You should be able to find b/a, write the starting gap with its sign, put the gap on e^(−a·t), check the result at t = 0 and by substitution, say why the solution never reaches the steady state in finite time, and predict Euler's value after n steps as an exact fraction from the factor 1 − a·h.

Note: A constant a gave the exponential e^(−a·t) for free. When p depends on t, or when the forcing is not a constant, the gap is no longer a pure exponential. One idea handles every such case, and it is the product rule read backwards: “The Integrating Factor”.

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.