Differential EquationsLinear Systems6 of 6
Linear Systems · 6

Nonhomogeneous Systems

We already know how to solve x′=Ax\velocity{x'} = Ax when a system runs on its own, and now we need to find the trajectory x(t)x(t) when an outside force pushes on it over time.

1

Why Forced Solutions Split in Two

Our goal is to solve a system where the system's own motion AxAx and an outside push g(t)\forced{g(t)} act at the same time:

x′\displaystyle \velocity{x'} =Ax+g(t)⏟outside force\displaystyle = Ax + \underbrace{\forced{g(t)}}_{\text{outside force}}
Ax\htmlClass{lc-pink}{Ax}
g(t)\htmlClass{lc-green}{g(t)}

To find every possible path of the boat, we separate the natural drift of the currents from one single path that handles the outside push.

Nonhomogeneous Systems and Why Solutions Split
x′=Ax\htmlClass{lc-pink}{x'} = Ax
Ax\htmlClass{lc-pink}{Ax}

Because the derivative and matrix multiplication both distribute across a sum, the complete solution always splits into two pieces:

x(t)\displaystyle x(t) =xh(t)⏟homogeneous solution(solves x′=Ax)+xp(t)⏟particular solution(one path solving x′=Ax+g(t))\displaystyle = \underbrace{\homog{x_h(t)}}_{\substack{\text{homogeneous solution} \\ \text{(solves } \velocity{x'} = Ax\text{)}}} + \underbrace{\forced{x_p(t)}}_{\substack{\text{particular solution} \\ \text{(one path solving } \velocity{x'} = Ax + \forced{g(t)}\text{)}}}

We already find xh(t)=c1x1(t)+c2x2(t)\homog{x_h(t)} = \blockone{c_1 x_1(t)} + \blocktwo{c_2 x_2(t)} from the eigenvalues and eigenvectors of AA, so the only new job is finding one working path xp(t)\forced{x_p(t)} with no arbitrary constants.

2

Undetermined Coefficients: Exponential Forcing

First, we want to solve an initial value problem where the outside force is an exponential vector:

x′=[1221]x+[30]e2t,x(0)=[30]\displaystyle \velocity{x'} = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 3 \\ 0 \end{bmatrix}e^{2t}}, \qquad x(0) = \begin{bmatrix} 3 \\ 0 \end{bmatrix}

For the matrix A=[1221]A = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}, the eigenvalues λ1=3\blockone{\lambda_1 = 3} with eigenvector [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and λ2=−1\blocktwo{\lambda_2 = -1} with eigenvector [1−1]\blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}} give the unforced motion:

xh(t)=c1[11]e3t+c2[1−1]e−t\displaystyle \homog{x_h(t)} = \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}}

Because differentiating e2te^{2t} and multiplying by AA both keep the e2te^{2t} factor, we can guess a particular solution of the same form, xp(t)=[ab]e2t\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}e^{2t}, and solve for the unknown vector.

Undetermined Coefficients: Exponential Forcing and Initial Conditions
x′=[1221]x+[30]e2tx(0)=[30]x(t)=  ?\displaystyle \begin{aligned} \velocity{x'} &= \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 3 \\ 0 \end{bmatrix} e^{2t}} \\[6pt] x(0) &= \begin{bmatrix} 3 \\ 0 \end{bmatrix} \\[6pt] x(t) &= \;? \end{aligned}
Text solution
Guess an e2te^{2t} vector and divide out e2te^{2t}Setting xp(t)=[ab]e2t\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}e^{2t} gives xp′(t)=[2a2b]e2t\forced{x_p'(t)} = \begin{bmatrix} 2a \\ 2b \end{bmatrix}e^{2t}, which turns the differential equation into a pair of linear equations once we divide through by e2te^{2t}.
[2a2b]e2t=[1221][ab]e2t+[30]e2t[2a2b]=[a+2b+32a+b]\displaystyle \begin{aligned} \begin{bmatrix} 2a \\ 2b \end{bmatrix}e^{2t} &= \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix}e^{2t} + \forced{\begin{bmatrix} 3 \\ 0 \end{bmatrix}e^{2t}} \\ \begin{bmatrix} 2a \\ 2b \end{bmatrix} &= \begin{bmatrix} a + 2b + \forced{3} \\ 2a + b \end{bmatrix} \end{aligned}
Solve the row equations for aa and bbThe bottom row gives b=2ab = 2a, which we substitute into the top row 2a=a+2b+32a = a + 2b + \forced{3} to find our particular solution xp(t)=[−1−2]e2t\forced{x_p(t)} = \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}e^{2t}}.
2a=a+2(2a)+3−3a=3a=−1,b=2(−1)=−2\displaystyle \begin{aligned} 2a &= a + 2(2a) + \forced{3} \\ -3a &= 3 \\ a &= -1, \qquad b = 2(-1) = -2 \end{aligned}
Combine xh(t)+xp(t)\homog{x_h(t)} + \forced{x_p(t)} and plug in t=0t = 0We add both pieces together before using x(0)=[30]x(0) = \begin{bmatrix} 3 \\ 0 \end{bmatrix} because xp(0)=[−1−2]\forced{x_p(0)} = \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}} is already nonzero at the start.
x(t)=c1[11]e3t+c2[1−1]e−t+[−1−2]e2t\displaystyle \begin{aligned} x(t) &= \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}} \\ &\qquad + \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}e^{2t}} \end{aligned}
c1[11]+c2[1−1]+[−1−2]=[30]c1[11]+c2[1−1]=[42]\displaystyle \begin{aligned} \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}} + \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}} &= \begin{bmatrix} 3 \\ 0 \end{bmatrix} \\ \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}} &= \homog{\begin{bmatrix} 4 \\ 2 \end{bmatrix}} \end{aligned}
Solve for c1\blockone{c_1} and c2\blocktwo{c_2}Adding the top row c1+c2=4\blockone{c_1} + \blocktwo{c_2} = 4 and bottom row c1−c2=2\blockone{c_1} - \blocktwo{c_2} = 2 gives 2c1=62\blockone{c_1} = 6, so c1=3\blockone{c_1} = 3 and c2=1\blocktwo{c_2} = 1.
x(t)=3[11]e3t+[1−1]e−t+[−1−2]e2t\displaystyle x(t) = \blockone{3\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}} + \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}e^{2t}}

So the trajectory begins at [30]\begin{bmatrix} 3 \\ 0 \end{bmatrix} because the homogeneous part starts at [42]\homog{\begin{bmatrix} 4 \\ 2 \end{bmatrix}} to make up for xp(0)=[−1−2]\forced{x_p(0)} = \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}}.

In the phase plane, xp(t)\forced{x_p(t)} and its starting point xp(0)=[−1−2]\forced{x_p(0)} = \forced{\begin{bmatrix} -1 \\ -2 \end{bmatrix}} stay the same no matter where we start, while the homogeneous starting vector xh(0)=c1[11]+c2[1−1]\homog{x_h(0)} = \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}} adjusts to bridge the gap from xp(0)\forced{x_p(0)} to x(0)x(0).

Because the particular trajectory always starts at the same spot, the homogeneous piece has to bridge the gap from there to your starting point.
3

Polynomials, Sines, and Cosines

When the outside force is a polynomial in tt, a single unknown vector is no longer enough. Suppose we want a particular solution to:

