Nonhomogeneous Systems: Undetermined Coefficients

For a nonhomogeneous system \mathbf{y}' = \mathbf{A}\mathbf{y} + \mathbf{g}(t), the general solution splits as 𝐲 = 𝐲 h + 𝐲 p exactly as in the scalar case. When 𝐀 is constant and 𝐠 is built from polynomials, exponentials, and trigonometric functions, 𝐲 p can be found by assuming a form similar to 𝐠 with undetermined vector coefficients. The modification rules, however, are not the same as for a single equation.

Quick Reference

Item Statement
The system d d t 𝐲 = 𝐀 ( t ) 𝐲 + 𝐠 ( t ) , with 𝐠 0
General solution 𝐲 = 𝐲 h + 𝐲 p
𝐲 h General solution of \mathbf{y}' = \mathbf{A}(t)\mathbf{y}
𝐲 p Any particular solution of the full system
Method applies when 𝐀 has constant entries and the components of 𝐠 are polynomials, sines, cosines, exponentials, or products of these
𝐠 quadratic 𝐲 p = 𝐜 1 + 𝐜 2 t + 𝐜 3 t 2
Modification, zero eigenvalue 𝐠 constant requires 𝐲 p = 𝐛 + 𝐜 t , not 𝐜 t alone
Modification, λ 1 an eigenvalue 𝐠 = 𝐛 e λ 1 t requires 𝐲 p = 𝐜 1 e λ 1 t + 𝐜 2 t e λ 1 t

The Structure Theorem

In this section we find the general solution of a nonhomogeneous linear system

\frac{d}{dt}\mathbf{y} = \mathbf{A}(t)\mathbf{y} + \mathbf{g}(t) , \tag{i}

where the elements of the n × n matrix 𝐀 ( t ) and the vector 𝐠 ( t ) are continuous on some interval J of the t -axis, and 𝐠 ( t ) is not identically 0 .

The general solution of (i) can be written as

𝐲 = 𝐲 h + 𝐲 p ,

where 𝐲 h is the general solution of the associated homogeneous system \mathbf{y}' = \mathbf{A}(t)\mathbf{y} and 𝐲 p is any particular solution of (i).

The proof is identical to the scalar case: the difference of two solutions of (i) solves the homogeneous system.

Two methods are available for finding 𝐲 p : undetermined coefficients, treated here, and variation of parameters, treated in Section 5.4.

When the Method Applies

Similar to the method of undetermined coefficients for a single linear equation, this method applies to \mathbf{y}' = \mathbf{A}\mathbf{y} + \mathbf{g}(t) only when

  • the elements of 𝐀 are constants, and
  • the elements of 𝐠 ( t ) are polynomials, sines and cosines, exponential functions, or products of two or more such functions.

In such cases we assume 𝐲 p has a form similar to 𝐠 ( t ) . For example, if the components of 𝐠 ( t ) are quadratic functions, we set

𝐲 p = 𝐜 1 + 𝐜 2 t + 𝐜 3 t 2 ,

where 𝐜 1 , 𝐜 2 , and 𝐜 3 are constant vectors whose components are to be determined. Note that each undetermined coefficient is now a vector with n components, so a quadratic trial function for a 2 × 2 system involves six unknown numbers.

Important. Use the same trial form in every component, even if some components of 𝐠 are simpler than others. In the first example below, 𝐠 = ( t , 1 ) T has a constant second component, yet the trial function carries a t term in both components, because the equations are coupled and a t in one component feeds into the other.

The Modification Rules Are Different

We learned that for a single nonhomogeneous linear equation, when a term in the choice for y p also appears in y h , the choice must be modified. The same is true for 𝐲 p . However, we cannot use exactly the same Modification Rule.

  • When an eigenvalue of the coefficient matrix is 0 , so that 𝐲 h contains a constant vector, and 𝐠 ( t ) is a constant vector, we cannot choose a constant vector for 𝐲 p . Experience might suggest 𝐲 p = 𝐜 t , but that is not enough. The correct form is 𝐲 p = 𝐛 + 𝐜 t .
  • If λ 1 is an eigenvalue of the coefficient matrix and 𝐠 ( t ) has the form 𝐛 e λ 1 t , we must look for a particular solution of the form 𝐲 p = 𝐜 1 e λ 1 t + 𝐜 2 t e λ 1 t .

