Unit 4, lesson 23

Variation of Parameters

How variation of parameters builds a particular solution from a fundamental pair, why the Wronskian is the denominator, and how definite integrals give the response that starts at rest.

  • Video 23
  • Particular Solutions of Forced Equations

The equation y′′+y=sec⁡ty'' + y = \sec t looks like an ordinary oscillator with an applied force, yet undetermined coefficients cannot solve it, because sec⁡t\sec t 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 tt, and writes a particular solution as integrals that make sense for every forcing that is continuous on the interval. Throughout, tt is the independent variable and a prime means d/dtd/dt.

Key terms

Fundamental pair

Definition Variation of parameters works with the normalized equation

y′′+p(t) y′+q(t) y=g(t)y'' + p(t)\,y' + q(t)\,y = g(t)

on a regular interval II, an open interval on which pp, qq and gg are continuous. An equation P(t) y′′+Q(t) y′+R(t) y=G(t)P(t)\,y'' + Q(t)\,y' + R(t)\,y = G(t) takes this form after division by P(t)P(t) on an interval where P(t)≠0P(t) \ne 0, with p=Q/Pp = Q/P, q=R/Pq = R/P and g=G/Pg = G/P. A fundamental pair on II is a pair of solutions y1y_1 and y2y_2 of the homogeneous equation y′′+p y′+q y=0y'' + p\,y' + q\,y = 0 on II whose Wronskian

W=y1y2′−y1′y2W = y_1y_2' - y_1'y_2

is nonzero at one point of II. By Abel’s identity the Wronskian is then nonzero at every point of II, and every solution of the homogeneous equation on II is C1y1+C2y2C_1y_1 + C_2y_2 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=gy'' + y = g, the functions y1=cos⁡ty_1 = \cos t and y2=sin⁡ty_2 = \sin t solve y′′+y=0y'' + y = 0, and their Wronskian is W=cos⁡2t+sin⁡2t=1W = \cos^2 t + \sin^2 t = 1. For y′′−2y′+y=gy'' - 2y' + y = g, the pair ete^t and tette^t has

W=et(et+tet)−et⋅tet=e2t.\begin{aligned} W &= e^t(e^t + te^t) - e^t \cdot te^t \\[0.4em] &= e^{2t}. \end{aligned}

Both Wronskians are nonzero on all of R\mathbb{R}. By contrast, cos⁡t\cos t and 3cos⁡t3\cos t have W=0W = 0 and do not form a fundamental pair.

Variation of parameters

Definition Let y1y_1 and y2y_2 be a fundamental pair on a regular interval II. Variation of parameters looks for a particular solution of y′′+p y′+q y=gy'' + p\,y' + q\,y = g of the form

yp=u1(t) y1+u2(t) y2,y_p = u_1(t)\,y_1 + u_2(t)\,y_2,

where the constants of the complementary solution C1y1+C2y2C_1y_1 + C_2y_2 are replaced by differentiable functions u1u_1 and u2u_2, called the parameters. Two unknown functions for one equation leave room for one extra condition, and the method imposes

u1′y1+u2′y2=0u_1'y_1 + u_2'y_2 = 0

at every point of II. With this auxiliary condition the first derivative contains no derivatives of the parameters,

yp′=u1y1′+u2y2′,y_p' = u_1y_1' + u_2y_2',

so second derivatives of u1u_1 and u2u_2 never appear when ypy_p 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=gy'' + y = g with the pair cos⁡t\cos t and sin⁡t\sin t, the candidate is yp=u1cos⁡t+u2sin⁡ty_p = u_1\cos t + u_2\sin t. The product rule gives

yp′=u1′cos⁡t+u2′sin⁡t−u1sin⁡t+u2cos⁡t,\begin{aligned} y_p' &= u_1'\cos t + u_2'\sin t \\[0.4em] &\quad - u_1\sin t + u_2\cos t, \end{aligned}

and the auxiliary condition u1′cos⁡t+u2′sin⁡t=0u_1'\cos t + u_2'\sin t = 0 removes the first two terms. What is left, yp′=−u1sin⁡t+u2cos⁡ty_p' = -u_1\sin t + u_2\cos t, has the same shape as the derivative of C1cos⁡t+C2sin⁡tC_1\cos t + C_2\sin t.

Equations for the parameter derivatives