x′=[1221]x+[3t−1]\displaystyle \velocity{x'} = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 3t \\ -1 \end{bmatrix}}

Even though tt only appears in the top entry of [3t−1]\forced{\begin{bmatrix} 3t \\ -1 \end{bmatrix}}, multiplying by AA mixes the top and bottom entries together, so our guess must include full unknown vectors for both tt and the constant term.

Undetermined Coefficients: Polynomials, Sines, and Cosines
x′=[1221]x+[3t−1]xp(t)=  ?\displaystyle \begin{aligned} \velocity{x'} &= \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 3t \\ -1 \end{bmatrix}} \\[8pt] \forced{x_p(t)} &= \;? \end{aligned}
Text solution
Split the forcing by powers of tt and plug in a two-vector guessWriting g(t)=[30]t+[0−1]\forced{g(t)} = \forced{\begin{bmatrix} 3 \\ 0 \end{bmatrix}t} + \forced{\begin{bmatrix} 0 \\ -1 \end{bmatrix}}, we guess xp(t)=[ab]t+[cd]\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}t + \begin{bmatrix} c \\ d \end{bmatrix}, whose derivative xp′(t)=[ab]\forced{x_p'(t)} = \begin{bmatrix} a \\ b \end{bmatrix} becomes the constant vector on the left.
[ab]=[1221]([ab]t+[cd])+[30]t+[0−1]\displaystyle \begin{aligned} \begin{bmatrix} a \\ b \end{bmatrix} &= \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\left(\begin{bmatrix} a \\ b \end{bmatrix}t + \begin{bmatrix} c \\ d \end{bmatrix}\right) \\ &\qquad + \forced{\begin{bmatrix} 3 \\ 0 \end{bmatrix}t} + \forced{\begin{bmatrix} 0 \\ -1 \end{bmatrix}} \end{aligned}
[00]t+[ab]=[a+2b+32a+b]t+[c+2d2c+d−1]\displaystyle \begin{aligned} \begin{bmatrix} 0 \\ 0 \end{bmatrix}t + \begin{bmatrix} a \\ b \end{bmatrix} &= \begin{bmatrix} a + 2b + \forced{3} \\ 2a + b \end{bmatrix}t \\ &\qquad + \begin{bmatrix} c + 2d \\ 2c + d - \forced{1} \end{bmatrix} \end{aligned}
Match the tt terms to find aa and bbSetting the tt vector to zero gives b=−2ab = -2a from the bottom row, which we substitute into the top row a+2b+3=0a + 2b + \forced{3} = 0.
a+2(−2a)+3=0−3a=−3a=1,b=−2(1)=−2\displaystyle \begin{aligned} a + 2(-2a) + \forced{3} &= 0 \\ -3a &= -3 \\ a &= 1, \\ b &= -2(1) = -2 \end{aligned}
Match the constant terms using a=1a = 1 and b=−2b = -2Plugging aa and bb into the constant vector equation [ab]=[c+2d2c+d−1]\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} c + 2d \\ 2c + d - \forced{1} \end{bmatrix} gives c=1−2dc = 1 - 2d from the top row, which we substitute into the bottom row.
2(1−2d)+d−1=−21−3d=−2d=1,c=1−2(1)=−1\displaystyle \begin{aligned} 2(1 - 2d) + d - \forced{1} &= -2 \\ 1 - 3d &= -2 \\ d &= 1, \\ c &= 1 - 2(1) \\ &= -1 \end{aligned}
Put both vectors into the guessCombining our two constant vectors gives the particular solution.
xp(t)=[1−2]t+[−11]\displaystyle \forced{x_p(t)} = \forced{\begin{bmatrix} 1 \\ -2 \end{bmatrix}t} + \forced{\begin{bmatrix} -1 \\ 1 \end{bmatrix}}

So even though the outside push had no tt in its bottom entry, the matrix AA mixes the two entries and puts a −2t-2t term in the bottom entry.

The same mixing happens when g(t)\forced{g(t)} contains cos⁡t\cos t or sin⁡t\sin t, such as g(t)=[2cos⁡t0]\forced{g(t)} = \forced{\begin{bmatrix} 2\cos t \\ 0 \end{bmatrix}}. Because differentiating cos⁡t\cos t produces −sin⁡t-\sin t, our guess must include full unknown vectors for both functions:

xp(t)=[ab]cos⁡t+[cd]sin⁡t\displaystyle \forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}\cos t + \begin{bmatrix} c \\ d \end{bmatrix}\sin t
4

When Forcing Matches an Eigenvalue

Now suppose the exponential forcing pushes at the exact rate of an eigenvalue in xh(t)\homog{x_h(t)}, such as λ1=3\blockone{\lambda_1 = 3}:

x′=[1221]x+[40]e3t\displaystyle \velocity{x'} = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}e^{3t}}
[11] for λ=3\htmlClass{lc-violet}{\begin{bmatrix} 1 \\ 1 \end{bmatrix}\ \text{for}\ \lambda = 3}
[40]\htmlClass{lc-green}{\begin{bmatrix} 4 \\ 0 \end{bmatrix}}

In a single differential equation, we would just multiply our guess by tt, but in a system a [ab]te3t\begin{bmatrix} a \\ b \end{bmatrix}te^{3t} term is forced to point along the eigenvector line [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} and cannot balance the horizontal push [40]\forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}} by itself.

Undetermined Coefficients: When Forcing Matches an Eigenvalue
xh(t)=c1[11]e3t+c2[1−1]e−tx′=[1221]x+[40]e3txp(t)=  ?\displaystyle \begin{aligned} \homog{x_h(t)} &= \blockone{c_1 \begin{bmatrix} 1 \\ 1 \end{bmatrix} e^{3t}} \\[2pt] &\quad + \blocktwo{c_2 \begin{bmatrix} 1 \\ -1 \end{bmatrix} e^{-t}} \\[8pt] \velocity{x'} &= \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix} e^{3t}} \\[6pt] \forced{x_p(t)} &= \;? \end{aligned}
Text solution
Guess both te3tte^{3t} and e3te^{3t} vectors and differentiateBecause λ=3\blockone{\lambda = 3} is an eigenvalue, we set xp(t)=[ab]te3t+[cd]e3t\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}te^{3t} + \begin{bmatrix} c \\ d \end{bmatrix}e^{3t}, and the product rule on te3tte^{3t} brings [ab]e3t\begin{bmatrix} a \\ b \end{bmatrix}e^{3t} into the derivative.
xp′(t)=3[ab]te3t+([ab]+3[cd])e3t\displaystyle \begin{aligned} \forced{x_p'(t)} &= 3\begin{bmatrix} a \\ b \end{bmatrix}te^{3t} \\ &\qquad + \left(\begin{bmatrix} a \\ b \end{bmatrix} + 3\begin{bmatrix} c \\ d \end{bmatrix}\right)e^{3t} \end{aligned}
3[ab]te3t+([ab]+3[cd])e3t=[1221][ab]te3t+([1221][cd]+[40])e3t\displaystyle \begin{aligned} &3\begin{bmatrix} a \\ b \end{bmatrix}te^{3t} + \left(\begin{bmatrix} a \\ b \end{bmatrix} + 3\begin{bmatrix} c \\ d \end{bmatrix}\right)e^{3t} \\ &\quad = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix}te^{3t} \\ &\qquad + \left(\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\begin{bmatrix} c \\ d \end{bmatrix} + \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}}\right)e^{3t} \end{aligned}
Match the te3tte^{3t} terms to get the eigenvector conditionSetting the te3tte^{3t} vectors equal gives 3[ab]=[a+2b2a+b]3\begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} a + 2b \\ 2a + b \end{bmatrix}, which simplifies in both rows to a=ba = b.
Match the e3te^{3t} terms and eliminate cc and ddSetting the e3te^{3t} vectors equal and moving cc and dd to the left gives two equations whose cc and dd terms cancel when we add the rows straight down.
[a+3cb+3d]=[c+2d+42c+d][a+2c−2db−2c+2d]=[40]a+b=4\displaystyle \begin{aligned} \begin{bmatrix} a + 3c \\ b + 3d \end{bmatrix} &= \begin{bmatrix} c + 2d + \forced{4} \\ 2c + d \end{bmatrix} \\ \begin{bmatrix} a + 2c - 2d \\ b - 2c + 2d \end{bmatrix} &= \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}} \\ a + b &= 4 \end{aligned}
Combining a+b=4a + b = 4 with a=ba = b gives a=2a = 2 and b=2b = 2.
Pick one convenient pair for cc and ddSubstituting a=2a = 2 into a+2c−2d=4a + 2c - 2d = \forced{4} leaves c−d=1c - d = 1, and b=2b = 2 in the other row gives the same equation. Any cc and dd with c−d=1c - d = 1 work, because changing [cd]\begin{bmatrix} c \\ d \end{bmatrix} by a multiple of [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}} only adds a multiple of [11]e3t\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}}, which is already part of xh(t)\homog{x_h(t)}; choosing d=0d = 0 gives c=1c = 1.
xp(t)=[22]te3t+[10]e3t\displaystyle \forced{x_p(t)} = \forced{\begin{bmatrix} 2 \\ 2 \end{bmatrix}te^{3t}} + \forced{\begin{bmatrix} 1 \\ 0 \end{bmatrix}e^{3t}}