In both cases the rule is: multiply by t and keep the lower-order term as well, rather than replacing it. This is the same phenomenon seen in Section 5.2, where t e λ t 𝐯 had to be supplemented by a constant vector, and it has the same cause: differentiating t times a vector produces a leftover that only an added constant vector can absorb.

Worked Examples

Find the general solution of

\begin{aligned} \frac{dy_1}{dt} &= 2y_1 + y_2 + t \\ \frac{dy_2}{dt} &= -y_1 + 2y_2 + 1 \end{aligned}
Solution

Rewrite the system as

\begin{bmatrix} y_1' \\ y_2' \end{bmatrix} = \begin{bmatrix} 2 & 1 \\ -1 & 2 \end{bmatrix}\begin{bmatrix} y_1 \\ y_2 \end{bmatrix} + \begin{bmatrix} t \\ 1 \end{bmatrix} .

Step 1: the homogeneous solution. The characteristic equation of 𝐀 is

det ( 𝐀 λ 𝐈 ) = | 2 λ 1 1 2 λ | = ( 2 λ ) 2 + 1 = λ 2 4 λ + 5 = 0 ,

giving λ 1 = 2 + i and λ 2 = λ 1 = 2 i .

The eigenvector 𝐯 ( 1 ) = ( a , b ) T associated with λ 1 satisfies

[ i 1 1 i ] [ a b ] = [ 0 0 ] i a + b = 0 .

Letting a = 1 gives b = i , so

𝐯 ( 1 ) = [ 1 i ] .

The corresponding complex solution is

\begin{aligned} \widetilde{\mathbf{y}}^{(1)} &= \mathbf{v}^{(1)}e^{\lambda_1t} = \begin{bmatrix} 1 \\ i \end{bmatrix}e^{(2+i)t} \\ &= \begin{bmatrix} 1 \\ i \end{bmatrix}e^{2t}\left(\cos t + i\sin t\right) \\ &= \begin{bmatrix} \cos t + i\sin t \\ -\sin t + i\cos t \end{bmatrix}e^{2t} \end{aligned}

using i ( cos t + i sin t ) = sin t + i cos t .

Two real solutions of the homogeneous system are

𝐲 ( 1 ) = Re ( 𝐲 ~ ( 1 ) ) = [ cos t sin t ] e 2 t , 𝐲 ( 2 ) = Im ( 𝐲 ~ ( 1 ) ) = [ sin t cos t ] e 2 t

so

𝐲 h = C 1 [ cos t sin t ] e 2 t + C 2 [ sin t cos t ] e 2 t .

Step 2: the trial particular solution. Since 𝐠 is linear in t , and neither 0 nor any polynomial-producing eigenvalue is present, take

\mathbf{y}_p = \underbrace{\begin{bmatrix} a_1 \\ b_1 \end{bmatrix}}_{\mathbf{c}_1} + \underbrace{\begin{bmatrix} a_2 \\ b_2 \end{bmatrix}}_{\mathbf{c}_2}t , \qquad\text{so}\qquad \mathbf{y}_p' = \begin{bmatrix} a_2 \\ b_2 \end{bmatrix} .

Step 3: substitute.

\begin{aligned} \begin{bmatrix} a_2 \\ b_2 \end{bmatrix} &= \begin{bmatrix} 2 & 1 \\ -1 & 2 \end{bmatrix}\left(\begin{bmatrix} a_1 \\ b_1 \end{bmatrix} + \begin{bmatrix} a_2 \\ b_2 \end{bmatrix}t\right) + \begin{bmatrix} t \\ 1 \end{bmatrix} \\ &= \begin{bmatrix} 2a_1 + b_1 \\ -a_1 + 2b_1 \end{bmatrix} + \begin{bmatrix} \left(2a_2 + b_2\right)t \\ \left(-a_2 + 2b_2\right)t \end{bmatrix} + \begin{bmatrix} t \\ 1 \end{bmatrix} \end{aligned}

