The Auxiliary Equation

A second-order equation becomes a quadratic.

Try an exponential

A second-order linear equation with constant coefficients has the form a d²y/dx² + b dy/dx + c y = 0, where a, b and c are numbers. A solution y must combine with its first and second derivatives to give 0, so its derivatives should be multiples of y itself.

The exponential y = e^(mx) has exactly that property: dy/dx = m e^(mx) and d²y/dx² = m² e^(mx). So try y = e^(mx) and look for the values of m that work.

The auxiliary equation

Substitute: am² e^(mx) + bm e^(mx) + c e^(mx) = 0. Every term has the factor e^(mx), so this is (am² + bm + c)e^(mx) = 0.

An exponential is never zero, so the bracket must be: am² + bm + c = 0. This quadratic is the auxiliary equation. The coefficients carry straight across, each with its own sign, and the differential equation has become algebra.

For d²y/dx² − 5 dy/dx + 6y = 0 the auxiliary equation is m² − 5m + 6 = 0, which factors as (m − 2)(m − 3) = 0. So e^(2x) and e^(3x) are both solutions. Check the roots: 4 − 10 + 6 = 0 and 9 − 15 + 6 = 0.

Two real roots

The equation is linear: putting a sum of two functions into the left side gives the sum of what each gives on its own. So if e^(2x) and e^(3x) each give 0, then A e^(2x) + B e^(3x) gives 0 for any constants A and B.

The general solution is y = A e^(2x) + B e^(3x). A second-order equation needs two constants, and here they are. In general, two real roots m₁ and m₂ give y = A e^(m₁x) + B e^(m₂x).

Two known values fix the constants. If y = 0 and dy/dx = 1 when x = 0, then A + B = 0 and 2A + 3B = 1, so A = −1 and B = 1, and y = e^(3x) − e^(2x).

Three equations, one start

The three kinds of root are easiest to compare on three equations solved from the same start, y = 1 and dy/dx = 0 at x = 0.

For d²y/dx² + 3 dy/dx + 2y = 0 the auxiliary equation is m² + 3m + 2 = (m + 1)(m + 2) = 0, with roots −1 and −2. So y = A e^(−x) + B e^(−2x). The start gives A + B = 1 and −A − 2B = 0, so A = 2 and B = −1: y = 2e^(−x) − e^(−2x).

xy

y = 2e^(−x) − e^(−2x), the solution of d²y/dx² + 3 dy/dx + 2y = 0 that starts at 1 with gradient 0. Both roots are negative, so both exponentials shrink, and y falls to 0.60 at x = 1 and 0.25 at x = 2 without ever crossing the x-axis.

A repeated root

When b² − 4ac = 0 the auxiliary equation has only one root, m = −b/2a, and e^(mx) gives only one constant. A second solution is x e^(mx).

To see why, differentiate: dy/dx = (1 + mx)e^(mx) and d²y/dx² = (2m + m²x)e^(mx). Substituting, the left side is [x(am² + bm + c) + (2am + b)]e^(mx). The first bracket is 0 because m is a root, and 2am + b is 0 because m = −b/2a. So x e^(mx) is a solution exactly when the root repeats.

The general solution is y = (A + B x)e^(mx). For d²y/dx² + 2 dy/dx + y = 0 the auxiliary equation is (m + 1)² = 0, so m = −1 twice and y = (A + B x)e^(−x). The start y = 1, dy/dx = 0 gives A = 1 and B − A = 0, so y = (1 + x)e^(−x).

xy

The gold curve is y = (1 + x)e^(−x), the solution of d²y/dx² + 2 dy/dx + y = 0 from the same start. The dashed curve is e^(−x) alone, which starts at the right height but with gradient −1; the factor 1 + x supplies the second constant that makes the gradient 0 at the start.

Complex roots

When b² − 4ac < 0 the roots are a complex pair, p ± qi. The exponential still works: e^((p + qi)x) = e^(px)e^(iqx), and e^(iqx) = cos qx + i sin qx.

Adding and subtracting the solutions from the two roots removes the i, and leaves the two real solutions e^(px) cos qx and e^(px) sin qx. So y = e^(px)(A cos qx + B sin qx).