So [22]te3t\forced{\begin{bmatrix} 2 \\ 2 \end{bmatrix}te^{3t}} grows along the λ=3\blockone{\lambda = 3} eigenvector line while [10]e3t\forced{\begin{bmatrix} 1 \\ 0 \end{bmatrix}e^{3t}} supplies the sideways piece needed to match the horizontal force [40]e3t\forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}e^{3t}}.

No matter which way the force g0\forced{g_0} points in g(t)=g0e3t\forced{g(t)} = \forced{g_0 e^{3t}}, the te3tte^{3t} vector [ab]\blockone{\begin{bmatrix} a \\ b \end{bmatrix}} points along the λ=3\blockone{\lambda = 3} eigenvector line [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}, and the e3te^{3t} vector [cd]\begin{bmatrix} c \\ d \end{bmatrix} enters the e3te^{3t} match as (3I−A)[cd]\blocktwo{(3I - A)\begin{bmatrix} c \\ d \end{bmatrix}}, which supplies the piece along [1−1]\blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}} so that [ab]+(3I−A)[cd]=g0\blockone{\begin{bmatrix} a \\ b \end{bmatrix}} + \blocktwo{(3I - A)\begin{bmatrix} c \\ d \end{bmatrix}} = \forced{g_0}.

The first term can only point along its own eigenvector line, so the second term has to supply any part of the forcing vector along the other line.
5

How Variation of Parameters Works

When g(t)\forced{g(t)} contains functions like 1t\forced{\frac{1}{t}} or tan⁡t\forced{\tan t} whose derivatives keep producing new kinds of terms, we need a general method that finds xp(t)\forced{x_p(t)} for any forcing term.

Instead of guessing the form of xp(t)\forced{x_p(t)}, Variation of Parameters starts from the homogeneous solution xh(t)=c1x1(t)+c2x2(t)\homog{x_h(t)} = \blockone{c_1 x_1(t)} + \blocktwo{c_2 x_2(t)} and replaces the constants c1\blockone{c_1} and c2\blocktwo{c_2} with unknown functions u1(t)\blockone{u_1(t)} and u2(t)\blocktwo{u_2(t)}:

xp(t)\displaystyle \forced{x_p(t)} =u1(t)x1(t)+u2(t)x2(t)\displaystyle = \blockone{u_1(t)x_1(t)} + \blocktwo{u_2(t)x_2(t)}
How Variation of Parameters Works
xh(t)=c1x1(t)+c2x2(t)\htmlClass{lc-violet}{x_h(t)} = \htmlClass{lc-violet}{c_1 x_1(t)} + \htmlClass{lc-orange}{c_2 x_2(t)}
xp(t)=  ?\htmlClass{lc-green}{x_p(t)} = \;?
x1(t)\htmlClass{lc-violet}{x_1(t)}
x2(t)\htmlClass{lc-orange}{x_2(t)}

Because x1(t)\blockone{x_1(t)} and x2(t)\blocktwo{x_2(t)} already satisfy x′=Ax\velocity{x'} = Ax, all the natural current terms cancel out when we plug xp(t)\forced{x_p(t)} into x′=Ax+g(t)\velocity{x'} = Ax + \forced{g(t)}, leaving a linear system for the derivatives u1′(t)\blockone{u_1'(t)} and u2′(t)\blocktwo{u_2'(t)}:

u1′(t)x1(t)+u2′(t)x2(t)\displaystyle \blockone{u_1'(t)x_1(t)} + \blocktwo{u_2'(t)x_2(t)} =g(t)\displaystyle = \forced{g(t)}

Putting x1(t)\blockone{x_1(t)} and x2(t)\blocktwo{x_2(t)} side-by-side as the columns of a matrix gives the compact formula:

[x1(t)x2(t)]⏟Φ(t)fundamental matrix[u1′(t)u2′(t)]=g(t)\displaystyle \begin{aligned} \underbrace{\begin{bmatrix} \blockone{x_1(t)} & \blocktwo{x_2(t)} \end{bmatrix}}_{\substack{\Phi(t) \\ \text{fundamental matrix}}}\begin{bmatrix} \blockone{u_1'(t)} \\ \blocktwo{u_2'(t)} \end{bmatrix} &= \forced{g(t)} \end{aligned}
⟹xp(t)=Φ(t)∫Φ−1(t)g(t) dt\displaystyle \begin{aligned} \Longrightarrow \quad \forced{x_p(t)} &= \Phi(t)\int \Phi^{-1}(t)\forced{g(t)}\,dt \end{aligned}

If we use the homogeneous solutions x1(t)=[11]e3t\blockone{x_1(t)} = \blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} and x2(t)=[1−1]e−t\blocktwo{x_2(t)} = \blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}} as a moving coordinate grid, an unforced boat drifts along with the grid at fixed coordinates (u1,u2)(\blockone{u_1}, \blocktwo{u_2}), while an outside force g(t)\forced{g(t)} pushes it across the grid lines at rates u1′(t)\blockone{u_1'(t)} and u2′(t)\blocktwo{u_2'(t)}.

On the grid that rides the current, the boat's coordinates stay fixed when it just drifts, and change only when an outside push drives it across the grid lines.
6

Solving Systems with Variation of Parameters

Let's use Variation of Parameters first on the eigenvalue-matching force g(t)=[40]e3t\forced{g(t)} = \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}e^{3t}}, and then on a force with 1t\forced{\frac{1}{t}} that Undetermined Coefficients cannot handle:

x′=[1221]x+[2e3tt2e3tt]\displaystyle \velocity{x'} = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} \tfrac{2e^{3t}}{t} \\ \tfrac{2e^{3t}}{t} \end{bmatrix}}

When we solve Φ(t)u′(t)=g(t)\Phi(t)u'(t) = \forced{g(t)} using the matrix inverse, remember that we invert a 2×22\times 2 matrix by swapping the diagonal entries, flipping the signs of the other two entries, and dividing by the determinant:

[abcd]−1=1ad−bc[d−b−ca]\displaystyle \begin{bmatrix} a & b \\ c & d \end{bmatrix}^{-1} = \frac{1}{ad - bc}\begin{bmatrix} d & -b \\ -c & a \end{bmatrix}

We can find u1′(t)\blockone{u_1'(t)} and u2′(t)\blocktwo{u_2'(t)} either by adding and subtracting rows or by multiplying by Φ−1(t)\Phi^{-1}(t).

Solving Systems with Variation of Parameters
g(t)=[40]e3tx1(t)=[11]e3tx2(t)=[1−1]e−tu1′(t), u2′(t)=  ?\displaystyle \begin{aligned} \forced{g(t)} &= \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix} e^{3t}} \\[6pt] \blockone{x_1(t)} &= \blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix} e^{3t}} \\[6pt] \blocktwo{x_2(t)} &= \blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix} e^{-t}} \\[6pt] \blockone{u_1'(t)},\ \blocktwo{u_2'(t)} &= \;? \end{aligned}
Text solution
First force (g(t)=[40]e3t\forced{g(t)} = \forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}e^{3t}}), solve for u1′\blockone{u_1'} and u2′\blocktwo{u_2'} by eliminationWriting u1′[11]e3t+u2′[1−1]e−t=[4e3t0]\blockone{u_1'\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{u_2'\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}} = \forced{\begin{bmatrix} 4e^{3t} \\ 0 \end{bmatrix}}, we add and subtract the two rows to solve for u1′(t)\blockone{u_1'(t)} and u2′(t)\blocktwo{u_2'(t)}.
u1′e3t+u2′e−t=4e3tu1′e3t−u2′e−t=02u1′e3t=4e3t  ⟹  u1′(t)=22u2′e−t=4e3t  ⟹  u2′(t)=2e4t\displaystyle \begin{aligned} \blockone{u_1'e^{3t}} + \blocktwo{u_2'e^{-t}} &= \forced{4e^{3t}} \\ \blockone{u_1'e^{3t}} - \blocktwo{u_2'e^{-t}} &= \forced{0} \\ \blockone{2u_1'e^{3t}} &= \forced{4e^{3t}} \\ &\implies \blockone{u_1'(t)} = 2 \\ \blocktwo{2u_2'e^{-t}} &= \forced{4e^{3t}} \\ &\implies \blocktwo{u_2'(t)} = 2e^{4t} \end{aligned}
Integrate and build xp=u1x1+u2x2\forced{x_p} = \blockone{u_1 x_1} + \blocktwo{u_2 x_2}Integrating gives u1(t)=2t\blockone{u_1(t)} = 2t and u2(t)=12e4t\blocktwo{u_2(t)} = \frac{1}{2}e^{4t}, which we multiply by x1(t)\blockone{x_1(t)} and x2(t)\blocktwo{x_2(t)}.
xp(t)=(2t)[11]e3t+(12e4t)[1−1]e−t=[22]te3t+[12−12]e3t\displaystyle \begin{aligned} \forced{x_p(t)} &= \blockone{(2t)\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} \\ &\qquad + \blocktwo{\left(\tfrac{1}{2}e^{4t}\right)\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}} \\ &= \forced{\begin{bmatrix} 2 \\ 2 \end{bmatrix}te^{3t}} + \forced{\begin{bmatrix} \tfrac{1}{2} \\ -\tfrac{1}{2} \end{bmatrix}e^{3t}} \end{aligned}
Both the te3tte^{3t} term and the e3te^{3t} term come out of the integrals automatically, and [12−12]e3t\forced{\begin{bmatrix} \tfrac{1}{2} \\ -\tfrac{1}{2} \end{bmatrix}e^{3t}} differs from our earlier [10]e3t\forced{\begin{bmatrix} 1 \\ 0 \end{bmatrix}e^{3t}} only by 12[11]e3t\blockone{\frac{1}{2}\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}}, which is already part of xh(t)\homog{x_h(t)}.
Second force (g(t)=[2e3tt2e3tt]\forced{g(t)} = \forced{\begin{bmatrix} \tfrac{2e^{3t}}{t} \\ \tfrac{2e^{3t}}{t} \end{bmatrix}}), invert Φ(t)\Phi(t) to find u′(t)u'(t)Putting x1(t)\blockone{x_1(t)} and x2(t)\blocktwo{x_2(t)} into Φ(t)=[e3te−te3t−e−t]\Phi(t) = \begin{bmatrix} \blockone{e^{3t}} & \blocktwo{e^{-t}} \\ \blockone{e^{3t}} & \blocktwo{-e^{-t}} \end{bmatrix} gives determinant −2e2t-2e^{2t}, so we multiply Φ−1(t)\Phi^{-1}(t) by g(t)\forced{g(t)}.
[u1′(t)u2′(t)]=1−2e2t[−e−t−e−t−e3te3t][2e3tt2e3tt]=1−2e2t[−4e2tt0]=[2t0]\displaystyle \begin{aligned} &\begin{bmatrix} \blockone{u_1'(t)} \\ \blocktwo{u_2'(t)} \end{bmatrix} \\ &\quad = \frac{1}{-2e^{2t}}\begin{bmatrix} -e^{-t} & -e^{-t} \\ -e^{3t} & e^{3t} \end{bmatrix}\forced{\begin{bmatrix} \tfrac{2e^{3t}}{t} \\ \tfrac{2e^{3t}}{t} \end{bmatrix}} \\ &\quad = \frac{1}{-2e^{2t}}\begin{bmatrix} -\tfrac{4e^{2t}}{t} \\ 0 \end{bmatrix} \\ &\quad = \begin{bmatrix} \blockone{\tfrac{2}{t}} \\ \blocktwo{0} \end{bmatrix} \end{aligned}
Integrate u′(t)u'(t) and add xh(t)\homog{x_h(t)}Integrating gives u1(t)=2ln⁡∣t∣\blockone{u_1(t)} = 2\ln|t| and u2(t)=0\blocktwo{u_2(t)} = 0, which we plug into xp=u1x1+u2x2\forced{x_p} = \blockone{u_1 x_1} + \blocktwo{u_2 x_2} to form the general solution.
xp(t)=2ln⁡∣t∣[11]e3tx(t)=c1[11]e3t+c2[1−1]e−t+2ln⁡∣t∣[11]e3t\displaystyle \begin{aligned} \forced{x_p(t)} &= \forced{2\ln|t|\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} \\ x(t) &= \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^{-t}} \\ &\qquad + \forced{2\ln|t|\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} \end{aligned}

