The equation y′′+y=sect looks like an ordinary oscillator with an applied force, yet undetermined coefficients cannot solve it, because sect and its derivatives do not stay inside the span of finitely many functions. Variation of parameters needs no trial family. It starts from two independent solutions of the homogeneous equation, lets their constant multipliers vary with t, and writes a particular solution as integrals that make sense for every forcing that is continuous on the interval. Throughout, t is the independent variable and a prime means d/dt.
Key terms
Fundamental pair
Definition Variation of parameters works with the normalized equation
y′′+p(t)y′+q(t)y=g(t)on a regular interval I, an open interval on which p, q and g are continuous. An equation P(t)y′′+Q(t)y′+R(t)y=G(t) takes this form after division by P(t) on an interval where P(t)=0, with p=Q/P, q=R/P and g=G/P. A fundamental pair on I is a pair of solutions y1 and y2 of the homogeneous equation y′′+py′+qy=0 on I whose Wronskian
W=y1y2′−y1′y2is nonzero at one point of I. By Abel’s identity the Wronskian is then nonzero at every point of I, and every solution of the homogeneous equation on I is C1y1+C2y2 for exactly one choice of the constants.
In plain words A fundamental pair is all the information about the homogeneous equation that the method needs. The Wronskian condition says that the two solutions are genuinely different at every instant, not multiples of each other.
Example For y′′+y=g, the functions y1=cost and y2=sint solve y′′+y=0, and their Wronskian is W=cos2t+sin2t=1. For y′′−2y′+y=g, the pair et and tet has
W=et(et+tet)−et⋅tet=e2t.Both Wronskians are nonzero on all of R. By contrast, cost and 3cost have W=0 and do not form a fundamental pair.
Variation of parameters
Definition Let y1 and y2 be a fundamental pair on a regular interval I. Variation of parameters looks for a particular solution of y′′+py′+qy=g of the form
yp=u1(t)y1+u2(t)y2,where the constants of the complementary solution C1y1+C2y2 are replaced by differentiable functions u1 and u2, called the parameters. Two unknown functions for one equation leave room for one extra condition, and the method imposes
u1′y1+u2′y2=0at every point of I. With this auxiliary condition the first derivative contains no derivatives of the parameters,
yp′=u1y1′+u2y2′,so second derivatives of u1 and u2 never appear when yp is substituted into the equation.
In plain words The constants that describe the homogeneous solutions are allowed to drift with time, and the drift is chosen so that the equation produces the forcing. The auxiliary condition is a convenient choice, not a consequence of the equation, and it keeps the first derivative as simple as if the parameters were constant.
Example For y′′+y=g with the pair cost and sint, the candidate is yp=u1cost+u2sint. The product rule gives
yp′=u1′cost+u2′sint−u1sint+u2cost,and the auxiliary condition u1′cost+u2′sint=0 removes the first two terms. What is left, yp′=−u1sint+u2cost, has the same shape as the derivative of C1cost+C2sint.
Equations for the parameter derivatives
Definition Differentiating yp′=u1y1′+u2y2′ once more gives
yp′′=u1y1′′+u2y2′′+u1′y1′+u2′y2′.In yp′′+pyp′+qyp the terms containing u1 and u2 without derivatives add up to u1(y1′′+py1′+qy1)+u2(y2′′+py2′+qy2), which is zero because y1 and y2 solve the homogeneous equation. The equation therefore reduces to u1′y1′+u2′y2′=g. Together with the auxiliary condition, the parameter derivatives satisfy the linear system
y1u1′+y2u2′y1′u1′+y2′u2′=0,=g.At each t in I the determinant of this system is W(t)=0, so it has exactly one solution (u1′(t),u2′(t)).
In plain words The two unknowns are the rates at which the parameters change. One equation is the auxiliary choice and the other is the differential equation itself, and once the homogeneous terms cancel only these rates remain.
Example For y′′+y=sect on (−π/2,π/2), with y1=cost and y2=sint, the system reads
costu1′+sintu2′−sintu1′+costu2′=0,=sect.Multiplying the first equation by cost and the second by −sint and adding gives u1′=−sintsect=−tant. Multiplying the first by sint and the second by cost and adding gives u2′=costsect=1.
Wronskian denominator
Definition Solving the system by Cramer’s rule gives
u1′=−Wy2g,u2′=Wy1g,where W=y1y2′−y1′y2 is the Wronskian of the pair, which is nonzero on I. Here g is the forcing of the normalized equation, whose coefficient of y′′ is 1. For P(t)y′′+Q(t)y′+R(t)y=G(t) the forcing in these formulas is g=G/P, not G. The signs depend on the order of the pair. Swapping y1 and y2 changes the sign of W and exchanges the roles of the two formulas, and it leads to the same particular solutions.
In plain words The Wronskian measures how independent the two homogeneous solutions are at each instant, and dividing by it turns the forcing into rates of change for the two parameters. The formulas assume that the equation was divided by its leading coefficient first, and skipping that step feeds in the wrong forcing.
Example Solve y′′−2y′+y=et/t on (0,∞), where the forcing is continuous. With y1=et, y2=tet and W=e2t,
u1′=−e2ttet⋅et/t=−1,u2′=e2tet⋅et/t=t1.Taking u1=−t and u2=lnt gives yp=−tet+tetlnt. The first term solves the homogeneous equation, so a simpler particular solution is
yp=tetlnt.Undetermined coefficients could not reach this forcing, since no finite trial family contains et/t and all its derivatives.
Particular solution by definite integrals
Definition Fix a point t0 in the regular interval I and integrate the parameter derivatives from t0,
u1(t)=−∫t0tW(s)y2(s)g(s)ds,u2(t)=∫t0tW(s)y1(s)g(s)ds.The integrands are continuous on I, so both integrals exist for every t in I, and yp=u1y1+u2y2 solves y′′+py′+qy=g on all of I. In one formula,
yp(t)=∫t0tK(t,s)g(s)ds,with the kernel
K(t,s)=W(s)1[y1(s)y2(t)−y1(t)y2(s)].This particular solution satisfies yp(t0)=0 and yp′(t0)=0. Both integrals vanish at t0, which gives the height, and by the auxiliary condition the slope is u1y1′+u2y2′, which also vanishes at t0. The solution with y(t0)=k0 and y′(t0)=k1 is therefore yp plus the homogeneous solution C1y1+C2y2 with those same data. A different lower limit, or constants added to u1 and u2, changes yp only by a homogeneous solution. The integral formula is an exact answer even when the integrals have no elementary antiderivative.
In plain words Starting both integrals at the same time t0 picks out the response that starts at rest, with zero height and zero slope at t0. Any other starting height and slope is reached by adding a homogeneous solution, and the forcing only has to be continuous for the integrals to make sense.
Example For y′′+y=sect on (−π/2,π/2) take t0=0. The earlier cards gave u1′=−tant and u2′=1. Since cost>0 on this interval,
u1(t)=−∫0ttansds=ln(cost),and u2(t)=t, so
yp=costln(cost)+tsint.Differentiating, the terms −sint and +sint cancel, and yp′=−sintln(cost)+tcost. One more derivative gives
yp′′+yp=costsin2t+cost=cost1=sect,and yp(0)=yp′(0)=0 as promised. The solution with y(0)=1 and y′(0)=2 is y=cost+2sint+yp. These solutions live on (−π/2,π/2) only. As t approaches either endpoint the height yp(t) tends to π/2, but the slope yp′(t) is unbounded and sect is not defined at the endpoints, so the formula gives no solution through them.
Check yourself
- Use variation of parameters to find a particular solution of y′′−y=2et, and compare the result with undetermined coefficients.
Show the answer
The pair y1=et and y2=e−t has W=et(−e−t)−ete−t=−2. The formulas give
u1′=−−2e−t⋅2et=1,u2′=−2et⋅2et=−e2t.
Taking u1=t and u2=−21e2t gives yp=tet−21et. The term −21et solves the homogeneous equation and can be dropped, which leaves yp=tet. Undetermined coefficients gives the same function, since 1 is a simple root of r2−1, the trial is Atet, and L[Atet]=2Aet forces A=1.
- For y′′+y=g(t) with g continuous on an interval containing 0, show that the definite-integral formula with t0=0 gives yp(t)=∫0tsin(t−s)g(s)ds. Evaluate it for g(t)=t, and explain why the result is not the particular solution t that undetermined coefficients gives.
Show the answer
With y1=cost, y2=sint and W=1, the kernel is K(t,s)=cosssint−costsins=sin(t−s), which gives the formula. For g(s)=s, substitute u=t−s and use ∫0tsinudu=1−cost and ∫0tusinudu=sint−tcost. Then
yp(t)=∫0t(t−u)sinudu=t−sint.
Both t−sint and t solve y′′+y=t, and they differ by −sint, a homogeneous solution. The definite-integral version is the one that starts at rest, with yp(0)=0 and yp′(0)=1−cos0=0, while the function t has slope 1 at 0.
- The functions y1=t and y2=t2 solve t2y′′−2ty′+2y=0 on (0,∞). Find a particular solution of t2y′′−2ty′+2y=t3 there, and show what goes wrong if the forcing t3 is used in the formulas without dividing by t2.
Show the answer
Dividing by t2 gives the normalized forcing g=t. The Wronskian is W=t⋅2t−1⋅t2=t2, so u1′=−t2⋅t/t2=−t and u2′=t⋅t/t2=1. Taking u1=−21t2 and u2=t gives
yp=−21t3+t3=21t3.
As a check, t2⋅3t−2t⋅23t2+2⋅21t3=3t3−3t3+t3=t3. With the unnormalized forcing t3 the formulas give u1′=−t3 and u2′=t2, so u1=−41t4, u2=31t3 and the candidate is 121t5. Substituting it into the left side gives 1220t5−1210t5+122t5=t5, not t3.