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

Nonhomogeneous systems

Real systems are pushed from outside: brine flows into a tank, a motor drives a set of masses, a heater warms a room. This topic shows how to add that push to a linear system and still solve it exactly, using the same two methods you met for single equations.

Systems with an outside push

The earlier topics of this section, from Real eigenvalues to Repeated eigenvalues, solved homogeneous systems \(\mathbf{x}' = A\mathbf{x}\). Here a known forcing vector \(\mathbf{g}(t)\) is added:

\mathbf{x}' = A\mathbf{x} + \mathbf{g}(t)

The matrix \(A\) has constant entries, and each component of \(\mathbf{g}\) is a known function of \(t\), such as an inflow rate or an applied force. The system is called nonhomogeneous, or forced. To save space, a column vector is written as a row inside sentences in this topic, so \((1, 2)\) means the column vector with entries 1 and 2.

Complementary plus particular

Suppose \(\mathbf{x}_p\) is one solution of the forced system and \(\mathbf{x}\) is any other. Subtracting the two equations shows that \(\mathbf{x} - \mathbf{x}_p\) solves the homogeneous system \(\mathbf{x}' = A\mathbf{x}\). So every solution has the form

\mathbf{x} = \mathbf{x}_c + \mathbf{x}_p

where the complementary solution \(\mathbf{x}_c = c_1\mathbf{x}_1 + c_2\mathbf{x}_2\) is the general solution of the homogeneous system. This is the same structure as in the topic Nonhomogeneous equations. The plan is fixed: find \(\mathbf{x}_c\) from eigenvalues and eigenvectors, find any one \(\mathbf{x}_p\), add them, and only then apply the initial condition.

Undetermined coefficients with vectors

The guesses from the topic Undetermined coefficients carry over, with one change: every coefficient becomes an unknown constant vector. For a linear polynomial in \(\mathbf{g}\), guess \(\mathbf{x}_p = t\mathbf{a} + \mathbf{b}\); for \(e^{rt}\), guess \(e^{rt}\mathbf{a}\); for \(\cos\omega t\) or \(\sin\omega t\), guess \(\mathbf{a}\cos\omega t + \mathbf{b}\sin\omega t\). Use full vectors even when one component of \(\mathbf{g}\) is zero, because \(A\) mixes the components. For constant forcing \(\mathbf{g} = \mathbf{b}\), the guess \(\mathbf{x}_p = \mathbf{a}\) gives \(A\mathbf{a} + \mathbf{b} = \mathbf{0}\), so \(\mathbf{a} = -A^{-1}\mathbf{b}\) when \(A\) is invertible. This constant solution is the system's equilibrium. With \(A\) having rows \((-3, 1)\) and \((1, -3)\) and \(\mathbf{b} = (4, 0)\), it is \((1.5, 0.5)\), and since the eigenvalues \(-2\) and \(-4\) are negative, every solution approaches it.

Worked example: a linear forcing term

Solve

\mathbf{x}' = \begin{bmatrix} 1 & 1 \\ 4 & 1 \end{bmatrix}\mathbf{x} + \begin{bmatrix} 2 - 3t \\ -6t \end{bmatrix}

1. Complementary solution: the eigenvalues are 3 and \(-1\), with eigenvectors \((1, 2)\) and \((1, -2)\), so \(\mathbf{x}_c = c_1e^{3t}(1, 2) + c_2e^{-t}(1, -2)\). 2. Guess \(\mathbf{x}_p = t\mathbf{a} + \mathbf{b}\), so \(\mathbf{x}_p' = \mathbf{a}\), and write \(\mathbf{g} = t(-3, -6) + (2, 0)\). 3. Match the \(t\) terms: \(A\mathbf{a} = (3, 6)\), giving \(\mathbf{a} = (1, 2)\). 4. Match the constants: \(A\mathbf{b} = \mathbf{a} - (2, 0) = (-1, 2)\), giving \(\mathbf{b} = (1, -2)\). 5. So \(\mathbf{x}_p = (t + 1, 2t - 2)\). Check: \(A\mathbf{x}_p = (3t - 1, 6t + 2)\), and adding \(\mathbf{g}\) gives \((1, 2) = \mathbf{x}_p'\).

When the forcing matches an eigenvalue

For a single equation, a guess that duplicates a complementary solution is fixed by multiplying it by \(t\). Systems need more. If \(\mathbf{g} = e^{rt}\mathbf{c}\) and \(r\) is an eigenvalue of \(A\), the guess \(te^{rt}\mathbf{a}\) on its own usually fails: substituting it forces \(\mathbf{a}\) to be an eigenvector and also forces \(\mathbf{a} = \mathbf{c}\), which only works when \(\mathbf{c}\) happens to be an eigenvector. The guess that works is

\mathbf{x}_p = e^{rt}(t\mathbf{a} + \mathbf{b})

with two unknown vectors. Variation of parameters, below, avoids the question entirely, which is one reason to know it.

Fundamental matrices

Put \(n\) linearly independent solutions of \(\mathbf{x}' = A\mathbf{x}\) side by side as the columns of a matrix \(X(t)\), called a fundamental matrix. Differentiating column by column gives \(X' = AX\), and because the columns are independent, \(\det X(t)\) is never zero, so \(X(t)\) always has an inverse. The complementary solution is then simply \(\mathbf{x}_c = X(t)\mathbf{c}\), where \(\mathbf{c}\) is a vector of arbitrary constants. Variation of parameters replaces that constant vector with a vector function.

Variation of parameters for systems

Guess \(\mathbf{x}_p = X(t)\mathbf{v}(t)\). By the product rule, \(X'\mathbf{v} + X\mathbf{v}' = AX\mathbf{v} + \mathbf{g}\). Since \(X' = AX\), the first terms on each side cancel, leaving \(X\mathbf{v}' = \mathbf{g}\), so \(\mathbf{v}' = X^{-1}\mathbf{g}\). Integrating entry by entry gives

\mathbf{x}_p = X(t)\int X^{-1}(t)\,\mathbf{g}(t)\,dt

Constants of integration can be dropped, because they only add a multiple of \(X\mathbf{c}\), which is already in \(\mathbf{x}_c\). The derivation is shorter than the one for second order equations, and it works for any continuous \(\mathbf{g}\).

Worked example: variation of parameters

Find \(\mathbf{x}_p\) for \(A\) with rows \((2, 1)\) and \((1, 2)\) and \(\mathbf{g} = (2e^t, 0)\). 1. The eigenvalues are 3 and 1, with eigenvectors \((1, 1)\) and \((1, -1)\), so

X = \begin{bmatrix} e^{3t} & e^{t} \\ e^{3t} & -e^{t} \end{bmatrix}, \quad X^{-1} = \frac{1}{2}\begin{bmatrix} e^{-3t} & e^{-3t} \\ e^{-t} & -e^{-t} \end{bmatrix}

2. Multiply: \(X^{-1}\mathbf{g} = (e^{-2t}, 1)\). 3. Integrate: \(\mathbf{v} = (-\tfrac{1}{2}e^{-2t}, t)\). 4. Multiply back:

\mathbf{x}_p = X\mathbf{v} = \begin{bmatrix} te^t - \tfrac{1}{2}e^t \\ -te^t - \tfrac{1}{2}e^t \end{bmatrix}

5. Check the first row: \(x_1' = te^t + \tfrac{1}{2}e^t\), and \(2x_1 + x_2 + 2e^t\) gives the same. The \(te^t\) terms appear because the forcing rate 1 is an eigenvalue, so the plain guess \(e^t\mathbf{a}\) would have failed.

The matrix exponential

The series \(e^{At} = I + At + \frac{(At)^2}{2!} + \cdots\) converges for every square matrix. Its derivative is \(Ae^{At}\) and it equals \(I\) at \(t = 0\), so it is the fundamental matrix that starts at the identity: \(e^{At} = X(t)X(0)^{-1}\). If \(A = PDP^{-1}\) with \(D\) diagonal, then \(e^{At} = Pe^{Dt}P^{-1}\). For the matrix in the last example, \(e^{At}\) has diagonal entries \(\tfrac{1}{2}(e^{3t} + e^t)\) and off-diagonal entries \(\tfrac{1}{2}(e^{3t} - e^t)\). The solution with \(\mathbf{x}(0) = \mathbf{x}_0\) is

\mathbf{x}(t) = e^{At}\mathbf{x}_0 + \int_0^t e^{A(t-s)}\mathbf{g}(s)\,ds

the response to the starting state plus the accumulated response to the input, a formula at the heart of control theory.

Common mistakes to avoid

First, applying the initial condition to \(\mathbf{x}_c\) alone, before adding \(\mathbf{x}_p\). Second, using scalar coefficients, or leaving a component out of the guess because that component of \(\mathbf{g}\) is zero. Third, multiplying a guess by \(t\) only, when the forcing rate is an eigenvalue: the guess needs \(e^{rt}(t\mathbf{a} + \mathbf{b})\). Fourth, reversing the order in the formula: it is \(X\int X^{-1}\mathbf{g}\,dt\), and matrix products do not commute. Fifth, taking \(e^{At}\) to be the matrix of entries \(e^{a_{ij}t}\). Only a diagonal \(A\) exponentiates entry by entry, and only on its diagonal: the zero entries stay zero rather than becoming \(e^0 = 1\).

Key takeaways

A forced linear system \(\mathbf{x}' = A\mathbf{x} + \mathbf{g}(t)\) has general solution \(\mathbf{x}_c + \mathbf{x}_p\). Undetermined coefficients works as for single equations, with vector coefficients; constant forcing gives the equilibrium \(-A^{-1}\mathbf{b}\), and a forcing rate equal to an eigenvalue needs \(e^{rt}(t\mathbf{a} + \mathbf{b})\). Variation of parameters uses a fundamental matrix: \(\mathbf{x}_p = X\int X^{-1}\mathbf{g}\,dt\), valid for any continuous forcing. The matrix exponential \(e^{At}\) is the fundamental matrix equal to \(I\) at \(t = 0\), and it gives the initial value solution in one formula.

Flashcards

Flashcard

x′ = Ax + g(t)

A nonhomogeneous (forced) linear system

g(t) is the known outside input.

Test your understanding

Question 1 of 5

For x′ = Ax + b with A = [[−2, 0], [0, −4]] and b = (6, 8), what is the constant particular solution?

Question 2 of 5

The forcing in x′ = Ax + g is g(t) = (t, 0), and 0 is not an eigenvalue of A. Which guess for x_p is correct?

Question 3 of 5

X(t) is a fundamental matrix for x′ = Ax. Which formula gives a particular solution of x′ = Ax + g(t)?

Question 4 of 5

The forcing is g(t) = e^(2t)c, and 2 is an eigenvalue of A, but c is not an eigenvector. Which undetermined-coefficients guess works?

Question 5 of 5

A is diagonal with diagonal entries 3 and −2. What is e^(At)?

← Previous topicNext topic →