For d²y/dx² + 2 dy/dx + 5y = 0, b² − 4ac = 4 − 20 = −16, so m = −1 ± 2i and p = −1, q = 2 and y = e^(−x)(A cos 2x + B sin 2x). From y = 1 and dy/dx = 0 at x = 0, A = 1 and −A + 2B = 0, so B = ½.

xy

The gold curve is y = e^(−x)(cos 2x + ½ sin 2x). It swings across the x-axis, first at x ≈ 1.02, and reaches −0.21 at x = π/2. The dashed curves are ±½√5 e^(−x): the cosine and sine together never exceed √(1 + ¼) = √5/2, so the swing stays between them and shrinks as they do.

The sign of p

In e^(px)(A cos qx + B sin qx) the number q sets how fast y swings and p sets the envelope. A negative p makes the swings shrink, p = 0 makes them keep the same size forever, and a positive p makes them grow.

So the discriminant b² − 4ac decides the shape of every solution. Positive gives two exponentials, zero gives (A + B x)e^(mx), and negative gives an oscillation.

The usual mistakes

Changing a sign on the way to the auxiliary equation. d²y/dx² − 5 dy/dx + 6y = 0 gives m² − 5m + 6 = 0, with roots 2 and 3, so the solution has e^(2x) and e^(3x), not e^(−2x) and e^(−3x).

Writing A e^(mx) + B e^(mx) for a repeated root. That is (A + B)e^(mx), which has only one constant. The second solution is x e^(mx).

Putting the i into the solution, as in e^((p + qi)x) left as it is. The real solution is e^(px)(A cos qx + B sin qx), with q the size of the imaginary part.

Forgetting the e^(px) when p is not zero. Without it the solution would swing at a constant size, which only happens when the middle coefficient b is 0.

Two tanks of brine

In the application below, the salt in two connected tanks gives two first-order equations. Removing one variable leaves one second-order equation for the salt y in the second tank, with coefficients 1, 0.4 and 0.03. Its auxiliary equation is written with λ, because there m counts minutes: λ² + 0.4λ + 0.03 = 0 has roots −0.1 and −0.3.

Worked example: Two Connected Tanks of Brine: The Equations for the Salt in Each, and When the Second Tank Holds the Most

