Differential Equations › Section E · Systems of differential equations › Topic E.2

Systems of differential equations

Salt moving between connected tanks, current in a two-loop circuit, two masses joined by springs: whenever several quantities drive each other's rates of change, one equation is not enough. This topic sets up systems of equations, shows how any higher-order equation becomes one, and introduces the matrix form used for the rest of the section.

Quantities that change together

So far each equation has had one unknown function. Many situations involve several unknowns whose rates depend on one another. In two connected tanks, the salt in each tank changes because brine flows between them. In a circuit with two loops, each current affects the other through a shared component. A system of differential equations gives each unknown function its own equation, and the equations must be solved together. A solution is a set of functions, such as \(x_1(t)\) and \(x_2(t)\), that satisfies every equation at once on some interval of \(t\).

First-order linear systems

This section studies first-order linear systems. First order means no derivative higher than the first appears. Linear means each unknown and its derivative appear only to the first power, never multiplied by each other or inside functions such as sine. A two-unknown example is

\begin{aligned} x_1' &= a(t)x_1 + b(t)x_2 + g_1(t) \\ x_2' &= c(t)x_1 + d(t)x_2 + g_2(t) \end{aligned}

The system is coupled when \(x_1'\) depends on \(x_2\) and \(x_2'\) depends on \(x_1\): then neither equation can be solved alone. The classic predator-prey model contains products of the two populations, so it is nonlinear; "Nonlinear systems: equilibria and linearization" deals with such models.

Worked example: two connected tanks

Tanks 1 and 2 each hold 100 L of brine. Fresh water enters tank 1 at 5 L/min, brine is pumped from tank 1 to tank 2 at 9 L/min and from tank 2 back to tank 1 at 4 L/min, and tank 2 drains at 5 L/min. Assume each tank is well mixed. Let \(x_1\) and \(x_2\) be the kilograms of salt in each. 1. Check volumes: each tank gains 9 L/min and loses 9 L/min, so both stay at 100 L. 2. Salt leaves a tank at (flow rate) × (amount ÷ 100). 3. Tank 1 loses \(0.09x_1\) and gains \(0.04x_2\). 4. Tank 2 gains \(0.09x_1\) and loses \(0.04x_2 + 0.05x_2\). 5. So \(x_1' = -0.09x_1 + 0.04x_2\) and \(x_2' = 0.09x_1 - 0.09x_2\), a coupled linear system.

Higher-order equations become systems

Any \(n\)th-order linear equation can be rewritten as \(n\) first-order equations. Introduce one new unknown for \(y\) and for each of its derivatives up to order \(n - 1\):

x_1 = y, \quad x_2 = y', \quad \dots, \quad x_n = y^{(n-1)}