Because the force [2e3tt2e3tt]\forced{\begin{bmatrix} \tfrac{2e^{3t}}{t} \\ \tfrac{2e^{3t}}{t} \end{bmatrix}} points purely along the first eigenvector [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}, u2′(t)\blocktwo{u_2'(t)} is zero and only the first current is pushed.

In a 2×22\times 2 problem, adding and subtracting the two row equations of u1′x1+u2′x2=g(t)\blockone{u_1'x_1} + \blocktwo{u_2'x_2} = \forced{g(t)} is often faster than writing out Φ−1(t)\Phi^{-1}(t), and both give the exact same u1′(t)\blockone{u_1'(t)} and u2′(t)\blocktwo{u_2'(t)}.

7

Variation of Parameters with the Matrix Exponential

When we already have the matrix exponential eAte^{At} for x′=Ax+g(t)\velocity{x'} = Ax + \forced{g(t)}, we can write down the forced solution without inverting a matrix at all.

Because eAte^{At} is a fundamental matrix whose value at t=0t = 0 is II and whose inverse is simply e−Ate^{-At}, plugging in Φ(t)=eAt\Phi(t) = e^{At} turns Variation of Parameters into the matrix version of an integrating factor.

Variation of Parameters with the Matrix Exponential
x′=Ax+g(t)x(0)=x0Φ(t)=eAtx(t)=  ?\displaystyle \begin{aligned} \velocity{x'} &= Ax + \forced{g(t)} \\[4pt] x(0) &= x_0 \\[4pt] \Phi(t) &= e^{At} \\[4pt] x(t) &= \;? \end{aligned}

For an indefinite integral, a particular solution is xp(t)=eAt∫e−Atg(t) dt\forced{x_p(t)} = e^{At}\int e^{-At}\forced{g(t)}\,dt. When we have a starting position x(0)=x0x(0) = x_0, integrating from s=0s = 0 to s=ts = t builds the initial condition right in:

x(t)=eAtx0+eAt∫0te−Asg(s) ds=eAtx0⏟initial state x0drifting for time t+∫0teA(t−s)g(s) ds⏟push at time s driftingfor remaining time t−s\displaystyle \begin{aligned} x(t) &= \homog{e^{At}x_0} + e^{At}\int_0^t e^{-As}\forced{g(s)}\,ds \\ &= \underbrace{\homog{e^{At}x_0}}_{\substack{\text{initial state } x_0 \\ \text{drifting for time } t}} \\ &\qquad + \int_0^t \underbrace{e^{A(t-s)}\forced{g(s)\,ds}}_{\substack{\text{push at time } s \text{ drifting} \\ \text{for remaining time } t-s}} \end{aligned}

We write ss for the time variable inside the integral so we don't confuse it with the upper limit tt.

From 00 to tt, each small push g(s) ds\forced{g(s)\,ds} at time ss gets carried by the currents as eA(t−s)g(s) dse^{A(t-s)}\forced{g(s)\,ds} for the remaining time t−st - s. Early pushes have a long time to drift with the currents, while pushes right before time tt barely drift at all.

Every outside push drifts with the natural currents for the rest of the trip, so early pushes arrive at the end heavily stretched and rotated while late ones barely drift at all.

Key concepts

Here is how all the pieces fit together when you sit down to solve a forced system from start to finish.

Game Plan for Nonhomogeneous Systems
x′=Ax+g(t)xh(t)=  ?xp(t)=  ?\displaystyle \begin{aligned} \velocity{x'} &= Ax + \forced{g(t)} \\[4pt] \homog{x_h(t)} &= \;? \\[4pt] \forced{x_p(t)} &= \;? \end{aligned}

Every forced system x′=Ax+g(t)\velocity{x'} = Ax + \forced{g(t)} splits into x(t)=xh(t)+xp(t)x(t) = \homog{x_h(t)} + \forced{x_p(t)}:

Find xh(t)\homog{x_h(t)} first

Use the eigenvalues and eigenvectors of AA to get xh(t)=c1x1(t)+c2x2(t)\homog{x_h(t)} = \blockone{c_1 x_1(t)} + \blocktwo{c_2 x_2(t)}. You need the eigenvalues right away to check whether g(t)\forced{g(t)} matches one of them.

Pick a method for xp(t)\forced{x_p(t)} based on g(t)\forced{g(t)}

  • Undetermined Coefficients is fastest for exponentials, polynomials, and sines or cosines. For a non-eigenvalue exponential like [30]e2t\forced{\begin{bmatrix} 3 \\ 0 \end{bmatrix}e^{2t}} when λ=3,−1\lambda = \blockone{3}, \blocktwo{-1}, guess [ab]e2t\begin{bmatrix} a \\ b \end{bmatrix}e^{2t}. Because AA mixes the rows, polynomials like [3t−1]\forced{\begin{bmatrix} 3t \\ -1 \end{bmatrix}} need a full vector for every power of tt down to the constant ([ab]t+[cd]\begin{bmatrix} a \\ b \end{bmatrix}t + \begin{bmatrix} c \\ d \end{bmatrix}), and cos⁡t\cos t or sin⁡t\sin t forces like [2cos⁡t0]\forced{\begin{bmatrix} 2\cos t \\ 0 \end{bmatrix}} need full vectors for both ([ab]cos⁡t+[cd]sin⁡t\begin{bmatrix} a \\ b \end{bmatrix}\cos t + \begin{bmatrix} c \\ d \end{bmatrix}\sin t). When an exponential matches an eigenvalue, like [40]e3t\forced{\begin{bmatrix} 4 \\ 0 \end{bmatrix}e^{3t}} for λ=3\blockone{\lambda = 3}, guess [ab]te3t+[cd]e3t\begin{bmatrix} a \\ b \end{bmatrix}te^{3t} + \begin{bmatrix} c \\ d \end{bmatrix}e^{3t} since [ab]\begin{bmatrix} a \\ b \end{bmatrix} is stuck on the eigenvector line.
  • Variation of Parameters works for any g(t)\forced{g(t)} and is needed for functions like 1t\forced{\frac{1}{t}} or tan⁡t\forced{\tan t} (such as [2e3tt2e3tt]\forced{\begin{bmatrix} \tfrac{2e^{3t}}{t} \\ \tfrac{2e^{3t}}{t} \end{bmatrix}}), though a simple exponential is faster to guess than to integrate. Solve u1′x1+u2′x2=g(t)\blockone{u_1'x_1} + \blocktwo{u_2'x_2} = \forced{g(t)} (or u′=Φ−1gu' = \Phi^{-1}\forced{g}), integrate to find u1\blockone{u_1} and u2\blocktwo{u_2}, and form xp(t)=u1x1+u2x2=Φ(t)∫Φ−1(t)g(t) dt\forced{x_p(t)} = \blockone{u_1 x_1} + \blocktwo{u_2 x_2} = \Phi(t)\int \Phi^{-1}(t)\forced{g(t)}\,dt. When eAte^{At} is given, use Φ(t)=eAt\Phi(t) = e^{At} and Φ−1(t)=e−At\Phi^{-1}(t) = e^{-At} to get x(t)=eAtx0+eAt∫0te−Asg(s) dsx(t) = \homog{e^{At}x_0} + e^{At}\int_0^t e^{-As}\forced{g(s)}\,ds.
Use x(0)x(0) at the very end

Add x(t)=xh(t)+xp(t)x(t) = \homog{x_h(t)} + \forced{x_p(t)} before plugging in t=0t = 0 so c1\blockone{c_1} and c2\blocktwo{c_2} also account for xp(0)\forced{x_p(0)}.

8

Practice

1

Find the general solution of x′=[2112]x+[1−5]e−t\velocity{x'} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}x + \forced{\begin{bmatrix} 1 \\ -5 \end{bmatrix}e^{-t}}.

Find the eigenvalues of [2112]\begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} first: does the forcing exponent −1\forced{-1} match either of them?

First find the eigenvalues and eigenvectors of A=[2112]A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}:
det⁡(A−λI)=(2−λ)2−1=λ2−4λ+3=(λ−3)(λ−1)=0\displaystyle \begin{aligned} \det(A - \lambda I) &= (2 - \lambda)^2 - 1 \\ &= \lambda^2 - 4\lambda + 3 \\ &= (\lambda - 3)(\lambda - 1) = 0 \end{aligned}
For λ1=3\blockone{\lambda_1 = 3}, the eigenvector is [11]\blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}}, and for λ2=1\blocktwo{\lambda_2 = 1}, the eigenvector is [1−1]\blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}}, giving the homogeneous solution:
xh(t)=c1[11]e3t+c2[1−1]et\displaystyle \homog{x_h(t)} = \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t}
Since the forcing exponent −1\forced{-1} is not an eigenvalue, guess xp(t)=[ab]e−t\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}e^{-t} and differentiate to get xp′(t)=[−a−b]e−t\forced{x_p'(t)} = \begin{bmatrix} -a \\ -b \end{bmatrix}e^{-t}. (Watch out: dropping the minus sign from the chain rule on e−te^{-t} leads to the contradictory equations a+b=−1a + b = -1 and a+b=5a + b = 5, while forgetting xp′\forced{x_p'} on the left side and solving Axp+g=0A\forced{x_p} + \forced{g} = 0 gives the wrong vector [−73113]e−t\begin{bmatrix} -\tfrac{7}{3} \\ \tfrac{11}{3} \end{bmatrix}e^{-t}.)
[−a−b]e−t=[2112][ab]e−t+[1−5]e−t[−a−b]=[2a+b+1a+2b−5][3a+ba+3b]=[−15]\displaystyle \begin{aligned} \begin{bmatrix} -a \\ -b \end{bmatrix}e^{-t} &= \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\begin{bmatrix} a \\ b \end{bmatrix}e^{-t} \\ &\qquad + \forced{\begin{bmatrix} 1 \\ -5 \end{bmatrix}e^{-t}} \\ \begin{bmatrix} -a \\ -b \end{bmatrix} &= \begin{bmatrix} 2a + b + \forced{1} \\ a + 2b - \forced{5} \end{bmatrix} \\ \begin{bmatrix} 3a + b \\ a + 3b \end{bmatrix} &= \begin{bmatrix} -1 \\ 5 \end{bmatrix} \end{aligned}
From the top row, b=−3a−1b = -3a - 1. Substitute into the bottom row:
a+3(−3a−1)=5−8a−3=5a=−1,b=−3(−1)−1=2\displaystyle \begin{aligned} a + 3(-3a - 1) &= 5 \\ -8a - 3 &= 5 \\ a &= -1, \\ b &= -3(-1) - 1 = 2 \end{aligned}
Combine xh(t)\homog{x_h(t)} and xp(t)=[−12]e−t\forced{x_p(t)} = \forced{\begin{bmatrix} -1 \\ 2 \end{bmatrix}e^{-t}}:
x(t)=c1[11]e3t+c2[1−1]et+[−12]e−t\displaystyle x(t) = \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t} + \forced{\begin{bmatrix} -1 \\ 2 \end{bmatrix}e^{-t}}
2