Question Two tanks, A and B, each hold 40 liters of brine and are kept well stirred. Pure water flows into tank A at 6 liters per minute. Brine is pumped from A to B at 8 liters per minute and from B back to A at 2 liters per minute, and brine drains out of B at 6 liters per minute. At the start, tank A holds 20 kilograms of salt and tank B holds pure water. Let x and y be the kilograms of salt in A and in B, m minutes after the start. (a) Write down the pair of differential equations for x and y. (b) Find the greatest amount of salt that tank B holds, and when it holds it.

  1. 1.First check that the volumes stay fixed. Tank A takes in 6 + 2 = 8 liters per minute and sends out 8; tank B takes in 8 and sends out 2 + 6 = 8. So each tank always holds 40 liters, and the concentrations are x40 and y40 kilograms per liter.

    10200102030minutessalt, kgA: 20 kgB: nonein = out = 8 L/min: each tank stays at 40 L
    10200102030minutessalt, kgA: 20 kgB: nonein = out = 8 L/min: each tank stays at 40 L
    Each tank takes in 8 liters a minute and sends out 8, so both stay at 40 liters, with concentrations x40 and y40.
  2. 2.(a) Salt enters A only in the 2 liters per minute from B, carrying 2 × y40 = 0.05y kilograms per minute, and leaves in the 8 liters per minute sent to B, carrying 8 × x40 = 0.2x. So dxdm = −0.2x + 0.05y. Salt enters B at 0.2x and leaves in 2 + 6 = 8 liters per minute, carrying 0.2y, so dydm = 0.2x − 0.2y.

    10200102030minutessalt, kgA: 20 kgB: none−4 and +4 kg/minin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2y
    10200102030minutessalt, kgA: 20 kgB: none−4 and +4 kg/minin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2y
    (a) At the start A loses salt at 0.2 × 20 = 4 kilograms a minute and B gains it at the same rate: the two short lines.
  3. 3.Eliminate x. The second equation gives x = 5dydm + y, so dxdm = 5d2ydm2 + dydm. Substituting both into the first equation gives 5d2ydm2 + dydm = −dydm − 0.2y + 0.05y, and dividing by 5 after collecting terms gives d2ydm2 + 0.4dydm + 0.03y = 0.

    10200102030minutessalt, kgA: 20 kgB: none−4 and +4 kg/minin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0
    10200102030minutessalt, kgA: 20 kgB: none−4 and +4 kg/minin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0
    From the second equation x = 5dydm + y; substituting into the first leaves one second-order equation in y.
  4. 4.The auxiliary equation λ2 + 0.4λ + 0.03 = 0 factorizes as (λ + 0.1)(λ + 0.3) = 0, so y = Ae−0.1m + Be−0.3m. At the start y = 0, so B = −A, and dydm = 0.2 × 20 − 0 = 4, so −0.1A + 0.3A = 4 and A = 20. Hence y = 20e−0.1m − 20e−0.3m.

    10200102030minutessalt, kgBin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0roots −0.1, −0.3: y = 20e−0.1m− 20e−0.3m
    10200102030minutessalt, kgBin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0roots −0.1, −0.3: y = 20e−0.1m− 20e−0.3m
    The roots −0.1 and −0.3, with y = 0 and dydm = 4 at the start, give y = 20e−0.1m − 20e−0.3m.
  5. 5.(b) The salt in B is greatest where dydm = −2e−0.1m + 6e−0.3m = 0, that is where e0.2m = 3, so m = 5ln 3 ≈ 5.49 minutes. Then e−0.1m = 1√3 and e−0.3m = 13√3, so y = 20√3 − 203√3 = 403√3 ≈ 7.70 kilograms.

    10200102030minutessalt, kgB7.70 kg at 5.49 minin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0roots −0.1, −0.3: y = 20e−0.1m− 20e−0.3m(b) e0.2m= 3, so m = 5 ln 3 = 5.49 miny = 7.70 kg
    10200102030minutessalt, kgB7.70 kg at 5.49 minin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0roots −0.1, −0.3: y = 20e−0.1m− 20e−0.3m(b) e0.2m= 3, so m = 5 ln 3 = 5.49 miny = 7.70 kg
    (b) The salt in B is greatest where dydm = 0: m = 5ln 3 ≈ 5.49 minutes, with 403√3 ≈ 7.70 kilograms.
  6. 6.Check: x = 5dydm + y = 10e−0.1m + 10e−0.3m, which is 20 at the start, as it should be. At m = 5ln 3 it is 10√3 + 103√3 = 403√3, the same as y: tank B holds the most salt exactly when the two tanks are equally salty, because then salt flows into B as fast as it flows out.

    10200102030minutessalt, kgBA7.70 kg in eachin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0roots −0.1, −0.3: y = 20e−0.1m− 20e−0.3m(b) e0.2m= 3, so m = 5 ln 3 = 5.49 miny = 7.70 kgcheck: x = y = 7.70 kg at the peak
    10200102030minutessalt, kgBA7.70 kg in eachin = out = 8 L/min: each tank stays at 40 L(a) x' = −0.2x + 0.05yy' = 0.2x − 0.2yy'' + 0.4y' + 0.03y = 0roots −0.1, −0.3: y = 20e−0.1m− 20e−0.3m(b) e0.2m= 3, so m = 5 ln 3 = 5.49 miny = 7.70 kgcheck: x = y = 7.70 kg at the peak
    Check: x = 10e−0.1m + 10e−0.3m crosses y exactly at the peak, where the two tanks are equally salty.

Answer: (a) dxdm = −0.2x + 0.05y and dydm = 0.2x − 0.2y; (b) tank B holds the most salt, 403√3 ≈ 7.70 kilograms, after 5ln 3 ≈ 5.49 minutes

Common mistakes

  • Using the 6 liters per minute that drain from B as the only flow out of B. Brine also leaves B in the 2 liters per minute pumped back to A, so B loses salt at 8 × y40 = 0.2y, not at 6 × y40 = 0.15y.
  • Writing the rates in liters instead of kilograms of salt, as in dxdm = 2 − 8. The equations are about the salt, so each flow of brine must be multiplied by the concentration of the tank it leaves.

More coupled differential equations problems, worked step by step →

Practice The Auxiliary Equation in the app