A Second-Order Equation as a Coupled System

Name the derivative and the order drops.

Give the derivative a name

Take d²x/dt² + 3 dx/dt + 2x = 0, the equation of a damped motion: x is a displacement, and the middle term is a resistance that grows with the speed. It is second order because it holds the second derivative.

Give the first derivative a name of its own, v = dx/dt, the velocity. Then d²x/dt² is dv/dt, the rate of change of v, and the one second-order equation becomes two first-order ones in the two quantities x and v.

The two equations

The first equation is the definition itself: dx/dt = v. The second is the original equation solved for the highest derivative. Moving 3 dx/dt and 2x across gives d²x/dt² = −2x − 3 dx/dt, which in the new names is dv/dt = −2x − 3v.

The pair is coupled: the rate of x is v, and the rate of v depends on both x and v. A state is now a point (x, v), a position together with a velocity, and the pair says how that point moves.

The matrix

With X = (x; v), the pair is dX/dt = M X. The first row of M is the definition, dx/dt = 0x + 1v, so it is (0 1). The second row is (−2 −3). So M = (0 1; −2 −3).

Every equation x'' + p x' + q x = 0 turns into the same shape, M = (0 1; −q −p): the top row is always 0 and 1, and the bottom row is the two coefficients with their signs changed, in the order of x and then v.

The characteristic polynomial is the auxiliary equation

M − λI has rows (−λ, 1) and (−2, −3 − λ), and its determinant is (−λ)(−3 − λ) − (1)(−2) = λ² + 3λ + 2. The auxiliary equation of the original, found by trying x = e^(kt), is k² + 3k + 2 = 0: the same quadratic in another letter.

In general, det(M − λI) for (0 1; −q −p) is λ(λ + p) + q = λ² + pλ + q, which is the auxiliary equation of x'' + p x' + q x = 0. The eigenvalues of the pair are the roots of the auxiliary equation.

The same solution

λ² + 3λ + 2 = (λ + 1)(λ + 2), so λ = −1 or λ = −2. The top row of M says v = λx along an eigenvector, so every eigenvector of this kind of matrix is (1, λ): here (1, −1) and (1, −2). Check: M sends (1; −1) to (−1; −2 + 3) = (−1; 1), which is −1 times (1; −1).

So X = A e^(−t)(1, −1) + B e^(−2t)(1, −2). Its first entry is x = A e^(−t) + B e^(−2t), the solution the auxiliary equation gives, and its second entry is v = −A e^(−t) − 2B e^(−2t), which is the derivative of x, as it must be.

Released from rest at x = 1: A + B = 1 and −A − 2B = 0, so A = 2 and B = −1, giving x = 2e^(−t) − e^(−2t). The speed is greatest where dv/dt = −2x − 3v = 0, which is at t = ln 2 ≈ 0.693, with x = 0.75 and v = −0.5.

Drawn as v against x

Both eigenvalues are negative, so the origin of the (x, v) plane is a stable node: every state runs into x = 0, v = 0, the object at rest at its center. The paths arrive tangent to v = −x, the eigenvector of −1, the eigenvalue nearer zero. On the path from (1, 0), v/x is −0.307 at t = 0.2, −0.565 at t = 0.5, −0.775 at t = 1 and −0.927 at t = 2.

That path never crosses the v-axis: x = 2e^(−t) − e^(−2t) = e^(−t)(2 − e^(−t)) stays positive, so the object creeps back without passing through the center. This is heavy damping in the language of the damping lesson.

xv

Paths of dx/dt = v, dv/dt = −2x − 3v. The gold one starts from rest at the dot (1, 0), falls to v = −0.5 at x = 0.75, then runs in along v = −x. The dashed ones start at (0, 2), (−1, 0) and (0, −2); all four end at the origin, arriving along the line of λ = −1.

Lighter damping

Change the coefficients and the eigenvalues, and so the portrait, change with them. x'' + 2x' + 5x = 0 gives M = (0 1; −5 −2) and λ² + 2λ + 5, with roots −1 ± 2i: a stable spiral, and the motion swings through the center inside a shrinking envelope. x'' + 4x = 0, with no damping at all, gives λ² + 4 and roots ±2i: a center, simple harmonic motion, whose paths are closed loops.

ReImtybb = 1, b² − 4c = −15−4−22460246

b² − 4c < 0: complex roots p ± qi, so y = e^(pt)(A cos qt + B sin qt) oscillates inside the envelope e^(pt)

Raise the damping b until the two roots meet

y'' + b y' + 4y = 0 with b = 1: b² − 4c = −15, so the roots of m² + bm + 4, which are also the eigenvalues of (0 1; −4 −b), are −0.5 ± 1.936i, on the circle of radius 2. The trace beside them swings and dies away. Drag b up to 4 and the roots meet at −2; at b = 5 they are −1 and −4, and the trace returns without crossing zero.

Euler’s method on the pair

A step of Euler’s method on the pair moves both x and v from the values at step n: xₙ₊₁ = xₙ + h vₙ and vₙ₊₁ = vₙ + h(−2xₙ − 3vₙ). That is one step of the original equation, which on its own has no first-order form to step.

From (1, 0) with h = 0.1: x stays at 1 + 0.1 × 0 = 1, and v becomes 0 + 0.1 × (−2) = −0.2. Then x = 1 + 0.1 × (−0.2) = 0.98 and v = −0.2 + 0.1 × (−2 + 0.6) = −0.34. The exact solution at t = 0.2 gives x ≈ 0.967 and v ≈ −0.297.

The usual mistakes

Naming the second derivative instead of the first. With v = d²x/dt², the equation still holds dx/dt and v, and nothing has been reduced.

Losing the signs in the second row. Moving 2x and 3v across the equals sign makes them negative: (0 1; −2 −3), not (0 1; 2 3), whose characteristic polynomial λ² − 3λ − 2 is not the auxiliary equation.

Swapping the coefficients. The coefficient of x goes under the 0 and the coefficient of x' under the 1: −2 then −3.

Fitting the constants to x alone. A second-order equation needs two starting values, x and v: released from rest means v = 0 at the start, and that fixes the second constant.

A door closer, and a circuit

In the applications below, a door on a hydraulic closer is written as a pair, and its two negative eigenvalues show that it closes without swinging past. Then a coil and a capacitor in a loop give eigenvalues ±i, a center, and the charge swings between the plates with no loss.

Worked example: A Door on a Hydraulic Closer: Its Equation of Motion as Two First-Order Equations, and How Fast It Swings Shut