Solve the initial value problem x′=[2112]x+[6t4]\velocity{x'} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}x + \forced{\begin{bmatrix} 6t \\ 4 \end{bmatrix}}, x(0)=[15]x(0) = \begin{bmatrix} 1 \\ 5 \end{bmatrix}.

Even though tt only appears in the top entry of [6t4]\forced{\begin{bmatrix} 6t \\ 4 \end{bmatrix}}, how many unknown vectors does your guess for xp(t)\forced{x_p(t)} need, and when do you use x(0)=[15]x(0) = \begin{bmatrix} 1 \\ 5 \end{bmatrix}?

From Problem 1, the homogeneous solution for A=[2112]A = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix} is xh(t)=c1[11]e3t+c2[1−1]et\homog{x_h(t)} = \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t}.
Write g(t)=[60]t+[04]\forced{g(t)} = \forced{\begin{bmatrix} 6 \\ 0 \end{bmatrix}t} + \forced{\begin{bmatrix} 0 \\ 4 \end{bmatrix}} and guess xp(t)=[ab]t+[cd]\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}t + \begin{bmatrix} c \\ d \end{bmatrix}, which has derivative xp′(t)=[ab]\forced{x_p'(t)} = \begin{bmatrix} a \\ b \end{bmatrix}:
[00]t+[ab]=[2112]([ab]t+[cd])+[60]t+[04]\displaystyle \begin{aligned} \begin{bmatrix} 0 \\ 0 \end{bmatrix}t + \begin{bmatrix} a \\ b \end{bmatrix} &= \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}\left(\begin{bmatrix} a \\ b \end{bmatrix}t + \begin{bmatrix} c \\ d \end{bmatrix}\right) \\ &\qquad + \forced{\begin{bmatrix} 6 \\ 0 \end{bmatrix}t} + \forced{\begin{bmatrix} 0 \\ 4 \end{bmatrix}} \end{aligned}
[00]t+[ab]=[2a+b+6a+2b]t+[2c+dc+2d+4]\displaystyle \begin{aligned} \begin{bmatrix} 0 \\ 0 \end{bmatrix}t + \begin{bmatrix} a \\ b \end{bmatrix} &= \begin{bmatrix} 2a + b + \forced{6} \\ a + 2b \end{bmatrix}t \\ &\qquad + \begin{bmatrix} 2c + d \\ c + 2d + \forced{4} \end{bmatrix} \end{aligned}
Match the tt terms using a=−2ba = -2b from the bottom row:
2(−2b)+b+6=0−3b=−6b=2,a=−2(2)=−4\displaystyle \begin{aligned} 2(-2b) + b + \forced{6} &= 0 \\ -3b &= -6 \\ b &= 2, \\ a &= -2(2) = -4 \end{aligned}
Now match the constant terms with a=−4a = -4 and b=2b = 2 on the left. (Be careful not to set [2c+dc+2d+4]=[00]\begin{bmatrix} 2c + d \\ c + 2d + \forced{4} \end{bmatrix} = \begin{bmatrix} 0 \\ 0 \end{bmatrix} by forgetting xp′=[ab]\forced{x_p'} = \begin{bmatrix} a \\ b \end{bmatrix} on the left side, which gives c=43c = \frac{4}{3} and d=−83d = -\frac{8}{3}.)
[2c+dc+2d+4]=[−42]d=−2c−4c+2(−2c−4)+4=2−3c−4=2c=−2,d=−2(−2)−4=0\displaystyle \begin{aligned} \begin{bmatrix} 2c + d \\ c + 2d + \forced{4} \end{bmatrix} &= \begin{bmatrix} -4 \\ 2 \end{bmatrix} \\ d &= -2c - 4 \\ c + 2(-2c - 4) + \forced{4} &= 2 \\ -3c - 4 &= 2 \\ c &= -2, \\ d &= -2(-2) - 4 = 0 \end{aligned}
Combine the full solution x(t)=xh(t)+xp(t)x(t) = \homog{x_h(t)} + \forced{x_p(t)} before plugging in x(0)=[15]x(0) = \begin{bmatrix} 1 \\ 5 \end{bmatrix}. (Plugging x(0)=[15]x(0) = \begin{bmatrix} 1 \\ 5 \end{bmatrix} into xh(0)\homog{x_h(0)} alone ignores xp(0)=[−20]\forced{x_p(0)} = \forced{\begin{bmatrix} -2 \\ 0 \end{bmatrix}} and gives c1=3,c2=−2\blockone{c_1} = 3, \blocktwo{c_2} = -2 instead of c1=4,c2=−1\blockone{c_1} = 4, \blocktwo{c_2} = -1.)
x(t)=c1[11]e3t+c2[1−1]et+[−42]t+[−20]\displaystyle \begin{aligned} x(t) &= \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t} \\ &\qquad + \forced{\begin{bmatrix} -4 \\ 2 \end{bmatrix}t} + \forced{\begin{bmatrix} -2 \\ 0 \end{bmatrix}} \end{aligned}
c1[11]+c2[1−1]+[−20]=[15][c1+c2c1−c2]=[35]\displaystyle \begin{aligned} \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}} + \forced{\begin{bmatrix} -2 \\ 0 \end{bmatrix}} &= \begin{bmatrix} 1 \\ 5 \end{bmatrix} \\ \begin{bmatrix} \blockone{c_1} + \blocktwo{c_2} \\ \blockone{c_1} - \blocktwo{c_2} \end{bmatrix} &= \homog{\begin{bmatrix} 3 \\ 5 \end{bmatrix}} \end{aligned}
Adding the two rows gives 2c1=82\blockone{c_1} = 8, so c1=4\blockone{c_1} = 4 and c2=−1\blocktwo{c_2} = -1:
x(t)=4[11]e3t−[1−1]et+[−42]t+[−20]\displaystyle x(t) = \blockone{4\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} - \blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t} + \forced{\begin{bmatrix} -4 \\ 2 \end{bmatrix}t} + \forced{\begin{bmatrix} -2 \\ 0 \end{bmatrix}}
3