Step 4: match coefficients. Equating coefficients of like powers of t (here t 0 = 1 and t 1 ) in each row gives four equations for the four unknowns:

\left\{ \begin{aligned} 2a_2 + b_2 + 1 &= 0 && \text{(coefficients of } t \text{, 1st row)} \\ 2a_1 + b_1 &= a_2 && \text{(constants, 1st row)} \\ -a_2 + 2b_2 &= 0 && \text{(coefficients of } t \text{, 2nd row)} \\ -a_1 + 2b_1 + 1 &= b_2 && \text{(constants, 2nd row)} \end{aligned} \right.

The first and third equations involve only a 2 and b 2 . From the third, a 2 = 2 b 2 ; substituting into the first, 4 b 2 + b 2 + 1 = 0 , so

b 2 = 1 5 and a 2 = 2 5 .

Substituting these into the second and fourth equations,

2 a 1 + b 1 = 2 5 , a 1 + 2 b 1 = 6 5 .

From the first, b 1 = 2 5 2 a 1 . Substituting, a 1 4 5 4 a 1 = 6 5 , so 5 a 1 = 2 5 and

a 1 = 2 25 and b 1 = 14 25 .

Therefore

𝐲 p = [ 2 25 14 25 ] + [ 2 5 1 5 ] t .

Step 5: general solution. Since 𝐲 = 𝐲 h + 𝐲 p ,

\begin{aligned} y_1(t) &= C_1e^{2t}\cos t + C_2e^{2t}\sin t + \frac{2}{25} - \frac{2}{5}t \\ y_2(t) &= -C_1e^{2t}\sin t + C_2e^{2t}\cos t - \frac{14}{25} - \frac{1}{5}t . \end{aligned}

Solve

\begin{aligned} \frac{dy_1}{dt} &= y_1 + 1 \\ \frac{dy_2}{dt} &= -y_1 + 8 \end{aligned}
Solution

In matrix form, 𝐀 = [ 1 0 1 0 ] and 𝐠 = [ 1 8 ] .

Step 1: homogeneous solution.

det [ 1 λ 0 1 λ ] = λ ( 1 λ ) = 0 λ = 0 ,   1 .

For λ = 1 : [ 0 0 1 1 ] 𝐯 = 0 gives v 1 = v 2 , so 𝐯 = ( 1 , 1 ) T .
For λ = 0 : 𝐀 𝐯 = 0 gives v 1 = 0 , so 𝐯 = ( 0 , 1 ) T .

𝐲 h = c 1 e t [ 1 1 ] + c 2 [ 0 1 ] .

Step 2: modification. Here λ = 0 is an eigenvalue, so 𝐲 h contains a constant vector, and 𝐠 is constant. By the modification rule, take

\mathbf{y}_p = \mathbf{b} + \mathbf{c}t , \qquad \mathbf{y}_p' = \mathbf{c} .

Step 3: substitute.

𝐜 = 𝐀 ( 𝐛 + 𝐜 t ) + 𝐠 = ( 𝐀 𝐛 + 𝐠 ) + ( 𝐀 𝐜 ) t .

Matching powers of t ,

𝐀 𝐜 = 0 and 𝐜 = 𝐀 𝐛 + 𝐠 .

The first says 𝐜 lies in the null space of 𝐀 , so 𝐜 = α ( 0 , 1 ) T for some α . For the second, with 𝐛 = ( b 1 , b 2 ) T we have 𝐀 𝐛 = ( b 1 , b 1 ) T , so

𝐜 = [ b 1 + 1 b 1 + 8 ] .

Its first component must be zero, forcing b 1 = 1 , and then the second component is 1 + 8 = 9 . So 𝐜 = ( 0 , 9 ) T , and b 2 is free; take b 2 = 0 .

𝐲 p = [ 1 0 ] + [ 0 9 ] t .

Step 4: general solution.

y 1 ( t ) = c 1 e t 1 , y 2 ( t ) = c 1 e t + c 2 + 9 t .

Note that the naive trial 𝐲 p = 𝐜 t would have failed: it forces 𝐜 = 𝐀 𝐜 t + 𝐠 , which cannot hold for all t unless 𝐠 happens to be very special.

Solve

d 𝐲 d t = [ 3 1 6 2 ] 𝐲 + [ t e t ] .
Solution

Step 1: homogeneous solution. The characteristic polynomial is

λ 2 ( 3 + ( 2 ) ) λ + ( 3 ( 2 ) ( 1 ) 6 ) = λ 2 λ = λ ( λ 1 ) ,

so λ = 0 and λ = 1 .

For λ = 0 : 3 v 1 v 2 = 0 , so 𝐯 = ( 1 , 3 ) T .
For λ = 1 : [ 2 1 6 3 ] 𝐯 = 0 gives v 2 = 2 v 1 , so 𝐯 = ( 1 , 2 ) T .

𝐲 h = c 1 [ 1 3 ] + c 2 e t [ 1 2 ] .

Step 2: split 𝐠 . By superposition, handle ( t , 0 ) T and ( 0 , e t ) T separately. Both need modification: λ = 0 is an eigenvalue, so the polynomial part gains a degree, and λ = 1 is an eigenvalue, so the exponential part gains a factor of t .

Step 3: the polynomial part. Take 𝐲 p 1 = 𝐚 + 𝐛 t + 𝐜 t 2 . Substituting and matching powers,

𝐀 𝐜 = 0 , 2 𝐜 = 𝐀 𝐛 + [ 1 0 ] , 𝐛 = 𝐀 𝐚 .

From the first, 𝐜 = γ ( 1 , 3 ) T . The second requires 2 γ ( 1 , 3 ) T ( 1 , 0 ) T to lie in the range of 𝐀 , which is spanned by ( 1 , 2 ) T . So ( 2 γ 1 , 6 γ ) must be parallel to ( 1 , 2 ) : 6 γ = 2 ( 2 γ 1 ) , giving γ = 1 and 𝐜 = ( 1 , 3 ) T .

Then 𝐀 𝐛 = ( 3 , 6 ) T , whose general solution is 𝐛 = ( 0 , 3 ) T + β ( 1 , 3 ) T . The third condition needs 𝐛 itself in the range of 𝐀 , so ( β , 3 + 3 β ) parallel to ( 1 , 2 ) gives β = 3 and 𝐛 = ( 3 , 6 ) T .

Finally 𝐀 𝐚 = ( 3 , 6 ) T gives 3 a 1 a 2 = 3 ; take 𝐚 = ( 0 , 3 ) T .

𝐲 p 1 = [ 0 3 ] + [ 3 6 ] t + [ 1 3 ] t 2 .

Step 4: the exponential part. Take 𝐲 p 2 = ( 𝐩 + 𝐪 t ) e t . Substituting and matching,

𝐪 = 𝐀 𝐪     ( 𝐀 𝐈 ) 𝐪 = 0 , 𝐩 + 𝐪 = 𝐀 𝐩 + [ 0 1 ] .

The first gives 𝐪 = δ ( 1 , 2 ) T . The second reads ( 𝐀 𝐈 ) 𝐩 = 𝐪 ( 0 , 1 ) T = ( δ , 2 δ 1 ) T , and the range of 𝐀 𝐈 is spanned by ( 1 , 3 ) T , so 2 δ 1 = 3 δ gives δ = 1 and 𝐪 = ( 1 , 2 ) T .

Then ( 𝐀 𝐈 ) 𝐩 = ( 1 , 3 ) T gives 2 p 1 p 2 = 1 ; take 𝐩 = ( 0 , 1 ) T .

𝐲 p 2 = ( [ 0 1 ] + [ 1 2 ] t ) e t .

Step 5: assemble.

\begin{aligned} y_1(t) &= c_1 + c_2e^{t} - 3t - t^{2} - te^{t} \\ y_2(t) &= 3c_1 + 2c_2e^{t} + 3 - 6t - 3t^{2} + (1-2t)e^{t} \end{aligned}

The same problem is solved by variation of parameters in Section 5.4, where the answers differ by homogeneous terms, as they must.

Exercises

Find a particular solution of \mathbf{y}' = \begin{bmatrix} 1 & 1 \\ 4 & 1 \end{bmatrix}\mathbf{y} + \begin{bmatrix} 2 \\ -1 \end{bmatrix}.

Solution

The eigenvalues satisfy λ 2 2 λ 3 = 0 , giving λ = 3 , 1 . Neither is zero, so a constant trial vector suffices: 𝐲 p = 𝐜 , whence 0 = 𝐀 𝐜 + 𝐠 , that is, 𝐜 = 𝐀 1 𝐠 .

Since det 𝐀 = 1 4 = 3 ,

𝐀 1 = 1 3 [ 1 1 4 1 ] ,

so

𝐜 = 1 3 [ 1 1 4 1 ] [ 2 1 ] = 1 3 [ 3 9 ] = [ 1 3 ] .

What trial form would you use for \mathbf{y}' = \begin{bmatrix} 2 & 0 \\ 0 & 3 \end{bmatrix}\mathbf{y} + \begin{bmatrix} e^{2t} \\ \sin t \end{bmatrix}? Do not compute the coefficients.

Solution

The eigenvalues are 2 and 3 . Since λ = 2 is an eigenvalue and 𝐠 contains e 2 t , that piece needs modification:

𝐜 1 e 2 t + 𝐜 2 t e 2 t .

The term sin t corresponds to λ = ± i , which are not eigenvalues, so no modification is needed there:

𝐜 3 sin t + 𝐜 4 cos t .

Altogether

𝐲 p = 𝐜 1 e 2 t + 𝐜 2 t e 2 t + 𝐜 3 sin t + 𝐜 4 cos t ,

with eight unknown numbers for this 2 × 2 system.

Frequently Asked Questions

Why must the trial function use the same form in every component?

Because the equations are coupled. A term appearing in y 1 feeds into y 2 through the matrix, so a t present in one component generally requires a t in the other, even if the corresponding component of 𝐠 has none. Restricting the trial form component by component leads to inconsistent systems.


Why is 𝐲 p = 𝐜 t not enough when 𝐠 is constant and 0 is an eigenvalue?

Substituting gives 𝐜 = 𝐀 𝐜 t + 𝐠 , in which the left side is constant while the right has a t term. Matching forces 𝐀 𝐜 = 0 and 𝐜 = 𝐠 , which fails unless 𝐠 happens to lie in the null space of 𝐀 . Adding the constant vector 𝐛 supplies exactly the missing freedom.


My system of equations for the coefficients is inconsistent. What went wrong?

Almost certainly the trial form was not modified, or was modified insufficiently. Compare the exponents appearing in 𝐠 against the eigenvalues of 𝐀 : a constant in 𝐠 conflicts with the eigenvalue 0 , an e λ 1 t conflicts with the eigenvalue λ 1 , and sin β t or cos β t conflict with ± i β .


Can I use superposition to split 𝐠 ?

Yes, exactly as in the scalar case. Solve \mathbf{y}' = \mathbf{A}\mathbf{y} + \mathbf{g}_k separately for each piece and add the results, applying the modification rule independently to each piece. The third worked example does this, treating the polynomial and the exponential separately.


When should I switch to variation of parameters instead?

Whenever 𝐀 has non-constant entries, whenever 𝐠 falls outside the allowed class, or whenever the modifications become so tangled that computing 𝐘 1 𝐠 looks easier. For a 2 × 2 system, inverting the fundamental matrix is quick, so variation of parameters is often the faster route in practice.