Differentiating gives \(x_1' = x_2\), \(x_2' = x_3\) and so on, up to \(x_{n-1}' = x_n\). The last equation, for \(x_n' = y^{(n)}\), comes from solving the original equation for its highest derivative. The initial conditions convert directly: \(x_1(t_0) = y(t_0)\), \(x_2(t_0) = y'(t_0)\), and so on.

Worked example: a second-order initial value problem

Rewrite \(2y'' - 6y' + 4y = 0\), \(y(0) = 1\), \(y'(0) = -3\) as a system. 1. Let \(x_1 = y\) and \(x_2 = y'\). 2. Then \(x_1' = y' = x_2\). 3. Solve the equation for the highest derivative, dividing by 2 first: \(y'' = 3y' - 2y\). 4. So \(x_2' = -2x_1 + 3x_2\). 5. The initial conditions become \(x_1(0) = 1\) and \(x_2(0) = -3\). Notice that the first equation simply records that \(x_2\) is the derivative of \(x_1\); all of the information in the original equation sits in the second.

Matrix form

Stack the unknowns into a vector \(\mathbf{x}(t)\) and differentiate entry by entry. A linear system with constant coefficients and no extra terms is then \(\mathbf{x}' = A\mathbf{x}\), where row \(i\) of \(A\) holds the coefficients of the equation for \(x_i'\). For the tanks,

\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}' = \begin{bmatrix} -0.09 & 0.04 \\ 0.09 & -0.09 \end{bmatrix}\begin{bmatrix} x_1 \\ x_2 \end{bmatrix}

and for the second-order example, \(A\) has rows (0, 1) and (-2, 3). Writing systems this way lets the matrix tools of "Review: matrices, vectors, and eigenvalues" do the work.

Worked example: a third-order equation with forcing

Write \(y''' - ty' + 2y = e^t\), \(y(0) = 0\), \(y'(0) = 1\), \(y''(0) = 4\) in matrix form. 1. Let \(x_1 = y\), \(x_2 = y'\), \(x_3 = y''\). 2. Then \(x_1' = x_2\) and \(x_2' = x_3\). 3. Solve for \(y'''\): \(x_3' = -2x_1 + tx_2 + e^t\). 4. The term \(e^t\) multiplies no unknown, so it goes in a separate vector:

\mathbf{x}' = \begin{bmatrix} 0 & 1 & 0 \\ 0 & 0 & 1 \\ -2 & t & 0 \end{bmatrix}\mathbf{x} + \begin{bmatrix} 0 \\ 0 \\ e^t \end{bmatrix}

5. The initial vector is \(\mathbf{x}(0) = (0, 1, 4)\).

Homogeneous systems and initial value problems

In general a linear system reads \(\mathbf{x}' = A(t)\mathbf{x} + \mathbf{g}(t)\). It is homogeneous when \(\mathbf{g}(t) = \mathbf{0}\) for all \(t\) and nonhomogeneous otherwise; the tank system is homogeneous, the third-order example is not. Adding a starting vector \(\mathbf{x}(t_0) = \mathbf{x}_0\) makes an initial value problem. The existence and uniqueness theorem for linear systems says: if every entry of \(A(t)\) and \(\mathbf{g}(t)\) is continuous on an open interval containing \(t_0\), the problem has exactly one solution, and it exists on that whole interval. In the third-order example, \(t\) and \(e^t\) are continuous everywhere, so the solution exists for all \(t\).

Why the conversion pays off

Rewriting everything as a first-order system brings one theory and one toolkit to every linear problem, whatever its order. Numerical solvers, including those in "Runge-Kutta and multistep methods", are written for first-order systems, so software solves a third-order equation by converting it exactly as above. Most importantly, when \(A\) is constant the eigenvalues and eigenvectors of \(A\) describe every solution, which the next topics develop. Later topics, "Nonhomogeneous systems" and "Laplace transforms for systems", return to the forcing term \(\mathbf{g}(t)\).

Common mistakes to avoid

First, forgetting to divide by the leading coefficient before solving for the highest derivative: \(2y'' - 6y' + 4y = 0\) gives \(y'' = 3y' - 2y\), not \(6y' - 4y\). Second, using too many unknowns: an \(n\)th-order equation needs \(x_1\) to \(x_n\), stopping at \(y^{(n-1)}\). Third, converting initial conditions carelessly: \(x_2(t_0)\) is \(y'(t_0)\), not \(y(t_0)\). Fourth, putting a forcing term such as \(e^t\) inside the matrix; it multiplies no unknown, so it belongs in \(\mathbf{g}(t)\). Fifth, calling a system linear when it contains a product such as \(x_1x_2\).

Key takeaways

A system of differential equations gives each of several unknown functions its own equation, and coupled equations must be solved together. An \(n\)th-order linear equation becomes \(n\) first-order equations through \(x_1 = y, \dots, x_n = y^{(n-1)}\). Every first-order linear system can be written \(\mathbf{x}' = A(t)\mathbf{x} + \mathbf{g}(t)\): homogeneous when \(\mathbf{g} = \mathbf{0}\). With continuous entries, an initial value problem has exactly one solution on the whole interval.

Flashcards

Flashcard

System of differential equations

Several unknown functions, each with its own equation, solved together

A solution satisfies every equation at once.

Test your understanding

Question 1 of 5

To write y″ + 5y′ − 3y = 0 as a system with x₁ = y and x₂ = y′, what is x₂′?

Question 2 of 5

The equation 4y″ − 8y′ + 12y = 0 is written as x′ = Ax with x₁ = y and x₂ = y′. What is the second row of A?

Question 3 of 5

How many first-order equations are needed to rewrite a fourth-order equation in y as a system?

Question 4 of 5

The system x₁′ = 2x₁ − tx₂ + sin t, x₂′ = x₁ + 4 is written as x′ = A(t)x + g(t). What is g(t)?

Question 5 of 5

In the two-tank model, why does x₂ appear in the equation for x₁′?

← Previous topicNext topic →