Nonhomogeneous Systems: Variation of Parameters

Collecting the fundamental solutions as the columns of a fundamental matrix 𝐘 ( t ) lets the homogeneous general solution be written compactly as 𝐲 = 𝐘 ( t ) 𝐜 . Replacing the constant vector 𝐜 by a vector of functions 𝐮 ( t ) produces the single elegant formula \mathbf{u}' = \mathbf{Y}^{-1}\mathbf{g}, which solves every nonhomogeneous system whose homogeneous solutions are known.

Quick Reference

Item Statement
Fundamental matrix 𝐘 ( t ) whose columns are 𝐲 ( 1 ) , , 𝐲 ( n )
Homogeneous general solution 𝐲 ( t ) = 𝐘 ( t ) 𝐜
Key property \mathbf{Y}'(t) = \mathbf{A}(t)\mathbf{Y}(t)
Invertibility det 𝐘 ( t ) is the Wronskian, never zero
Ansatz 𝐲 p = 𝐘 ( t ) 𝐮 ( t )
Resulting equation \mathbf{u}'(t) = \mathbf{Y}^{-1}(t)\mathbf{g}(t)
Particular solution 𝐲 p = 𝐘 ( t ) 𝐘 1 ( t ) 𝐠 ( t ) d t
2 × 2 inverse [ a b c d ] 1 = 1 a d b c [ d b c a ]
Constants Omit the constant of integration; only one particular solution is required

The Fundamental Matrix

Let 𝐲 ( 1 ) ( t ) , 𝐲 ( 2 ) ( t ) , , 𝐲 ( n ) ( t ) form a fundamental set of solutions of the homogeneous system \mathbf{y}' = \mathbf{A}(t)\mathbf{y}. Then the general solution

𝐲 ( t ) = c 1 𝐲 ( 1 ) ( t ) + c 2 𝐲 ( 2 ) ( t ) + + c n 𝐲 ( n ) ( t )

can also be written as

\mathbf{y}(t) = \mathbf{Y}(t)\mathbf{c} , \tag{i}

where 𝐜 is the n × 1 column vector of constants

𝐜 = [ c 1 c 2 c n ]

and 𝐘 ( t ) is the n × n matrix, called a fundamental matrix, whose columns are the fundamental solutions:

𝐘 ( t ) = [ | | | 𝐲 ( 1 ) ( t ) 𝐲 ( 2 ) ( t ) 𝐲 ( n ) ( t ) | | | ] .

Writing 𝐘 𝐜 instead of a sum is not merely cosmetic. Matrix-vector multiplication is the operation "multiply each column by the corresponding constant and add", so the two expressions are literally the same computation. The gain is that 𝐘 can now be inverted, differentiated, and manipulated as a single object.

Two properties will be needed:

  • \mathbf{Y}'(t) = \mathbf{A}(t)\mathbf{Y}(t), because each column satisfies the homogeneous system.
  • det ( 𝐘 ( t ) ) is the Wronskian of the fundamental solutions, and since they are linearly independent it is never zero. Hence 𝐘 1 ( t ) always exists.

The Method

To find a particular solution of

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

we replace the constant vector 𝐜 in (i) by a column vector of functions 𝐮 ( t ) , exactly as in the scalar version of variation of parameters:

𝐲 p = 𝐘 ( t ) 𝐮 ( t ) with 𝐮 ( t ) = [ u 1 ( t ) u n ( t ) ] .

The calculation below shows that

\mathbf{u}'(t) = \mathbf{Y}^{-1}(t)\mathbf{g}(t) \tag{iii}

and thus

\mathbf{u}(t) = \int\mathbf{Y}^{-1}(t)\mathbf{g}(t)\,dt . \tag{iv}
Derivation

Starting from 𝐲 p = 𝐘 ( t ) 𝐮 ( t ) and differentiating with the product rule,

\mathbf{y}_p' = \mathbf{Y}'(t)\mathbf{u}(t) + \mathbf{Y}(t)\mathbf{u}'(t) .

Note that 𝐘 ( t ) and \mathbf{Y}'(t) are n × n matrices while 𝐮 ( t ) and \mathbf{u}'(t) are n × 1 , so the order of the products matters. The expression \mathbf{u}'(t)\mathbf{Y}(t) is not even defined.

Substituting into \mathbf{y}' = \mathbf{A}(t)\mathbf{y} + \mathbf{g}(t),

\underbrace{\mathbf{Y}'(t)\mathbf{u}(t) + \mathbf{Y}(t)\mathbf{u}'(t)}_{\mathbf{y}_p'} = \mathbf{A}(t)\underbrace{\mathbf{Y}(t)\mathbf{u}(t)}_{\mathbf{y}_p} + \mathbf{g}(t) .

Since 𝐘 ( t ) is a fundamental matrix of \mathbf{y}' = \mathbf{A}(t)\mathbf{y}, we have \mathbf{Y}'(t) = \mathbf{A}(t)\mathbf{Y}(t). Therefore the term 𝐀 ( t ) 𝐘 ( t ) 𝐮 ( t ) on the right is identical to \mathbf{Y}'(t)\mathbf{u}(t) on the left, and the two cancel:

\mathbf{Y}(t)\mathbf{u}'(t) = \mathbf{g}(t) .

Multiplying both sides on the left by 𝐘 1 ( t ) ,

\underbrace{\mathbf{Y}^{-1}(t)\mathbf{Y}(t)}_{\mathbf{I}}\mathbf{u}'(t) = \mathbf{Y}^{-1}(t)\mathbf{g}(t)

so

𝐮 ( t ) = 𝐘 1 ( t ) 𝐠 ( t ) d t .

Two remarks. First, det ( 𝐘 ( t ) ) is the Wronskian of linearly independent solutions, hence nonzero, so the inverse always exists. Second, since we are looking for only one particular solution, the constant of integration is unnecessary: adding one contributes 𝐘 ( t ) 𝐤 , a homogeneous solution absorbed into 𝐲 h .

Compare this with the scalar case of Section 4.4. There, Cramer's rule on a 2 × 2 system produced two separate formulas for u_1' and u_2'. Here the same content is packaged as a single matrix equation, and the two formulas reappear when 𝐘 1 is written out. The matrix version is both shorter and valid at any size.

Worked Example

Find a particular solution for

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

Here

𝐀 = [ 3 1 6 2 ] and 𝐠 ( t ) = [ t e t ] .

Step 1: the fundamental matrix. The eigenvalues of 𝐀 are λ 1 = 1 and λ 2 = 0 , with associated eigenvectors

𝐯 ( 1 ) = [ 1 2 ] , 𝐯 ( 2 ) = [ 1 3 ] .

Therefore two linearly independent solutions of the homogeneous system are

𝐲 ( 1 ) = [ 1 2 ] e t , 𝐲 ( 2 ) = [ 1 3 ] e 0 t 1 ,

and the general solution of the homogeneous system is

𝐲 h = [ e t 1 2 e t 3 ] 𝐘 ( t ) [ c 1 c 2 ] 𝐜 .

Step 2: invert 𝐘 .

det ( 𝐘 ( t ) ) = 3 e t 2 e t = e t

so, using the 2 × 2 inverse formula,

\begin{aligned} \mathbf{Y}^{-1}(t) &= \frac{1}{e^{t}}\begin{bmatrix} 3 & -1 \\ -2e^{t} & e^{t} \end{bmatrix} \\ &= \begin{bmatrix} 3e^{-t} & -e^{-t} \\ -2 & 1 \end{bmatrix} \end{aligned}

Step 3: compute \mathbf{u}'.

\begin{aligned} \mathbf{u}' &= \mathbf{Y}^{-1}(t)\mathbf{g}(t) \\ &= \begin{bmatrix} 3e^{-t} & -e^{-t} \\ -2 & 1 \end{bmatrix}\begin{bmatrix} t \\ e^{t} \end{bmatrix} \\ &= \begin{bmatrix} 3te^{-t} - 1 \\ -2t + e^{t} \end{bmatrix} \end{aligned}

where the first entry used e t e t = 1 .

Step 4: integrate.

𝐮 = [ ( 3 t e t 1 ) d t ( 2 t + e t ) d t ] = [ 3 e t ( t + 1 ) t t 2 + e t ]

For the first integral, integrate t e t by parts with u = t and d v = e t d t , so v = e t :

t e t d t = t e t ( e t ) d t = t e t e t = e t ( t + 1 ) .

No constant of integration is added, since it is unnecessary.

Step 5: assemble.

\begin{aligned} \mathbf{y}_p &= \mathbf{Y}\mathbf{u} \\ &= \begin{bmatrix} e^{t} & 1 \\ 2e^{t} & 3 \end{bmatrix}\begin{bmatrix} -3e^{-t}(t+1) - t \\ -t^{2} + e^{t} \end{bmatrix} \\ &= \begin{bmatrix} -3t - 3 - te^{t} - t^{2} + e^{t} \\ -6t - 6 - 2te^{t} - 3t^{2} + 3e^{t} \end{bmatrix} . \end{aligned}

For the first component, e t [ 3 e t ( t + 1 ) t ] = 3 ( t + 1 ) t e t , and adding the second entry of 𝐮 gives 3 t 3 t e t t 2 + e t .

The general solution is 𝐲 = 𝐘 𝐜 + 𝐲 p .

Comparison. Section 5.3 solved the same system by undetermined coefficients and obtained

𝐲 p UC = [ 3 t t 2 t e t 3 6 t 3 t 2 + ( 1 2 t ) e t ] .

The difference between the two particular solutions is

[ 3 + e t 9 + 2 e t ] = 3 [ 1 3 ] + e t [ 1 2 ] ,

a combination of the two homogeneous solutions, exactly as the structure theorem predicts. Different methods produce different particular solutions and the same general solution.

Exercises

Use variation of parameters to find a particular solution of

\mathbf{y}' = \begin{bmatrix} 2 & 0 \\ 0 & -1 \end{bmatrix}\mathbf{y} + \begin{bmatrix} 1 \\ t \end{bmatrix} .
Solution

The matrix is diagonal, so 𝐘 ( t ) = [ e 2 t 0 0 e t ] and 𝐘 1 ( t ) = [ e 2 t 0 0 e t ] .

\mathbf{u}' = \begin{bmatrix} e^{-2t} \\ te^{t} \end{bmatrix} \quad \Longrightarrow \quad \mathbf{u} = \begin{bmatrix} -\tfrac{1}{2}e^{-2t} \\ (t-1)e^{t} \end{bmatrix}

using integration by parts for the second entry. Therefore

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

Check: y_1' = 0 and 2 y 1 + 1 = 1 + 1 = 0 . ✓ And y_2' = 1 while y 2 + t = ( t 1 ) + t = 1 . ✓

Find a particular solution of \mathbf{y}' = \begin{bmatrix} 1 & 1 \\ 0 & 1 \end{bmatrix}\mathbf{y} + \begin{bmatrix} 0 \\ e^{t} \end{bmatrix}, given the fundamental matrix 𝐘 ( t ) = [ e t t e t 0 e t ] .

Solution

Here det 𝐘 = e 2 t , so

𝐘 1 = 1 e 2 t [ e t t e t 0 e t ] = [ e t t e t 0 e t ] .

Then

\mathbf{u}' = \begin{bmatrix} e^{-t} & -te^{-t} \\ 0 & e^{-t} \end{bmatrix}\begin{bmatrix} 0 \\ e^{t} \end{bmatrix} = \begin{bmatrix} -t \\ 1 \end{bmatrix} \quad \Longrightarrow \quad \mathbf{u} = \begin{bmatrix} -t^{2}/2 \\ t \end{bmatrix} .

Therefore

𝐲 p = [ e t t e t 0 e t ] [ t 2 / 2 t ] = [ t 2 2 e t + t 2 e t t e t ] = [ t 2 2 e t t e t ] .

Note that the coefficient matrix here is defective, which is why 𝐘 contains the term t e t .

Explain why 𝐘 1 must multiply 𝐠 on the left rather than the right.

Solution

From \mathbf{Y}\mathbf{u}' = \mathbf{g}, isolating \mathbf{u}' requires cancelling 𝐘 from the left, which means multiplying both sides on the left by 𝐘 1 : \mathbf{Y}^{-1}\mathbf{Y}\mathbf{u}' = \mathbf{Y}^{-1}\mathbf{g}.

Multiplying on the right is not even defined. 𝐠 is n × 1 and 𝐘 1 is n × n , so the product 𝐠 𝐘 1 requires the inner dimensions 1 and n to match, which they do not. Matrix multiplication is not commutative, and dimension checking catches most errors of this kind immediately.

Frequently Asked Questions

What is a fundamental matrix?

The n × n matrix whose columns are n linearly independent solutions of the homogeneous system. It satisfies \mathbf{Y}' = \mathbf{A}\mathbf{Y}, and multiplying it by a constant vector 𝐜 reproduces the general homogeneous solution.


Is the fundamental matrix unique?

No. Any set of n independent solutions works, and reordering columns or rescaling them gives another valid fundamental matrix. Different choices produce different intermediate 𝐮 , but the same general solution. Some texts prefer the normalized choice with 𝐘 ( t 0 ) = 𝐈 , which makes initial conditions trivial to apply.


Why is 𝐘 ( t ) always invertible?

Because its determinant is the Wronskian of a set of linearly independent solutions, which by the theory of Section 3.3 is never zero on the interval. This is precisely what makes the method work at every value of t .


Do I need the constant of integration?

No. Adding a constant vector 𝐤 to 𝐮 contributes 𝐘 ( t ) 𝐤 to 𝐲 p , which is a homogeneous solution and gets absorbed into 𝐲 h . Since any particular solution suffices, take the simplest antiderivative componentwise.


Which is better for systems, undetermined coefficients or variation of parameters?

For 2 × 2 systems, variation of parameters is often faster, because inverting a 2 × 2 matrix takes one line while working out the correct modified trial form can take several. Variation of parameters is also the only option when 𝐀 varies with t or when 𝐠 contains functions outside the allowed class.


Why do I get a different particular solution from each method?

Because "a particular solution" is not unique: any two differ by a homogeneous solution. Both answers give the same general solution once 𝐲 h is added, with the arbitrary constants shifted. The comparison at the end of the worked example shows exactly this.