Find a particular solution xp(t)\forced{x_p(t)} of x′=[1221]x+[10cos⁡t0]\velocity{x'} = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 10\cos t \\ 0 \end{bmatrix}}.

What happens when you differentiate cos⁡t\cos t, and what second trig term must be in your guess to match it?

Guess xp(t)=[ab]cos⁡t+[cd]sin⁡t\forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}\cos t + \begin{bmatrix} c \\ d \end{bmatrix}\sin t and differentiate to get xp′(t)=[cd]cos⁡t−[ab]sin⁡t\forced{x_p'(t)} = \begin{bmatrix} c \\ d \end{bmatrix}\cos t - \begin{bmatrix} a \\ b \end{bmatrix}\sin t. (Watch the minus sign on (cos⁡t)′=−sin⁡t(\cos t)' = -\sin t: writing +[ab]sin⁡t+\begin{bmatrix} a \\ b \end{bmatrix}\sin t leads to the inconsistent system 4a+4b=−104a + 4b = -10 and 4a+4b=−204a + 4b = -20, and getting both derivative signs backwards, −[cd]cos⁡t+[ab]sin⁡t-\begin{bmatrix} c \\ d \end{bmatrix}\cos t + \begin{bmatrix} a \\ b \end{bmatrix}\sin t on the left, flips the sign of the sin⁡t\sin t vector to give [1−4]cos⁡t+[−32]sin⁡t\begin{bmatrix} 1 \\ -4 \end{bmatrix}\cos t + \begin{bmatrix} -3 \\ 2 \end{bmatrix}\sin t.)
[cd]cos⁡t+[−a−b]sin⁡t=[1221]([ab]cos⁡t+[cd]sin⁡t)+[100]cos⁡t\displaystyle \begin{aligned} &\begin{bmatrix} c \\ d \end{bmatrix}\cos t + \begin{bmatrix} -a \\ -b \end{bmatrix}\sin t \\ &\quad = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}\left(\begin{bmatrix} a \\ b \end{bmatrix}\cos t + \begin{bmatrix} c \\ d \end{bmatrix}\sin t\right) \\ &\qquad + \forced{\begin{bmatrix} 10 \\ 0 \end{bmatrix}\cos t} \end{aligned}
[cd]cos⁡t+[−a−b]sin⁡t=[a+2b+102a+b]cos⁡t+[c+2d2c+d]sin⁡t\displaystyle \begin{aligned} &\begin{bmatrix} c \\ d \end{bmatrix}\cos t + \begin{bmatrix} -a \\ -b \end{bmatrix}\sin t \\ &\quad = \begin{bmatrix} a + 2b + \forced{10} \\ 2a + b \end{bmatrix}\cos t \\ &\qquad + \begin{bmatrix} c + 2d \\ 2c + d \end{bmatrix}\sin t \end{aligned}
Matching the cos⁡t\cos t terms gives c=a+2b+10c = a + 2b + \forced{10} and d=2a+bd = 2a + b. Substitute these into the sin⁡t\sin t equations [−a−b]=[c+2d2c+d]\begin{bmatrix} -a \\ -b \end{bmatrix} = \begin{bmatrix} c + 2d \\ 2c + d \end{bmatrix}:
−a=(a+2b+10)+2(2a+b)  ⟹  3a+2b=−5−b=2(a+2b+10)+(2a+b)  ⟹  2a+3b=−10\displaystyle \begin{aligned} -a &= (a + 2b + \forced{10}) + 2(2a + b) \\ &\implies 3a + 2b = -5 \\ -b &= 2(a + 2b + \forced{10}) + (2a + b) \\ &\implies 2a + 3b = -10 \end{aligned}
Multiply the first equation by 33 and the second by 22, then subtract to eliminate bb:
(9a+6b)−(4a+6b)=−15−(−20)\displaystyle \begin{aligned} (9a + 6b) - (4a + 6b) = -15 - (-20) \end{aligned}
5a=5a=1,b=−10−2(1)3=−4\displaystyle \begin{aligned} 5a &= 5 \\ a &= 1, \\ b &= \frac{-10 - 2(1)}{3} = -4 \end{aligned}
Plug a=1a = 1 and b=−4b = -4 back into the expressions for cc and dd:
c=1+2(−4)+10=3d=2(1)+(−4)=−2xp(t)=[1−4]cos⁡t+[3−2]sin⁡t\displaystyle \begin{aligned} c &= 1 + 2(-4) + \forced{10} = 3 \\ d &= 2(1) + (-4) = -2 \\ \forced{x_p(t)} &= \forced{\begin{bmatrix} 1 \\ -4 \end{bmatrix}\cos t} + \forced{\begin{bmatrix} 3 \\ -2 \end{bmatrix}\sin t} \end{aligned}
4

Find a particular solution xp(t)\forced{x_p(t)} of x′=[1221]x+[04]e−t\velocity{x'} = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}x + \forced{\begin{bmatrix} 0 \\ 4 \end{bmatrix}e^{-t}}.

Check the eigenvalues of [1221]\begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix}: why will a guess of [ab]te−t\begin{bmatrix} a \\ b \end{bmatrix}te^{-t} alone not work?

The eigenvalues of A=[1221]A = \begin{bmatrix} 1 & 2 \\ 2 & 1 \end{bmatrix} are λ1=3\blockone{\lambda_1 = 3} and λ2=−1\blocktwo{\lambda_2 = -1}. Because the forcing exponent −1\forced{-1} matches λ2=−1\blocktwo{\lambda_2 = -1}, we must include both te−tte^{-t} and e−te^{-t} terms:
xp(t)=[ab]te−t+[cd]e−t\displaystyle \forced{x_p(t)} = \begin{bmatrix} a \\ b \end{bmatrix}te^{-t} + \begin{bmatrix} c \\ d \end{bmatrix}e^{-t}
Differentiate using the product rule and plug into the system. (Don't forget the minus sign from the chain rule on e−te^{-t}: writing +[cd]e−t+\begin{bmatrix} c \\ d \end{bmatrix}e^{-t} in xp′(t)\forced{x_p'(t)} gives [a+cb+d]\begin{bmatrix} a + c \\ b + d \end{bmatrix} on the left, and then the equations no longer pin down aa and bb; choosing d=0d = 0 gives the wrong answer [−20]e−t\begin{bmatrix} -2 \\ 0 \end{bmatrix}e^{-t}.)
xp′(t)=−[ab]te−t+[a−cb−d]e−t\displaystyle \begin{aligned} \forced{x_p'(t)} &= -\begin{bmatrix} a \\ b \end{bmatrix}te^{-t} + \begin{bmatrix} a - c \\ b - d \end{bmatrix}e^{-t} \end{aligned}
−[ab]te−t+[a−cb−d]e−t=[a+2b2a+b]te−t+[c+2d2c+d+4]e−t\displaystyle \begin{aligned} &{-}\begin{bmatrix} a \\ b \end{bmatrix}te^{-t} + \begin{bmatrix} a - c \\ b - d \end{bmatrix}e^{-t} \\ &\quad = \begin{bmatrix} a + 2b \\ 2a + b \end{bmatrix}te^{-t} \\ &\qquad + \begin{bmatrix} c + 2d \\ 2c + d + \forced{4} \end{bmatrix}e^{-t} \end{aligned}
Matching the te−tte^{-t} terms gives −a=a+2b-a = a + 2b, so b=−ab = -a (the λ=−1\blocktwo{\lambda = -1} eigenvector direction [1−1]\blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}}). Matching the e−te^{-t} terms gives:
a−2c−2d=0b−2c−2d=4\displaystyle \begin{aligned} a - 2c - 2d &= 0 \\ b - 2c - 2d &= \forced{4} \end{aligned}
Because −2c−2d-2c - 2d has the same sign in both rows, subtract the bottom row from the top row to eliminate cc and dd:
a−b=−4a−(−a)=−4a=−2,b=2\displaystyle \begin{aligned} a - b &= -4 \\ a - (-a) &= -4 \\ a &= -2, \qquad b = 2 \end{aligned}
Substitute a=−2a = -2 into −2−2c−2d=0-2 - 2c - 2d = 0 to get c+d=−1c + d = -1, and choose d=0d = 0 so c=−1c = -1:
xp(t)=[−22]te−t+[−10]e−t\displaystyle \forced{x_p(t)} = \forced{\begin{bmatrix} -2 \\ 2 \end{bmatrix}te^{-t}} + \forced{\begin{bmatrix} -1 \\ 0 \end{bmatrix}e^{-t}}
5

