Differential EquationsNonhomogeneous and Higher-Order Equations2 of 4
Nonhomogeneous and Higher-Order Equations · 2
Variation of Parameters
We need a way to solve linear differential equations when we can't guess the form of the particular solution.
1
Why We Let the Parameters Vary
Suppose we want to solve the differential equation
y′′+y=sec(t)
For an equation like y′′+y=et, we can guess a particular solution of the form Aet because the derivatives of et repeat. Here, differentiating sec(t) keeps producing new secant and tangent terms, so there is no finite guess to try. Instead, we build the solution directly from the homogeneous solutions y1=cos(t) and y2=sin(t).
Why We Let the Parameters Vary
Replacing the fixed constants c1 and c2 in the homogeneous solution with unknown functions u1(t) and u2(t) gives the form of our solution:
With zero on the right-hand side, the solution stays on a single wave with fixed (c1,c2). With sec(t) pushing on the system, the solution moves from one wave to another as u1(t) and u2(t) change.
When an outside force pushes on the system, the solution moves from one unforced wave to a new one at every moment, so its wave weights trace a path instead of staying fixed.
2
The Free Condition and the 2×2 System
We want to find two equations for the two unknown functions u1(t) and u2(t) in y=u1y1+u2y2. Because we replaced a single unknown function y with two unknown functions, we get to choose a second condition of our own to keep their second derivatives out of the equation.
The Free Condition and the 2×2 System
yy′′+yu1,u2=u1y1+u2y2=sec(t)=?
Differentiating y=u1y1+u2y2 with the product rule splits the derivative y′ into two groups:
y′=as if u1,u2 were constant(u1y1′+u2y2′)+extra terms from u1,u2 changing(u1′y1+u2′y2)
Setting that second group to zero clears u1′ and u2′ out of y′. Then, when we find y′′ and plug everything into the differential equation, all the u1 and u2 terms cancel out because y1 and y2 solve the homogeneous equation. That leaves a 2×2 system for u1′ and u2′:
u1′y1+u2′y2u1′y1′+u2′y2′=0=g(t)
Geometrically, setting u1′y1+u2′y2=0 means that at each moment t0, the solution curve y(t) has the exact same slope as the homogeneous wave u1(t0)y1(t)+u2(t0)y2(t) it is currently passing through, rather than crossing it at an angle.
At any point, the frozen wave has the exact same slope as the solution curve only when the two extra derivative terms cancel to zero.
3
Solving y′′+y=sec(t) and the Wronskian
Now we can use the 2×2 system to solve our original equation:
y′′+y=sec(t)
Solving y″ + y = sec(t) and the Wronskian
y′′+y=sec(t)
y1=cos(t),y2=sin(t)
u1′y1u1′y1′+u2′y2+u2′y2′=0=g(t)
y=?
Text solution
1. Plug y1=cos(t) and y2=sin(t) into the 2×2 systemPutting the homogeneous solutions in the top row and their derivatives in the bottom row turns the differential equation into two equations we can solve for u1′ and u2′.
2. Eliminate u1′ to solve for u2′ and u1′Multiplying the top equation by sin(t) and the bottom equation by cos(t) makes the u1′ terms cancel when we add them, and substituting u2′=1 back into the top equation gives u1′.
3. Integrate u1′ and u2′Integrating each derivative with respect to t gives the two functions u1(t) and u2(t).
u1u2=∫−tan(t)dt=ln∣cos(t)∣+c1=∫1dt=t+c2
4. Substitute u1 and u2 into y=u1cos(t)+u2sin(t) and expandMultiplying out the terms separates the integration constants into the homogeneous solution and the remaining pieces into the particular solution.
Instead of solving the 2×2 system by elimination each time, you can write the solution directly using Cramer's Rule, which puts the Wronskian determinant in the denominator:
Because y1 and y2 are linearly independent solutions of the homogeneous equation, W is never zero. Solving the system by elimination and using the Wronskian formulas do the exact same algebra, so you can use whichever feels faster on a test.
4
Variable Coefficients and Dividing by the Leading Term
Now let's solve an equation with variable coefficients on the left-hand side for t>0, where the homogeneous solutions y1=t and y2=t2 are given:
t2y′′−2ty′+2y=t3et
Even though every derivative of t3et is a cubic times et, we can't count on guessing a solution here: the powers of t on the left-hand side raise the powers of t in any guess, and undetermined coefficients is only guaranteed to work when the left-hand side has constant coefficients.
Variable Coefficients and Dividing by the Leading Term
t2y′′−2ty′+2y=t3et
t>0
y1=t,y2=t2
y=?
Text solution
1. Divide the equation by t2 so the coefficient of y′′ is 1Dividing the whole equation by t2 makes the coefficient of y′′ equal to 1 and gives the right-hand side g(t)=tet.
y′′−t2y′+t22y=g(t)tet
2. Set up the 2×2 system and compute the Wronskian WUsing the given homogeneous solutions y1=t and y2=t2 with g(t)=tet gives the system and its Wronskian determinant W.
3. Find u1′ and u2′ from the Wronskian determinantsReplacing the first and second columns of W with [0tet] and dividing by W=t2 gives u1′ and u2′.
4. Integrate u1′ and u2′Integrating u1′=−tet by parts and u2′=et directly gives the functions u1(t) and u2(t).
u1u2=∫−tetdt=−tet+et+c1=∫etdt=et+c2
5. Substitute into y=u1t+u2t2 and cancel the ±t2et termsPlugging u1 and u2 back into the solution and multiplying out cancels −t2et with +t2et, leaving the general solution.
Before using Variation of Parameters, check whether you need it: if the left-hand side has constant coefficients and the right-hand side's derivatives repeat or reach zero (such as y′′+y=et or y′′+y=t2), undetermined coefficients (guessing Aet or a polynomial) is much faster. Use Variation of Parameters when the right-hand side has derivatives that never repeat or reach zero (like y′′+y=sec(t)), or when the left-hand side has variable coefficients (like t2y′′−2ty′+2y=t3et, where y1=t and y2=t2 are given).
First check the coefficient of y′′ and divide the equation by it so the equation has the form y′′+p(t)y′+q(t)y=g(t) (for t2y′′−2ty′+2y=t3et, dividing by t2 makes g(t)=tet, not t3et). Then write y=u1y1+u2y2 using the two homogeneous solutions y1,y2, and solve the 2×2 system for u1′ and u2′:
Finally, integrate u1′ and u2′ to get u1 and u2, and plug them back into y=u1y1+u2y2.
5
Practice
1
Solve y′′+4y=sec(2t).
Start with y′′+4y=0: what two trig functions have a second derivative equal to −4 times themselves, and what factor comes out from the chain rule when you differentiate them for the bottom row of the system?
The homogeneous equation y′′+4y=0 has solutions y1=cos(2t) and y2=sin(2t), so y=u1cos(2t)+u2sin(2t).
Differentiating gives y1′=−2sin(2t) and y2′=2cos(2t), which gives the system and the Wronskian:
(Watch out: forgetting the chain-rule factor of 2 in y1′ and y2′ gives W=1 instead of W=2, which leads to the common wrong answer y=c1cos(2t)+c2sin(2t)+21cos(2t)ln∣cos(2t)∣+tsin(2t).)
Solving for u1′ and u2′ and integrating (keep track of the 21 from du=2dt in the tangent integral):
(Watch out: when integrating u1′=−1+t2t with u=1+t2 and du=2tdt, forgetting to divide by 2 gives −ln(1+t2) instead of −21ln(1+t2), which produces the wrong answer y=c1et+c2tet−etln(1+t2)+tetarctan(t).)
Plugging u1 and u2 into y=u1t+u2(t1) and combining the t3 terms gives
y=(41t2+c1)t+(−81t4+c2)t1=c1t+tc2+81t3
4
Solve ty′′−(1+t)y′+y=t2e2t for t>0, given that y1=1+t and y2=et solve the homogeneous equation.
Divide the equation to get y′′ by itself first, then write out the Wronskian of y1=1+t and y2=et. What simplifies when you subtract the two diagonal products?
Divide the entire equation by t so the coefficient of y′′ is 1:
y′′−t1+ty′+t1y=te2t⟹g(t)=te2t
(Watch out: forgetting to divide by t and putting g(t)=t2e2t into the system leaves an extra factor of t in both integrals, which leads to the wrong answer y=c1(1+t)+c2et+41(2t2−5t+5)e2t.)
For y1=1+t and y2=et, the Wronskian simplifies nicely:
W=1+t1etet=(1+t)et−et=tet
Now find u1′ and u2′ and integrate (noticing for u2 that (1+t)et is the exact product-rule derivative of tet):