Question A door is fitted with a hydraulic closer. With x the door's angle from the closed position, in radians, s seconds after it is let go, its motion obeys d2xds2 + 5dxds + 4x = 0. The door is held open at 1.2 radians and let go from rest. (a) Write the equation as a pair of first-order equations, find the eigenvalues, and decide whether the door swings past the closed position. (b) Find the greatest speed at which the door swings shut, and how long after it is let go it reaches that speed.

  1. 1.Let v = dxds, the angular velocity in radians per second. Then dxds = v and, from the equation, dvds = −4x − 5v. The matrix of this pair is 01−4−5.

    −0.5−10.51xvlet gox' = v, v' = −4x − 5v
    −0.5−10.51xvlet gox' = v, v' = −4x − 5v
    With v = dxds the equation becomes the pair dxds = v and dvds = −4x − 5v.
  2. 2.(a) Its characteristic polynomial is λ2 + 5λ + 4 = (λ + 1)(λ + 4), so the eigenvalues are −1 and −4. Both are real and negative, so the motion dies away without oscillating: the equilibrium x = 0, v = 0 is a stable node.

    −0.5−10.51xvlet gox' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable node
    −0.5−10.51xvlet gox' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable node
    (a) The eigenvalues −1 and −4 are real and negative: every path runs into the origin without circling it.
  3. 3.For −1 the first row gives v = −x, so an eigenvector is 1−1; for −4 it gives v = −4x, so an eigenvector is 1−4. So x = c1e−s + c2e−4s and v = −c1e−s − 4c2e−4s. At release x = 1.2 and v = 0, so c1 + c2 = 1.2 and c1 + 4c2 = 0, which give c2 = −0.4 and c1 = 1.6.

    −0.5−10.51xvv = −xv = −4xlet gox' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4s
    −0.5−10.51xvv = −xv = −4xlet gox' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4s
    The eigenvectors are the dashed lines. From x = 1.2, v = 0 the path is x = 1.6e−s − 0.4e−4s.
  4. 4.So x = 1.6e−s − 0.4e−4s = 0.4e−s(4 − e−3s). For s > 0, e−3s < 1, so the bracket stays above 3 and x stays positive: the angle shrinks toward 0 but never becomes negative, and the door does not swing past the closed position.

    −0.5−10.51xvv = −xv = −4xlet goshutx' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4sx = 0.4e−s(4 − e−3s), always above 0
    −0.5−10.51xvv = −xv = −4xlet goshutx' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4sx = 0.4e−s(4 − e−3s), always above 0
    The path stays to the right of the axis x = 0: the door does not swing past closed.
  5. 5.(b) The door swings shut at the speed −v = 1.6e−s − 1.6e−4s. This is greatest where its derivative, −1.6e−s + 6.4e−4s, is zero, that is where e3s = 4, so s = ln 43 ≈ 0.462 seconds. Then e−s = 4−1/3 and e−4s = 14 × 4−1/3, so the greatest speed is 1.6 × 34 × 4−1/3 = 1.2 × 4−1/3 ≈ 0.756 radians per second.

    −0.5−10.51xvv = −xv = −4xlet goshut0.756 rad/sx' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4sx = 0.4e−s(4 − e−3s), always above 0(b) e3s= 4, so s = (ln 4)/3 = 0.462 sspeed 1.2 × 4−1/3= 0.756 rad/s
    −0.5−10.51xvv = −xv = −4xlet goshut0.756 rad/sx' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4sx = 0.4e−s(4 − e−3s), always above 0(b) e3s= 4, so s = (ln 4)/3 = 0.462 sspeed 1.2 × 4−1/3= 0.756 rad/s
    (b) The lowest point of the path is the greatest closing speed, 1.2 × 4−1/3 ≈ 0.756 radians per second, at s ≈ 0.462.
  6. 6.Check: at that moment dvds = −4x − 5v should be zero. There x = 1.6 × 4−1/3 − 0.1 × 4−1/3 = 1.5 × 4−1/3 ≈ 0.945 and v ≈ −0.756, and −4 × 0.945 + 5 × 0.756 = −3.78 + 3.78 = 0. A speed of 0.756 radians per second is about 43 degrees per second, a steady close for a door.

    −0.5−10.51xvv = −xv = −4xlet goshut0.756 rad/sx' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4sx = 0.4e−s(4 − e−3s), always above 0(b) e3s= 4, so s = (ln 4)/3 = 0.462 sspeed 1.2 × 4−1/3= 0.756 rad/scheck: v' = −4(0.945) + 5(0.756) = 0
    −0.5−10.51xvv = −xv = −4xlet goshut0.756 rad/sx' = v, v' = −4x − 5v(a) eigenvalues −1 and −4: a stable nodex = 1.6e−s− 0.4e−4sx = 0.4e−s(4 − e−3s), always above 0(b) e3s= 4, so s = (ln 4)/3 = 0.462 sspeed 1.2 × 4−1/3= 0.756 rad/scheck: v' = −4(0.945) + 5(0.756) = 0
    Check: at the lowest point dvds = 0, and −4 × 0.945 + 5 × 0.756 = 0.

Answer: (a) dxds = v and dvds = −4x − 5v; the eigenvalues are −1 and −4, both real and negative, and x = 1.6e−s − 0.4e−4s stays positive, so the door does not swing past the closed position; (b) the greatest closing speed is 1.2 × 4−1/3 ≈ 0.756 radians per second, reached after ln 43 ≈ 0.462 seconds

Common mistakes

  • Taking c1 = 1.2 and c2 = 0, as if only the angle at release mattered. The door starts from rest, and that condition, v = 0, is what fixes the second constant; with c2 = 0 the door would start with an angular velocity of −1.2 radians per second.
  • Looking for the greatest speed where v = 0 or where x = 0. The speed is greatest where its own rate of change is zero, dvds = 0; the angular velocity is zero only at release, and x never reaches zero.

More coupled differential equations problems, worked step by step →

Worked example: An Inductor and a Capacitor Joined in a Loop: The Circuit Equation as Two First-Order Equations, and the Current That Flows