Use Variation of Parameters to find the general solution of x′=[2112]x+[2ett2−2ett2]\velocity{x'} = \begin{bmatrix} 2 & 1 \\ 1 & 2 \end{bmatrix}x + \forced{\begin{bmatrix} \tfrac{2e^t}{t^2} \\ -\tfrac{2e^t}{t^2} \end{bmatrix}} for t>0t > 0.

Use the homogeneous solutions x1(t)=[11]e3t\blockone{x_1(t)} = \blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} and x2(t)=[1−1]et\blocktwo{x_2(t)} = \blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t} from Problem 1: what happens when you add and subtract the two rows of u1′x1+u2′x2=g(t)\blockone{u_1'x_1} + \blocktwo{u_2'x_2} = \forced{g(t)}?

With x1(t)=[11]e3t\blockone{x_1(t)} = \blockone{\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} and x2(t)=[1−1]et\blocktwo{x_2(t)} = \blocktwo{\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t}, set up u1′(t)x1(t)+u2′(t)x2(t)=g(t)\blockone{u_1'(t)x_1(t)} + \blocktwo{u_2'(t)x_2(t)} = \forced{g(t)}:
u1′e3t+u2′et=2ett2u1′e3t−u2′et=−2ett2\displaystyle \begin{aligned} \blockone{u_1'e^{3t}} + \blocktwo{u_2'e^t} &= \forced{\frac{2e^t}{t^2}} \\ \blockone{u_1'e^{3t}} - \blocktwo{u_2'e^t} &= \forced{-\frac{2e^t}{t^2}} \end{aligned}
Add the two equations to find u1′(t)\blockone{u_1'(t)}, and subtract the bottom from the top to find u2′(t)\blocktwo{u_2'(t)}:
2u1′e3t=0  ⟹  u1′(t)=02u2′et=4ett2  ⟹  u2′(t)=2t2\displaystyle \begin{aligned} \blockone{2u_1'e^{3t}} &= 0 \implies \blockone{u_1'(t)} = 0 \\ \blocktwo{2u_2'e^t} &= \forced{\frac{4e^t}{t^2}} \implies \blocktwo{u_2'(t)} = \frac{2}{t^2} \end{aligned}
Integrate both functions. (Write 2t2\frac{2}{t^2} as 2t−22t^{-2} before integrating: dropping the minus sign from the power rule gives +2t[1−1]et+\frac{2}{t}\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t, and confusing 1t2\frac{1}{t^2} with 1t\frac{1}{t} gives 2ln⁡t[1−1]et2\ln t\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t.)
u1(t)=∫0 dt=0u2(t)=∫2t−2 dt=−2t\displaystyle \begin{aligned} \blockone{u_1(t)} &= \int 0\,dt = 0 \\ \blocktwo{u_2(t)} &= \int 2t^{-2}\,dt = -\frac{2}{t} \end{aligned}
Multiply back into xp(t)=u1(t)x1(t)+u2(t)x2(t)\forced{x_p(t)} = \blockone{u_1(t)x_1(t)} + \blocktwo{u_2(t)x_2(t)} and add xh(t)\homog{x_h(t)}:
x(t)=c1[11]e3t+c2[1−1]et−2t[1−1]et\displaystyle x(t) = \blockone{c_1\begin{bmatrix} 1 \\ 1 \end{bmatrix}e^{3t}} + \blocktwo{c_2\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t} - \forced{\frac{2}{t}\begin{bmatrix} 1 \\ -1 \end{bmatrix}e^t}
6

Given that eAt=[e2t0te2te2t]e^{At} = \begin{bmatrix} e^{2t} & 0 \\ te^{2t} & e^{2t} \end{bmatrix} for A=[2012]A = \begin{bmatrix} 2 & 0 \\ 1 & 2 \end{bmatrix}, use the matrix exponential formula to solve the initial value problem x′=Ax+[e2t0]\velocity{x'} = Ax + \forced{\begin{bmatrix} e^{2t} \\ 0 \end{bmatrix}}, x(0)=[13]x(0) = \begin{bmatrix} 1 \\ 3 \end{bmatrix}.

How do you get e−Ase^{-As} from eAte^{At} without computing a matrix inverse?

Use the matrix exponential formula x(t)=eAtx(0)+eAt∫0te−Asg(s) dsx(t) = \homog{e^{At}x(0)} + e^{At}\int_0^t e^{-As}\forced{g(s)}\,ds. First compute the unforced drift eAtx(0)\homog{e^{At}x(0)}:
eAtx(0)=[e2t0te2te2t][13]=[e2t(3+t)e2t]\displaystyle \homog{e^{At}x(0)} = \begin{bmatrix} e^{2t} & 0 \\ te^{2t} & e^{2t} \end{bmatrix}\begin{bmatrix} 1 \\ 3 \end{bmatrix} = \homog{\begin{bmatrix} e^{2t} \\ (3 + t)e^{2t} \end{bmatrix}}
To form e−Ase^{-As}, replace every tt in eAte^{At} with −s-s. (Be sure to replace the tt in front of te2tte^{2t} with −s-s as well, not just the exponents: leaving +se−2s+se^{-2s} in the bottom-left entry turns −12t2-\frac{1}{2}t^2 into +12t2+\frac{1}{2}t^2 and gives the wrong bottom entry (3+t+32t2)e2t(3 + t + \frac{3}{2}t^2)e^{2t}.)
e−Asg(s)=[e−2s0−se−2se−2s][e2s0]=[1−s]\displaystyle \begin{aligned} e^{-As}\forced{g(s)} &= \begin{bmatrix} e^{-2s} & 0 \\ -se^{-2s} & e^{-2s} \end{bmatrix}\forced{\begin{bmatrix} e^{2s} \\ 0 \end{bmatrix}} \\ &= \begin{bmatrix} 1 \\ -s \end{bmatrix} \end{aligned}
Integrate from s=0s = 0 to s=ts = t, then multiply on the left by eAte^{At}:
∫0t[1−s] ds=[t−12t2]eAt[t−12t2]=[e2t0te2te2t][t−12t2]=[te2t(t2−12t2)e2t]=[te2t12t2e2t]\displaystyle \begin{aligned} \int_0^t \begin{bmatrix} 1 \\ -s \end{bmatrix}\,ds &= \begin{bmatrix} t \\ -\tfrac{1}{2}t^2 \end{bmatrix} \\ e^{At}\begin{bmatrix} t \\ -\tfrac{1}{2}t^2 \end{bmatrix} &= \begin{bmatrix} e^{2t} & 0 \\ te^{2t} & e^{2t} \end{bmatrix}\begin{bmatrix} t \\ -\tfrac{1}{2}t^2 \end{bmatrix} \\ &= \begin{bmatrix} te^{2t} \\ \left(t^2 - \tfrac{1}{2}t^2\right)e^{2t} \end{bmatrix} \\ &= \forced{\begin{bmatrix} te^{2t} \\ \tfrac{1}{2}t^2e^{2t} \end{bmatrix}} \end{aligned}
Add eAtx(0)\homog{e^{At}x(0)} and the integral term together:
x(t)=[(1+t)e2t(3+t+12t2)e2t]\displaystyle x(t) = \begin{bmatrix} (1 + t)e^{2t} \\ \left(3 + t + \tfrac{1}{2}t^2\right)e^{2t} \end{bmatrix}