Definition Differentiating yp′=u1y1′+u2y2′y_p' = u_1y_1' + u_2y_2' once more gives

yp′′=u1y1′′+u2y2′′+u1′y1′+u2′y2′.\begin{aligned} y_p'' &= u_1y_1'' + u_2y_2'' \\[0.4em] &\quad + u_1'y_1' + u_2'y_2'. \end{aligned}

In yp′′+p yp′+q ypy_p'' + p\,y_p' + q\,y_p the terms containing u1u_1 and u2u_2 without derivatives add up to u1(y1′′+p y1′+q y1)+u2(y2′′+p y2′+q y2)u_1(y_1'' + p\,y_1' + q\,y_1) + u_2(y_2'' + p\,y_2' + q\,y_2), which is zero because y1y_1 and y2y_2 solve the homogeneous equation. The equation therefore reduces to u1′y1′+u2′y2′=gu_1'y_1' + u_2'y_2' = g. Together with the auxiliary condition, the parameter derivatives satisfy the linear system

y1 u1′+y2 u2′=0,y1′ u1′+y2′ u2′=g.\begin{aligned} y_1\,u_1' + y_2\,u_2' &= 0, \\[0.4em] y_1'\,u_1' + y_2'\,u_2' &= g. \end{aligned}

At each tt in II the determinant of this system is W(t)≠0W(t) \ne 0, so it has exactly one solution (u1′(t),u2′(t))(u_1'(t), u_2'(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=sec⁡ty'' + y = \sec t on (−π/2,π/2)(-\pi/2, \pi/2), with y1=cos⁡ty_1 = \cos t and y2=sin⁡ty_2 = \sin t, the system reads

cos⁡t u1′+sin⁡t u2′=0,−sin⁡t u1′+cos⁡t u2′=sec⁡t.\begin{aligned} \cos t\,u_1' + \sin t\,u_2' &= 0, \\[0.4em] -\sin t\,u_1' + \cos t\,u_2' &= \sec t. \end{aligned}

Multiplying the first equation by cos⁡t\cos t and the second by −sin⁡t-\sin t and adding gives u1′=−sin⁡tsec⁡t=−tan⁡tu_1' = -\sin t\sec t = -\tan t. Multiplying the first by sin⁡t\sin t and the second by cos⁡t\cos t and adding gives u2′=cos⁡tsec⁡t=1u_2' = \cos t\sec t = 1.

Wronskian denominator

Definition Solving the system by Cramer’s rule gives

u1′=−y2 gW,u2′=y1 gW,\begin{gathered} u_1' = -\frac{y_2\,g}{W}, \\[0.4em] u_2' = \frac{y_1\,g}{W}, \end{gathered}

where W=y1y2′−y1′y2W = y_1y_2' - y_1'y_2 is the Wronskian of the pair, which is nonzero on II. Here gg is the forcing of the normalized equation, whose coefficient of y′′y'' is 11. For P(t) y′′+Q(t) y′+R(t) y=G(t)P(t)\,y'' + Q(t)\,y' + R(t)\,y = G(t) the forcing in these formulas is g=G/Pg = G/P, not GG. The signs depend on the order of the pair. Swapping y1y_1 and y2y_2 changes the sign of WW 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/ty'' - 2y' + y = e^t/t on (0,∞)(0, \infty), where the forcing is continuous. With y1=ety_1 = e^t, y2=tety_2 = te^t and W=e2tW = e^{2t},

u1′=−tet⋅et/te2t=−1,u2′=et⋅et/te2t=1t.\begin{gathered} u_1' = -\frac{te^t \cdot e^t/t}{e^{2t}} = -1, \\[0.4em] u_2' = \frac{e^t \cdot e^t/t}{e^{2t}} = \frac{1}{t}. \end{gathered}

Taking u1=−tu_1 = -t and u2=ln⁡tu_2 = \ln t gives yp=−tet+tetln⁡ty_p = -te^t + te^t\ln t. The first term solves the homogeneous equation, so a simpler particular solution is

yp=tetln⁡t.y_p = te^t\ln t.

Undetermined coefficients could not reach this forcing, since no finite trial family contains et/te^t/t and all its derivatives.

Particular solution by definite integrals

Definition Fix a point t0t_0 in the regular interval II and integrate the parameter derivatives from t0t_0,

u1(t)=−∫t0ty2(s) g(s)W(s) ds,u2(t)=∫t0ty1(s) g(s)W(s) ds.\begin{gathered} u_1(t) = -\int_{t_0}^{t} \frac{y_2(s)\,g(s)}{W(s)}\,ds, \\[0.6em] u_2(t) = \int_{t_0}^{t} \frac{y_1(s)\,g(s)}{W(s)}\,ds. \end{gathered}

The integrands are continuous on II, so both integrals exist for every tt in II, and yp=u1y1+u2y2y_p = u_1y_1 + u_2y_2 solves y′′+p y′+q y=gy'' + p\,y' + q\,y = g on all of II. In one formula,

yp(t)=∫t0tK(t,s) g(s) ds,y_p(t) = \int_{t_0}^{t} K(t, s)\,g(s)\,ds,

with the kernel

K(t,s)=1W(s)[y1(s) y2(t)−y1(t) y2(s)].\begin{aligned} K(t, s) = \frac{1}{W(s)}\big[&y_1(s)\,y_2(t) \\[0.4em] &- y_1(t)\,y_2(s)\big]. \end{aligned}

This particular solution satisfies yp(t0)=0y_p(t_0) = 0 and yp′(t0)=0y_p'(t_0) = 0. Both integrals vanish at t0t_0, which gives the height, and by the auxiliary condition the slope is u1y1′+u2y2′u_1y_1' + u_2y_2', which also vanishes at t0t_0. The solution with y(t0)=k0y(t_0) = k_0 and y′(t0)=k1y'(t_0) = k_1 is therefore ypy_p plus the homogeneous solution C1y1+C2y2C_1y_1 + C_2y_2 with those same data. A different lower limit, or constants added to u1u_1 and u2u_2, changes ypy_p 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 t0t_0 picks out the response that starts at rest, with zero height and zero slope at t0t_0. 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=sec⁡ty'' + y = \sec t on (−π/2,π/2)(-\pi/2, \pi/2) take t0=0t_0 = 0. The earlier cards gave u1′=−tan⁡tu_1' = -\tan t and u2′=1u_2' = 1. Since cos⁡t>0\cos t > 0 on this interval,

u1(t)=−∫0ttan⁡s ds=ln⁡(cos⁡t),u_1(t) = -\int_0^t \tan s\,ds = \ln(\cos t),

and u2(t)=tu_2(t) = t, so

yp=cos⁡t ln⁡(cos⁡t)+tsin⁡t.y_p = \cos t\,\ln(\cos t) + t\sin t.

Differentiating, the terms −sin⁡t-\sin t and +sin⁡t+\sin t cancel, and yp′=−sin⁡t ln⁡(cos⁡t)+tcos⁡ty_p' = -\sin t\,\ln(\cos t) + t\cos t. One more derivative gives

yp′′+yp=sin⁡2tcos⁡t+cos⁡t=1cos⁡t=sec⁡t,\begin{aligned} y_p'' + y_p &= \frac{\sin^2 t}{\cos t} + \cos t \\[0.4em] &= \frac{1}{\cos t} = \sec t, \end{aligned}

and yp(0)=yp′(0)=0y_p(0) = y_p'(0) = 0 as promised. The solution with y(0)=1y(0) = 1 and y′(0)=2y'(0) = 2 is y=cos⁡t+2sin⁡t+ypy = \cos t + 2\sin t + y_p. These solutions live on (−π/2,π/2)(-\pi/2, \pi/2) only. As tt approaches either endpoint the height yp(t)y_p(t) tends to π/2\pi/2, but the slope yp′(t)y_p'(t) is unbounded and sec⁡t\sec t is not defined at the endpoints, so the formula gives no solution through them.

Check yourself

  1. Use variation of parameters to find a particular solution of y′′−y=2ety'' - y = 2e^t, and compare the result with undetermined coefficients.
Show the answer

The pair y1=ety_1 = e^t and y2=e−ty_2 = e^{-t} has W=et(−e−t)−ete−t=−2W = e^t(-e^{-t}) - e^te^{-t} = -2. The formulas give

u1′=−e−t⋅2et−2=1,u2′=et⋅2et−2=−e2t.\begin{gathered} u_1' = -\frac{e^{-t} \cdot 2e^t}{-2} = 1, \\[0.4em] u_2' = \frac{e^t \cdot 2e^t}{-2} = -e^{2t}. \end{gathered}

Taking u1=tu_1 = t and u2=−12e2tu_2 = -\tfrac12e^{2t} gives yp=tet−12ety_p = te^t - \tfrac12e^t. The term −12et-\tfrac12e^t solves the homogeneous equation and can be dropped, which leaves yp=tety_p = te^t. Undetermined coefficients gives the same function, since 11 is a simple root of r2−1r^2 - 1, the trial is AtetAte^t, and L[Atet]=2AetL[Ate^t] = 2Ae^t forces A=1A = 1.

  1. For y′′+y=g(t)y'' + y = g(t) with gg continuous on an interval containing 00, show that the definite-integral formula with t0=0t_0 = 0 gives yp(t)=∫0tsin⁡(t−s) g(s) dsy_p(t) = \int_0^t \sin(t - s)\,g(s)\,ds. Evaluate it for g(t)=tg(t) = t, and explain why the result is not the particular solution tt that undetermined coefficients gives.
Show the answer

With y1=cos⁡ty_1 = \cos t, y2=sin⁡ty_2 = \sin t and W=1W = 1, the kernel is K(t,s)=cos⁡ssin⁡t−cos⁡tsin⁡s=sin⁡(t−s)K(t, s) = \cos s\sin t - \cos t\sin s = \sin(t - s), which gives the formula. For g(s)=sg(s) = s, substitute u=t−su = t - s and use ∫0tsin⁡u du=1−cos⁡t\int_0^t \sin u\,du = 1 - \cos t and ∫0tusin⁡u du=sin⁡t−tcos⁡t\int_0^t u\sin u\,du = \sin t - t\cos t. Then

yp(t)=∫0t(t−u)sin⁡u du=t−sin⁡t.\begin{aligned} y_p(t) &= \int_0^t (t - u)\sin u\,du \\[0.4em] &= t - \sin t. \end{aligned}

Both t−sin⁡tt - \sin t and tt solve y′′+y=ty'' + y = t, and they differ by −sin⁡t-\sin t, a homogeneous solution. The definite-integral version is the one that starts at rest, with yp(0)=0y_p(0) = 0 and yp′(0)=1−cos⁡0=0y_p'(0) = 1 - \cos 0 = 0, while the function tt has slope 11 at 00.

  1. The functions y1=ty_1 = t and y2=t2y_2 = t^2 solve t2y′′−2ty′+2y=0t^2y'' - 2ty' + 2y = 0 on (0,∞)(0, \infty). Find a particular solution of t2y′′−2ty′+2y=t3t^2y'' - 2ty' + 2y = t^3 there, and show what goes wrong if the forcing t3t^3 is used in the formulas without dividing by t2t^2.
Show the answer

Dividing by t2t^2 gives the normalized forcing g=tg = t. The Wronskian is W=t⋅2t−1⋅t2=t2W = t \cdot 2t - 1 \cdot t^2 = t^2, so u1′=−t2⋅t/t2=−tu_1' = -t^2 \cdot t/t^2 = -t and u2′=t⋅t/t2=1u_2' = t \cdot t/t^2 = 1. Taking u1=−12t2u_1 = -\tfrac12t^2 and u2=tu_2 = t gives

yp=−12t3+t3=12t3.y_p = -\tfrac12t^3 + t^3 = \tfrac12t^3.

As a check, t2⋅3t−2t⋅32t2+2⋅12t3=3t3−3t3+t3=t3t^2 \cdot 3t - 2t \cdot \tfrac32t^2 + 2 \cdot \tfrac12t^3 = 3t^3 - 3t^3 + t^3 = t^3. With the unnormalized forcing t3t^3 the formulas give u1′=−t3u_1' = -t^3 and u2′=t2u_2' = t^2, so u1=−14t4u_1 = -\tfrac14t^4, u2=13t3u_2 = \tfrac13t^3 and the candidate is 112t5\tfrac{1}{12}t^5. Substituting it into the left side gives 2012t5−1012t5+212t5=t5\tfrac{20}{12}t^5 - \tfrac{10}{12}t^5 + \tfrac{2}{12}t^5 = t^5, not t3t^3.

How this lesson connects