Open the app

Linear Systems of ODEs

Differential Equations · Section 7.1 · generated practice set

Turning a high-order equation into a first-order system, and reading the companion matrix back again.

Practice this set → Fresh numbers on every attempt. No account needed.

Method

A system of first-order equations written in vector form: $$mathbf{x}' = Amathbf{x} + mathbf{g}(t), qquad mathbf{x} = egin{pmatrix} x_1 \ x_2 end{pmatrix}.$$ Everything from Chapter 3 reappears here, with the characteristic polynomial replaced by $det(A - lambda I)$.

Turning one high-order equation into a system

Name each derivative below the top one. For $y'' + by' + cy = 0$ take $x_1 = y$, $x_2 = y'$. Then $x_1' = x_2$ is free, and the ODE supplies the last row:

$$mathbf{x}' = egin{pmatrix} 0 & 1 \ -c & -bend{pmatrix}mathbf{x}.$$

The pattern scales: for an $n$th-order equation, $A$ is a shifted identity with the negated coefficients along the bottom row, in increasing order of derivative. This matrix is called the companion matrix, and its characteristic polynomial is exactly the original characteristic polynomial — a useful check.

Why bother

Every numerical solver in existence takes first-order systems. It is also the only sane way to handle several coupled quantities — two tanks feeding each other, two masses on connected springs, predator and prey.

Going back the other way

Given $mathbf{x}' = Amathbf{x}$ with $A$ in companion form, read the rows off and substitute: the first row identifies $x_2$ as $y'$, and the second becomes the second-order equation.

Definitions and theorems

Companion form
$y^{(n)} + a_{n-1}y^{(n-1)} + cdots + a_0y = 0$ becomes $mathbf{x}' = Amathbf{x}$ with $x_k = y^{(k-1)}$ and $A$ having ones on the superdiagonal and $egin{pmatrix} -a_0 & -a_1 & cdots & -a_{n-1}end{pmatrix}$ as its last row.
Characteristic polynomial
$det(A - lambda I)$ for the companion matrix equals the characteristic polynomial of the original equation.
Existence and uniqueness
If $A(t)$ and $mathbf{g}(t)$ are continuous on an open interval $I$ containing $t_0$, then $mathbf{x}' = A(t)mathbf{x} + mathbf{g}(t)$, $mathbf{x}(t_0) = mathbf{x}^0$ has exactly one solution on all of $I$.

Worked example

Write $y'' - 5y' + 6y = 0$ as a first-order system and confirm the eigenvalues match.

  1. Let $x_1 = y$, $x_2 = y'$.
  2. $x_1' = x_2$, and from the equation $x_2' = y'' = 5y' - 6y = -6x_1 + 5x_2$.
  3. $mathbf{x}' = egin{pmatrix} 0 & 1 \ -6 & 5end{pmatrix}mathbf{x}$.
  4. $det(A - lambda I) = lambda^2 - 5lambda + 6$ — identical to the original characteristic polynomial.
  5. Roots 2 and 3, matching $y = c_1e^{2t} + c_2e^{3t}$.

Common mistakes

  1. Sign errors in the bottom row. The entries are the negated coefficients: $y'' + by' + cy = 0$ gives $egin{pmatrix} -c & -bend{pmatrix}$, not $egin{pmatrix} c & bend{pmatrix}$.
  2. Wrong order in the bottom row. It runs from the lowest derivative to the highest, matching $x_1, x_2, ldots$ — the reverse of how the equation is usually written.
  3. Forgetting to divide by the leading coefficient. $2y'' + 3y' - y = 0$ must become $y'' + 1.5y' - 0.5y = 0$ first.
  4. Treating $mathbf{x}$ as a scalar. $mathbf{x}' = Amathbf{x}$ does not mean $mathbf{x} = Ce^{At}$ in any way you can compute by hand without eigenvalues.

Practice it

Reading the method is not the same as being able to run it under time pressure. This set generates a new problem with new coefficients every attempt, marks each part separately, and shows the full worked solution.

Open 7.1 →

More sets in Differential Equations