Question A capacitor of 4 microfarads holds a charge of 20 microcoulombs. At the moment it is connected across a coil of inductance 0.25 henries, no current is flowing, and the resistance of the loop is small enough to leave out. With time m in milliseconds after the connection, q the charge on the capacitor in microcoulombs and I = dqdm the current in milliamperes, the circuit obeys Ld2qdm2 + qC = 0, with L in henries and C in microfarads. (a) Write this as a pair of first-order equations in q and I, find the eigenvalues, and describe what the charge does over time. (b) Find the greatest size of the current, and how long after the connection the current first reaches that size.

  1. 1.Name the current: dqdm = I. Then d2qdm2 = dIdm, and the circuit equation gives 0.25dIdm = −q4, so dIdm = −q. The pair has matrix 01−10.

    chargecurrentstart, 20q' = current, current' = −q
    chargecurrentstart, 20q' = current, current' = −q
    Naming the current I = dqdm, the circuit equation 0.25dIdm = −q4 gives dIdm = −q.
  2. 2.(a) The characteristic polynomial is λ2 + 1, so the eigenvalues are ± i. Their real part is zero, so the swings neither grow nor die away: the equilibrium q = 0, I = 0 is a center, and the charge swings back and forth between the two plates forever, once every 2π ≈ 6.28 milliseconds.

    chargecurrentstart, 20a centerq' = current, current' = −q(a) eigenvalues ±i: a center
    chargecurrentstart, 20a centerq' = current, current' = −q(a) eigenvalues ±i: a center
    (a) The eigenvalues ± i have real part zero, so the path is a closed loop round a center: the charge swings forever.
  3. 3.With eigenvalues ± i the solutions are combinations of cos m and sin m. At m = 0, q = 20 and I = dqdm = 0, so q = 20cos m and I = −20sin m.

    chargecurrentstart, 20a centerq' = current, current' = −q(a) eigenvalues ±i: a centerq = 20 cos m, current = −20 sin m
    chargecurrentstart, 20a centerq' = current, current' = −q(a) eigenvalues ±i: a centerq = 20 cos m, current = −20 sin m
    From q = 20 and I = 0, the path is q = 20cos m, I = −20sin m, a circle traced clockwise.
  4. 4.(b) The current is greatest in size when sin m = ± 1, so the greatest size of the current is 20 milliamperes. It first reaches that size at m = π2 ≈ 1.57 milliseconds, when the capacitor is empty, q = 20cosπ2 = 0. The minus sign in I = −20sin m says that it flows in the direction that discharges the capacitor.

    chargecurrentstart, 2020 mA at pi/2 msq' = current, current' = −q(a) eigenvalues ±i: a centerq = 20 cos m, current = −20 sin m(b) greatest current 20 mA at m = pi/2 = 1.57 ms
    chargecurrentstart, 2020 mA at pi/2 msq' = current, current' = −q(a) eigenvalues ±i: a centerq = 20 cos m, current = −20 sin m(b) greatest current 20 mA at m = pi/2 = 1.57 ms
    (b) The current is greatest, 20 milliamperes, a quarter of a turn on, at m = π2 ≈ 1.57 milliseconds.
  5. 5.Check by energy: at the start the capacitor stores q22C = (20 × 10−6)22 × 4 × 10−6 = 5 × 10−5 joules, and at the greatest current the coil stores 12LI2 = 12 × 0.25 × 0.022 = 5 × 10−5 joules, the same. In a real circuit a little resistance gives the eigenvalues a small negative real part, and the swings slowly die away.

    chargecurrentstart, 2020 mA at pi/2 msenergy the sameq' = current, current' = −q(a) eigenvalues ±i: a centerq = 20 cos m, current = −20 sin m(b) greatest current 20 mA at m = pi/2 = 1.57 msenergy 0.00005 J in the capacitor, then in the coil
    chargecurrentstart, 2020 mA at pi/2 msenergy the sameq' = current, current' = −q(a) eigenvalues ±i: a centerq = 20 cos m, current = −20 sin m(b) greatest current 20 mA at m = pi/2 = 1.57 msenergy 0.00005 J in the capacitor, then in the coil
    Check: the capacitor's q22C at the start and the coil's 12LI2 at the peak are both 5 × 10−5 joules.

Answer: (a) dqdm = I and dIdm = −q; the eigenvalues are ± i, a center, so the charge swings between 20 and −20 microcoulombs forever, once every 2π ≈ 6.28 milliseconds; (b) 20 milliamperes, first after π2 ≈ 1.57 milliseconds

Common mistakes

  • Writing q = 20sin m, forgetting that the current, not the charge, starts at zero. That formula gives no charge at the start. The charge starts at its greatest value, 20, so it follows the cosine, and the current, its derivative, is −20sin m.
  • Reading eigenvalues ± i as a sign that the charge dies away, because they are not positive. Only a negative real part makes the swings die away; with a real part of zero, as here, they keep the same size, and the circuit oscillates with no loss.

More coupled differential equations problems, worked step by step →

Practice A Second-Order Equation as a Coupled System in the app