We already know how to solve x′=Ax when a system runs on its own, and now we need to find the trajectory 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 Ax and an outside push g(t) act at the same time:
x′=Ax+outside forceg(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
Because the derivative and matrix multiplication both distribute across a sum, the complete solution always splits into two pieces:
We already find xh(t)=c1x1(t)+c2x2(t) from the eigenvalues and eigenvectors of A, so the only new job is finding one working path xp(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]
For the matrix A=[1221], the eigenvalues λ1=3 with eigenvector [11] and λ2=−1 with eigenvector [1−1] give the unforced motion:
xh(t)=c1[11]e3t+c2[1−1]e−t
Because differentiating e2t and multiplying by A both keep the e2t factor, we can guess a particular solution of the same form, xp(t)=[ab]e2t, and solve for the unknown vector.
Undetermined Coefficients: Exponential Forcing and Initial Conditions
x′x(0)x(t)=[1221]x+[30]e2t=[30]=?
Text solution
Guess an e2t vector and divide out e2tSetting xp(t)=[ab]e2t gives xp′(t)=[2a2b]e2t, which turns the differential equation into a pair of linear equations once we divide through by e2t.
Solve the row equations for a and bThe bottom row gives b=2a, which we substitute into the top row 2a=a+2b+3 to find our particular solution xp(t)=[−1−2]e2t.
2a−3aa=a+2(2a)+3=3=−1,b=2(−1)=−2
Combine xh(t)+xp(t) and plug in t=0We add both pieces together before using x(0)=[30] because xp(0)=[−1−2] is already nonzero at the start.
Solve for c1 and c2Adding the top row c1+c2=4 and bottom row c1−c2=2 gives 2c1=6, so c1=3 and c2=1.
x(t)=3[11]e3t+[1−1]e−t+[−1−2]e2t
So the trajectory begins at [30] because the homogeneous part starts at [42] to make up for xp(0)=[−1−2].
In the phase plane, xp(t) and its starting point xp(0)=[−1−2] stay the same no matter where we start, while the homogeneous starting vector xh(0)=c1[11]+c2[1−1] adjusts to bridge the gap from xp(0) to 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 t, a single unknown vector is no longer enough. Suppose we want a particular solution to:
x′=[1221]x+[3t−1]
Even though t only appears in the top entry of [3t−1], multiplying by A mixes the top and bottom entries together, so our guess must include full unknown vectors for both t and the constant term.
Undetermined Coefficients: Polynomials, Sines, and Cosines
x′xp(t)=[1221]x+[3t−1]=?
Text solution
Split the forcing by powers of t and plug in a two-vector guessWriting g(t)=[30]t+[0−1], we guess xp(t)=[ab]t+[cd], whose derivative xp′(t)=[ab] becomes the constant vector on the left.
[ab]=[1221]([ab]t+[cd])+[30]t+[0−1]
[00]t+[ab]=[a+2b+32a+b]t+[c+2d2c+d−1]
Match the t terms to find a and bSetting the t vector to zero gives b=−2a from the bottom row, which we substitute into the top row a+2b+3=0.
a+2(−2a)+3−3aab=0=−3=1,=−2(1)=−2
Match the constant terms using a=1 and b=−2Plugging a and b into the constant vector equation [ab]=[c+2d2c+d−1] gives c=1−2d from the top row, which we substitute into the bottom row.
2(1−2d)+d−11−3ddc=−2=−2=1,=1−2(1)=−1
Put both vectors into the guessCombining our two constant vectors gives the particular solution.
xp(t)=[1−2]t+[−11]
So even though the outside push had no t in its bottom entry, the matrix A mixes the two entries and puts a −2t term in the bottom entry.
The same mixing happens when g(t) contains cost or sint, such as g(t)=[2cost0]. Because differentiating cost produces −sint, our guess must include full unknown vectors for both functions:
xp(t)=[ab]cost+[cd]sint
4
When Forcing Matches an Eigenvalue
Now suppose the exponential forcing pushes at the exact rate of an eigenvalue in xh(t), such as λ1=3:
x′=[1221]x+[40]e3t
In a single differential equation, we would just multiply our guess by t, but in a system a [ab]te3t term is forced to point along the eigenvector line [11] and cannot balance the horizontal push [40] by itself.
Undetermined Coefficients: When Forcing Matches an Eigenvalue
Guess both te3t and e3t vectors and differentiateBecause λ=3 is an eigenvalue, we set xp(t)=[ab]te3t+[cd]e3t, and the product rule on te3t brings [ab]e3t into the derivative.
Match the te3t terms to get the eigenvector conditionSetting the te3t vectors equal gives 3[ab]=[a+2b2a+b], which simplifies in both rows to a=b.
Match the e3t terms and eliminate c and dSetting the e3t vectors equal and moving c and d to the left gives two equations whose c and d terms cancel when we add the rows straight down.
Pick one convenient pair for c and dSubstituting a=2 into a+2c−2d=4 leaves c−d=1, and b=2 in the other row gives the same equation. Any c and d with c−d=1 work, because changing [cd] by a multiple of [11] only adds a multiple of [11]e3t, which is already part of xh(t); choosing d=0 gives c=1.
xp(t)=[22]te3t+[10]e3t
So [22]te3t grows along the λ=3 eigenvector line while [10]e3t supplies the sideways piece needed to match the horizontal force [40]e3t.
No matter which way the force g0 points in g(t)=g0e3t, the te3t vector [ab] points along the λ=3 eigenvector line [11], and the e3t vector [cd] enters the e3t match as (3I−A)[cd], which supplies the piece along [1−1] so that [ab]+(3I−A)[cd]=g0.
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) contains functions like t1 or tant whose derivatives keep producing new kinds of terms, we need a general method that finds xp(t) for any forcing term.
Instead of guessing the form of xp(t), Variation of Parameters starts from the homogeneous solution xh(t)=c1x1(t)+c2x2(t) and replaces the constants c1 and c2 with unknown functions u1(t) and u2(t):
xp(t)=u1(t)x1(t)+u2(t)x2(t)
How Variation of Parameters Works
Because x1(t) and x2(t) already satisfy x′=Ax, all the natural current terms cancel out when we plug xp(t) into x′=Ax+g(t), leaving a linear system for the derivatives u1′(t) and u2′(t):
u1′(t)x1(t)+u2′(t)x2(t)=g(t)
Putting x1(t) and x2(t) side-by-side as the columns of a matrix gives the compact formula:
If we use the homogeneous solutions x1(t)=[11]e3t and x2(t)=[1−1]e−t as a moving coordinate grid, an unforced boat drifts along with the grid at fixed coordinates (u1,u2), while an outside force g(t) pushes it across the grid lines at rates u1′(t) and u2′(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, and then on a force with t1 that Undetermined Coefficients cannot handle:
x′=[1221]x+[t2e3tt2e3t]
When we solve Φ(t)u′(t)=g(t) using the matrix inverse, remember that we invert a 2×2 matrix by swapping the diagonal entries, flipping the signs of the other two entries, and dividing by the determinant:
[acbd]−1=ad−bc1[d−c−ba]
We can find u1′(t) and u2′(t) either by adding and subtracting rows or by multiplying by Φ−1(t).
First force (g(t)=[40]e3t), solve for u1′ and u2′ by eliminationWriting u1′[11]e3t+u2′[1−1]e−t=[4e3t0], we add and subtract the two rows to solve for u1′(t) and u2′(t).
Both the te3t term and the e3t term come out of the integrals automatically, and [21−21]e3t differs from our earlier [10]e3t only by 21[11]e3t, which is already part of xh(t).
Second force (g(t)=[t2e3tt2e3t]), invert Φ(t) to find u′(t)Putting x1(t) and x2(t) into Φ(t)=[e3te3te−t−e−t] gives determinant −2e2t, so we multiply Φ−1(t) by g(t).
Because the force [t2e3tt2e3t] points purely along the first eigenvector [11],u2′(t) is zero and only the first current is pushed.
In a 2×2 problem, adding and subtracting the two row equations of u1′x1+u2′x2=g(t) is often faster than writing out Φ−1(t), and both give the exact same u1′(t) and u2′(t).
7
Variation of Parameters with the Matrix Exponential
When we already have the matrix exponential eAt for x′=Ax+g(t), we can write down the forced solution without inverting a matrix at all.
Because eAt is a fundamental matrix whose value at t=0 is I and whose inverse is simply e−At, plugging in Φ(t)=eAt turns Variation of Parameters into the matrix version of an integrating factor.
Variation of Parameters with the Matrix Exponential
x′x(0)Φ(t)x(t)=Ax+g(t)=x0=eAt=?
For an indefinite integral, a particular solution is xp(t)=eAt∫e−Atg(t)dt. When we have a starting position x(0)=x0, integrating from s=0 to s=t builds the initial condition right in:
x(t)=eAtx0+eAt∫0te−Asg(s)ds=initial state x0drifting for time teAtx0+∫0tpush at time s driftingfor remaining time t−seA(t−s)g(s)ds
We write s for the time variable inside the integral so we don't confuse it with the upper limit t.
From 0 to t, each small push g(s)ds at time s gets carried by the currents as eA(t−s)g(s)ds for the remaining time t−s. Early pushes have a long time to drift with the currents, while pushes right before time t 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′xh(t)xp(t)=Ax+g(t)=?=?
Every forced system x′=Ax+g(t) splits into x(t)=xh(t)+xp(t):
Find xh(t) first
Use the eigenvalues and eigenvectors of A to get xh(t)=c1x1(t)+c2x2(t). You need the eigenvalues right away to check whether g(t) matches one of them.
Pick a method for xp(t) based on g(t)
Undetermined Coefficients is fastest for exponentials, polynomials, and sines or cosines. For a non-eigenvalue exponential like [30]e2t when λ=3,−1, guess [ab]e2t. Because A mixes the rows, polynomials like [3t−1] need a full vector for every power of t down to the constant ([ab]t+[cd]), and cost or sint forces like [2cost0] need full vectors for both ([ab]cost+[cd]sint). When an exponential matches an eigenvalue, like [40]e3t for λ=3, guess [ab]te3t+[cd]e3t since [ab] is stuck on the eigenvector line.
Variation of Parameters works for any g(t) and is needed for functions like t1 or tant (such as [t2e3tt2e3t]), though a simple exponential is faster to guess than to integrate. Solve u1′x1+u2′x2=g(t) (or u′=Φ−1g), integrate to find u1 and u2, and form xp(t)=u1x1+u2x2=Φ(t)∫Φ−1(t)g(t)dt. When eAt is given, use Φ(t)=eAt and Φ−1(t)=e−At to get x(t)=eAtx0+eAt∫0te−Asg(s)ds.
Use x(0) at the very end
Add x(t)=xh(t)+xp(t) before plugging in t=0 so c1 and c2 also account for xp(0).
8
Practice
1
Find the general solution of x′=[2112]x+[1−5]e−t.
Find the eigenvalues of [2112] first: does the forcing exponent −1 match either of them?
First find the eigenvalues and eigenvectors of A=[2112]:
det(A−λI)=(2−λ)2−1=λ2−4λ+3=(λ−3)(λ−1)=0
For λ1=3, the eigenvector is [11], and for λ2=1, the eigenvector is [1−1], giving the homogeneous solution:
xh(t)=c1[11]e3t+c2[1−1]et
Since the forcing exponent −1 is not an eigenvalue, guess xp(t)=[ab]e−t and differentiate to get xp′(t)=[−a−b]e−t. (Watch out: dropping the minus sign from the chain rule on e−t leads to the contradictory equations a+b=−1 and a+b=5, while forgetting xp′ on the left side and solving Axp+g=0 gives the wrong vector [−37311]e−t.)
Match the t terms using a=−2b from the bottom row:
2(−2b)+b+6−3bba=0=−6=2,=−2(2)=−4
Now match the constant terms with a=−4 and b=2 on the left. (Be careful not to set [2c+dc+2d+4]=[00] by forgetting xp′=[ab] on the left side, which gives c=34 and d=−38.)
Combine the full solution x(t)=xh(t)+xp(t) before plugging in x(0)=[15]. (Plugging x(0)=[15] into xh(0) alone ignores xp(0)=[−20] and gives c1=3,c2=−2 instead of c1=4,c2=−1.)
Adding the two rows gives 2c1=8, so c1=4 and c2=−1:
x(t)=4[11]e3t−[1−1]et+[−42]t+[−20]
3
Find a particular solution xp(t) of x′=[1221]x+[10cost0].
What happens when you differentiate cost, and what second trig term must be in your guess to match it?
Guess xp(t)=[ab]cost+[cd]sint and differentiate to get xp′(t)=[cd]cost−[ab]sint. (Watch the minus sign on (cost)′=−sint: writing +[ab]sint leads to the inconsistent system 4a+4b=−10 and 4a+4b=−20, and getting both derivative signs backwards, −[cd]cost+[ab]sint on the left, flips the sign of the sint vector to give [1−4]cost+[−32]sint.)
Find a particular solution xp(t) of x′=[1221]x+[04]e−t.
Check the eigenvalues of [1221]: why will a guess of [ab]te−t alone not work?
The eigenvalues of A=[1221] are λ1=3 and λ2=−1. Because the forcing exponent −1 matches λ2=−1, we must include both te−t and e−t terms:
xp(t)=[ab]te−t+[cd]e−t
Differentiate using the product rule and plug into the system. (Don't forget the minus sign from the chain rule on e−t: writing +[cd]e−t in xp′(t) gives [a+cb+d] on the left, and then the equations no longer pin down a and b; choosing d=0 gives the wrong answer [−20]e−t.)
Matching the te−t terms gives −a=a+2b, so b=−a (the λ=−1 eigenvector direction [1−1]). Matching the e−t terms gives:
a−2c−2db−2c−2d=0=4
Because −2c−2d has the same sign in both rows, subtract the bottom row from the top row to eliminate c and d:
a−ba−(−a)a=−4=−4=−2,b=2
Substitute a=−2 into −2−2c−2d=0 to get c+d=−1, and choose d=0 so c=−1:
xp(t)=[−22]te−t+[−10]e−t
5
Use Variation of Parameters to find the general solution of x′=[2112]x+[t22et−t22et] for t>0.
Write t22 as 2t−2 before integrating: dropping the minus sign from the power rule gives +t2[1−1]et.
Use the homogeneous solutions x1(t)=[11]e3t and x2(t)=[1−1]et from Problem 1: what happens when you add and subtract the two rows of u1′x1+u2′x2=g(t)?
With x1(t)=[11]e3t and x2(t)=[1−1]et, set up u1′(t)x1(t)+u2′(t)x2(t)=g(t):
u1′e3t+u2′etu1′e3t−u2′et=t22et=−t22et
Add the two equations to find u1′(t), and subtract the bottom from the top to find u2′(t):
2u1′e3t2u2′et=0⟹u1′(t)=0=t24et⟹u2′(t)=t22
Integrate both functions. (Write t22 as 2t−2 before integrating: dropping the minus sign from the power rule gives +t2[1−1]et, and confusing t21 with t1 gives 2lnt[1−1]et.)
u1(t)u2(t)=∫0dt=0=∫2t−2dt=−t2
Multiply back into xp(t)=u1(t)x1(t)+u2(t)x2(t) and add xh(t):
x(t)=c1[11]e3t+c2[1−1]et−t2[1−1]et
6
Given that eAt=[e2tte2t0e2t] for A=[2102], use the matrix exponential formula to solve the initial value problem x′=Ax+[e2t0],x(0)=[13].
How do you get e−As from eAt without computing a matrix inverse?
Use the matrix exponential formula x(t)=eAtx(0)+eAt∫0te−Asg(s)ds. First compute the unforced drift eAtx(0):
eAtx(0)=[e2tte2t0e2t][13]=[e2t(3+t)e2t]
To form e−As, replace every t in eAt with −s. (Be sure to replace the t in front of te2t with −s as well, not just the exponents: leaving +se−2s in the bottom-left entry turns −21t2 into +21t2 and gives the wrong bottom entry (3+t+23t2)e2t.)
e−Asg(s)=[e−2s−se−2s0e−2s][e2s0]=[1−s]
Integrate from s=0 to s=t, then multiply on the left by eAt: