A second-order differential equation has y′′ as its highest derivative; it may also contain y′ and y. For a linear equation, the normalized form is
y′′+p(t)y′+q(t)y=g(t).
Here p, q, and g are known functions of the independent variable t. The equation is homogeneous when g(t)=0 throughout the interval under consideration:
y′′+p(t)y′+q(t)y=0.
If g is not identically zero, the equation is nonhomogeneous. The function g is the input or forcing term.
Because the equation is second order, an initial-value problem normally needs two pieces of information at the same time t0:
y(t0)=y0,y′(t0)=y0′.
The first condition fixes the starting value. The second fixes the starting slope. We need two independent solutions to accommodate both conditions; later, the Wronskian will tell us whether a chosen pair does that.
Homogeneous equations with constant coefficients
Start with
ay′′+by′+cy=0,
where a, b, and c are constants. We assume a=0 so that this is genuinely a second-order equation. If a=0 but b=0, it reduces to the first-order equation
y′=−bcy,
whose solutions are y(t)=Ce−(c/b)t.
Why exponential trial functions work
The equation balances a function's value, slope, and second derivative. For a=0, we want a function whose derivatives keep the same shape, so all three terms can share a common factor. Exponentials do exactly that. Try
y(t)=ert,
where r is a constant that we still need to find. Exponentials are useful here because differentiating them only introduces powers of r:
y′(t)=rert,y′′(t)=r2ert.
Put these expressions into the differential equation:
ar2ert+brert+cert=0.
Factor out the common exponential:
ert(ar2+br+c)=0.
The exponential ert is never zero, so the polynomial factor must vanish:
ar2+br+c=0.
The polynomial
P(r)=ar2+br+c
is the characteristic polynomial, and P(r)=0 is the characteristic equation. Each real root gives a real exponential solution. Repeated or non-real roots require an extra step, so the first example uses two distinct real roots.
Example: two distinct real roots
Consider
y′′+5y′+6y=0.
Its characteristic equation is
r2+5r+6=0.
Factor it:
(r+2)(r+3)=0.
The roots are
r1=−2,r2=−3,
so we get two solutions:
y1(t)=e−2t,y2(t)=e−3t.
The principle of superposition
For the homogeneous equation
y′′+p(t)y′+q(t)y=0,
any linear combination of solutions is another solution. This is the principle of superposition: if y1 and y2 solve the equation, then
y(t)=C1y1(t)+C2y2(t)
also solves it for every C1,C2∈R.
The reason is the linearity of differentiation. Define the differential operator
This argument depends on the right side being zero. If L[y1]=g and L[y2]=g, then
L[C1y1+C2y2]=(C1+C2)g,
which is not generally equal to g. Arbitrary superposition is therefore a property of the associated homogeneous equation, not of a nonhomogeneous equation with fixed forcing.
A complete initial-value problem
Return to
y′′+5y′+6y=0.
Superposition gives the family
y(t)=C1e−2t+C2e−3t.
Now impose
y(0)=2,y′(0)=3.
Evaluating the solution and its derivative at t=0 gives
C1+C2=2,
and
−2C1−3C2=3.
The same system can be written as
(1−21−3)(C1C2)=(23).
Its determinant is −1, so the system has one solution:
C1=9,C2=−7.
Therefore the unique solution of the IVP is
y(t)=9e−2t−7e−3t.
A quick check confirms both initial conditions:
y(0)y′(t)y′(0)=9−7=2,=−18e−2t+21e−3t,=−18+21=3.
The initial slope lifts the solution before both modes decay
The curve y(t)=9e−2t−7e−3t starts at y(0)=2 and initially rises because y′(0)=3. Both exponential modes decay, so the solution eventually approaches zero from above.
The positive initial slope explains why the curve rises at first. Both exponential terms decay as t increases, so the solution eventually approaches zero.
Existence and uniqueness on an interval
Consider the linear IVP
y′′+p(t)y′+q(t)yy(t0)y′(t0)=g(t),=y0,=y0′.
Let I be an open interval with t0∈I. If p, q, and g are continuous on the interval I, then the IVP has exactly one solution on the entire interval I:
y:I→R.
This is stronger than a merely local statement. The solution does not stop at an interior point where the normalized coefficients remain continuous. The interval ends only where the chosen coefficient interval ends; it need not be all of R.
If an equation is initially written as
a2(t)y′′+a1(t)y′+a0(t)y=h(t),
first divide by a2(t). The normalized coefficients are
The theorem applies on an interval where a2(t)=0 and these three quotients are continuous. A zero of a2 can split the real line into separate coefficient intervals.
The Wronskian and fundamental solutions
The Wronskian answers a concrete question: do two solutions provide enough freedom to match any starting value and slope? Given two differentiable functions f and g, their Wronskian is
The Wronskian tells us whether two solution functions provide independent initial data. Suppose y1 and y2 solve the same homogeneous second-order linear equation on I, with p and q continuous there. To make
y=C1y1+C2y2
satisfy prescribed values at t0, the constants must solve
The determinant of the coefficient matrix is exactly
W[y1,y2](t0).
The matrix can match every pair of initial values if and only if
W[y1,y2](t0)=0.
When this condition holds, the matrix is invertible, so every pair of initial values determines one pair of constants C1,C2. The existence-and-uniqueness theorem then shows that this linear combination is the only solution with those initial values.
In that case, {y1,y2} is called a fundamental set of solutions on I, and
y(t)=C1y1(t)+C2y2(t)
is the general solution of the homogeneous equation: every solution on I appears exactly once for a choice of C1 and C2.
For the example y1=e−2t and y2=e−3t,
W[y1,y2](t)=e−2t(−3e−3t)−(−2e−2t)e−3t=−e−5t.
This never vanishes, so the two exponentials form a fundamental set of solutions on R.
Distinct real roots in general
Assume a,b,c∈R and a=0. The quadratic formula gives
r=2a−b±Δ,Δ=b2−4ac,
where Δ, read “delta,” is the discriminant. Its sign separates the three possible root patterns:
Δ>0: two distinct real roots;
Δ<0: two complex-conjugate roots;
Δ=0: one repeated real root.
For now, consider the first case. Let r1=r2 be the two real roots. Then
The exponential is never zero, and r2−r1=0. Therefore the Wronskian never vanishes, so the two exponentials form a fundamental set. Every real solution is
y(t)=C1er1t+C2er2t.
Applying the distinct-root formula
Example: two opposite real roots
Consider the initial-value problem
y′′−y=0,y(0)=1,y′(0)=−1.
The characteristic equation factors as
r2−1=(r−1)(r+1)=0,
so the roots are −1 and 1. Choose
y1(t)=e−t,y2(t)=et.
Their Wronskian is
W[y1,y2](t)=e−t−e−tetet=2,
so the general solution is
y(t)=C1e−t+C2et.
The initial conditions give
C1+C2=1,−C1+C2=−1.
Adding the equations gives C2=0, and then C1=1. Thus the unique solution is
y(t)=e−t.
Complex characteristic roots
Now suppose Δ<0. The quadratic formula can be written as
r=2a−b±2a−Δi=λ±iμ,
where i is the imaginary unit, i2=−1, and
λ=−2ab,μ=2a−Δ=0.
Both λ and μ are real. The two roots are complex conjugates: they have the same real part and opposite imaginary parts.
Euler's formula
To turn the complex exponentials into real functions, start with the Taylor series
ez=k=0∑∞k!zk,z∈C.
Here C is the set of complex numbers and k! is the factorial of the nonnegative integer k. Put z=ix for a real number x. Using i2=−1, i3=−i, and i4=1 gives
If the discriminant is zero, the characteristic equation has only one root, counted twice:
r=−2ab,b2−4ac=0.
The exponential y1(t)=ert is still a solution. But writing C1ert+C2ert does not give two independent solutions: it is just (C1+C2)ert. We need a second function that is not a constant multiple of the first.
For example,
y′′−2y′+y=0
has characteristic equation (r−1)2=0, so y1(t)=et. To find the missing solution, we keep the exponential and let its multiplier vary with time.
Constructing the second solution
For the general repeated root r=−b/(2a), look for a solution of the form
y2(t)=v(t)y1(t),
where y1(t)=ert is known and v(t) is unknown. This is the idea of reduction of order: use one known solution to turn the search for another into a first-order problem.
Apply the product rule:
y2′y2′′=v′y1+vy1′,=v′′y1+2v′y1′+vy1′′.
Putting these into ay2′′+by2′+cy2=0 and grouping by derivatives of v gives
ay1v′′+(2ay1′+by1)v′+(ay1′′+by1′+cy1)v=0.
The coefficient of v is zero because y1 already solves the equation. What remains is
ay1v′′+(2ay1′+by1)v′=0.
There is no undifferentiated v in this equation. Setting w=v′ makes it first order:
ay1w′+(2ay1′+by1)w=0.
For a repeated root, it simplifies even further. Since y1′=ry1 and 2ar+b=0,
2ay1′+by1=(2ar+b)y1=0.
Thus ay1w′=0. Both a and the exponential y1 are nonzero, so w′=0. Integrating twice gives
w(t)=K,v(t)=Kt+D,
where K and D are constants. Therefore
v(t)y1(t)=Ktert+Dert.
The term Dert is a multiple of the solution we already have. Choosing D=0 and K=1 leaves the new solution
The starting value determines C1; then the slope determines C2:
C1=2,2C1+C2=31,C2=−32.
Hence the unique solution is
y(t)=(2−32t)et/2.
Although et/2 grows, the factor in front changes sign. The derivative makes the behavior clear:
y′(t)=31−tet/2.
For t≥0, the solution rises until t=1, then falls. It crosses zero at t=3.
If we keep y(0)=2 but change the initial slope to y′(0)=2, the constants instead satisfy C1=2 and 1+C2=2. This gives
y(t)=(2+t)et/2,
which keeps increasing for t≥0. Both curves solve the same ODE and start at the same point; the second initial condition determines which one we get.
y′(0)=31y=(2−32t)et/2
y′(0)=2y=(2+t)et/2
The smaller initial slope gives a brief rise followed by a fall. Its maximum is at t=1, and it crosses zero at t=3. The other solution keeps increasing; it does not end where it leaves the plotted window.
Choosing the right pair of solutions
For ay′′+by′+cy=0 with real constant coefficients and a=0, the three characteristic-root cases give these fundamental sets:
Characteristic roots
First solution
Second solution
Distinct real roots r1=r2
er1t
er2t
Nonreal roots λ±iμ, μ=0
eλtcos(μt)
eλtsin(μt)
Repeated real root r
ert
tert
In each case, combine the two functions as y=C1y1+C2y2, then use the initial value and initial slope to find the constants.
Reduction of order with variable coefficients
The same substitution works even when the coefficients are not constant. Start with
y′′+p(t)y′+q(t)y=0,
where p and q are continuous on an open interval I. Suppose a solution y1 is known. Work on an interval where y1(t)=0, since we will divide by it. If the known solution has a zero, use a smaller interval that avoids that zero rather than dividing through it.
Again, set y2=vy1. The product-rule derivatives above give
The last bracket vanishes because y1 solves the original equation. This leaves
y1v′′+(2y1′+p(t)y1)v′=0.
With w=v′, divide by y1 to obtain
w′+(2y1y1′+p(t))w=0.
This is a first-order linear equation in w, and it is also separable. Unlike the repeated-root case, the coefficient of w need not vanish.
Solve this equation for w, integrate v′=w, and multiply the result by y1. A constant added to v only adds a multiple of y1, so it can be set to zero when choosing one second solution. The choice w=0 also gives only a multiple of y1; to find an independent solution, choose a nonzero solution for w.
Example: finding a second power-function solution
Consider
y′′+2t3y′−2t21y=0,t>0.
We are given y1(t)=1/t. First check that it really is a solution:
y1′=−t21,y1′′=t32,
so
y1′′+2t3y1′−2t21y1=t32−2t33−2t31=0.
Here p(t)=3/(2t) and y1 is nonzero on (0,∞). Substituting into the equation for w=v′ gives
t1w′+(−t22+2t23)w=0.
Multiply by t and simplify:
w′−2t1w=0.
For the nonzero solution we want, separate variables and integrate:
wdw=2tdt,ln∣w∣=21lnt+C.
The absolute value allows either sign of w. Since t>0, no absolute value is needed around t. Exponentiating and absorbing the sign into a constant K gives
w(t)=Kt1/2.
There is one constant at this stage. The second constant appears when we integrate v′=w:
v(t)=32Kt3/2+B.
Consequently,
v(t)y1(t)=(32Kt3/2+B)t1=32Kt1/2+tB.
The term B/t is already a multiple of y1. Choose B=0 and K=23 to obtain the convenient second solution
y2(t)=t1/2.
Choosing any other nonzero value of K would only rescale this second solution. The Wronskian confirms independence:
Thus {1/t,t1/2} is a fundamental set on (0,∞), and
y(t)=tC1+C2t1/2,t>0.
The zero solution of the first-order equation for w gives the C2=0 part of this family, so it has not been lost. The domain restriction remains essential: the original coefficients are undefined at t=0.
Nonhomogeneous equations
What changes when the right-hand side is not zero? Consider
y′′+p(t)y′+q(t)y=g(t),
where p, q, and g are continuous on an open interval I. Its associated homogeneous equation keeps the same left-hand side but replaces the forcing g(t) with zero:
y′′+p(t)y′+q(t)y=0.
Suppose {y1,y2} is a fundamental set of solutions of the homogeneous equation on I. Its general solution, called the complementary solution, is
yc(t)=C1y1(t)+C2y2(t).
A particular solution, written yp, is any one function that solves the nonhomogeneous equation. It need not satisfy any prescribed initial conditions; its job is to produce the forcing g(t) when put into the left-hand side.
Once we find one such yp, the general nonhomogeneous solution is
The constants in yc still give the freedom to match an initial value and slope. The particular solution does not add another arbitrary constant.
Why the solutions add this way
Use the linear differential operator
L[u]=u′′+p(t)u′+q(t)u.
Both y and yp solve L[u]=g. Their difference therefore solves the homogeneous equation:
L[y−yp]=L[y]−L[yp]=g−g=0.
Since {y1,y2} is a fundamental set, this difference must be
y−yp=C1y1+C2y2.
Rearranging gives the claimed formula. Conversely, adding any complementary solution to yp works because
L[yc+yp]=L[yc]+L[yp]=0+g=g.
This proves both that the formula gives solutions and that it includes every solution on I. There may be many choices for yp, but any two differ by a homogeneous solution, so they give the same general family.
To solve a nonhomogeneous equation:
Find the complementary solution yc from the associated homogeneous equation.
Find one particular solution yp of the original equation.
Add them: y=yc+yp. If initial conditions are given, apply them to this full sum, not to yc alone.
The new work is the second step: finding yp.
The method of undetermined coefficients
For an equation with constant coefficients,
ay′′+by′+cy=g(t),a=0,
we can often choose a trial form for yp by looking at g(t). The method of undetermined coefficients puts unknown constants into that trial form, then finds their values by substitution.
The standard method applies when g(t) is built from polynomials, exponentials, sine, and cosine through finite sums and products. These functions are useful because their derivatives stay within a finite collection of the same kinds of terms. With constant coefficients, substituting the trial then gives algebraic equations for its unknown constants.
For the starting guesses below, λ and μ are known real constants from the forcing, while A and B are the coefficients to determine:
Forcing term
Trial particular solution
eλt
Aeλt
cos(μt) or sin(μt), with μ=0
Acos(μt)+Bsin(μt)
An exponential keeps its form under differentiation. Sine and cosine turn into each other, so the trial includes both even when the forcing contains only one.
Before using a trial, check the complementary solution. If the trial already solves the homogeneous equation, substitution produces zero rather than the required nonzero forcing, so the trial must be adjusted. Neither example below has that overlap.
Unlike C1 and C2, the coefficients in a particular-solution trial are not left arbitrary: the equation determines them. Variation of parameters is a more general method for finding particular solutions, including in variable-coefficient problems, but it is a separate method from the coefficient matching used here.
Example: exponential forcing
Solve
y′′−3y′−4y=3e2t.
First find the complementary solution. The characteristic equation is
r2−3r−4=(r−4)(r+1)=0,
so the two distinct roots are 4 and −1. Thus
yc(t)=C1e4t+C2e−t.
The forcing is a multiple of e2t, which is not one of those homogeneous solutions. Try
yp(t)=Ae2t,yp′(t)=2Ae2t,yp′′(t)=4Ae2t.
Substitution gives
yp′′−3yp′−4yp=4Ae2t−6Ae2t−4Ae2t=−6Ae2t.
This must equal 3e2t. Since the exponential is never zero,
−6A=3,A=−21.
Therefore
yp(t)=−21e2t,
and the general solution is
y(t)=C1e4t+C2e−t−21e2t.
No initial conditions are given, so C1 and C2 remain arbitrary. All the coefficients and forcing are continuous for real t, and the solution family is valid on R.
Example: trigonometric forcing
Now change only the forcing:
y′′−3y′−4y=2sint.
The associated homogeneous equation has not changed, so neither has the complementary solution:
yc(t)=C1e4t+C2e−t.
For the particular solution, include both sine and cosine:
Sine and cosine are linearly independent, so match their coefficients. The right-hand side has sine coefficient 2 and cosine coefficient 0:
{−5A+3B=2,−3A−5B=0.
The second equation gives B=−3A/5. Put this into the first:
−5A−59A=2⟹−534A=2.
Hence
A=−175,B=173,
so a particular solution is
yp(t)=−175sint+173cost.
Adding the complementary solution gives the general solution, again valid for all real t:
y(t)=C1e4t+C2e−t−175sint+173cost.
As a check, the coefficients produce −5A+3B=2 and −3A−5B=0, so the left-hand side is exactly 2sint, with no cosine term.
Choosing a complete trial
Matching the forcing means including every kind of term that differentiation can produce, not just copying the terms that happen to appear on the right-hand side.
If g(t)=t2+7, start with yp=At2+Bt+C. The forcing has no linear term, but derivatives of the quadratic can produce one, so the trial still needs Bt.
If g(t)=−8etcos(2t), start with yp=et(Acos(2t)+Bsin(2t)). Differentiation mixes the two trigonometric functions while retaining the exponential.
If g(t)=7tetsin(8t), start with
yp=et[(A+Ct)sin(8t)+(B+Dt)cos(8t)].
In the last trial, each trigonometric function needs both a constant coefficient and a coefficient multiplying t. Differentiating t creates a constant term. In all three cases, the capital letters are unknown constants, and the trial may still need an extra factor if it overlaps the complementary solution.
Splitting a sum of forcing terms
Linearity lets us find particular solutions in pieces. For the same operator L[y]=ay′′+by′+cy, suppose
L[yp,1]=g1,L[yp,2]=g2.
The subscripts label two particular solutions, one for each forcing term. Their sum satisfies
L[yp,1+yp,2]=g1+g2.
This does not say that an arbitrary sum of solutions keeps the same forcing: the forcing terms add too.
For example, consider
y′′−3y′−4y=3e2t+2sint.
The previous two examples already did the coefficient matching. Add their particular solutions:
yp(t)=−21e2t−175sint+173cost.
The complementary solution is unchanged, so the general solution is
y(t)=C1e4t+C2e−t−21e2t−175sint+173cost.
Resonance in undetermined coefficients
What if the trial is already a homogeneous solution? The differential operator sends it to zero for every choice of coefficient. No coefficient matching can make that trial produce a nonzero forcing. This overlap is called resonance in the method of undetermined coefficients.
Example: a simple characteristic root
Solve
y′′−y=7et.
The starting trial yp=Aet fails:
yp′′−yp=Aet−Aet=0=7et.
The failure is in the trial, not in the existence of a solution. The associated homogeneous equation is y′′−y=0, whose characteristic equation is
r2−1=(r−1)(r+1)=0.
Thus
yc(t)=C1e−t+C2et.
The function et is already in this family. Multiply the trial by t to get a different function:
yp(t)yp′(t)yp′′(t)=Atet,=A(1+t)et,=A(2+t)et.
Now the tet terms cancel, but a nonzero exponential remains:
yp′′−yp=2Aet=7et.
Therefore A=7/2, so
yp(t)=27tet.
Adding the complementary solution gives
y(t)=C1e−t+C2et+27tet.
Example: a repeated characteristic root
One factor of t is not always enough. Consider
y′′−2y′+y=7et.
The characteristic equation is
r2−2r+1=(r−1)2=0,
so 1 is a double root and
yc(t)=(C1+C2t)et.
Both Aet and Atet are homogeneous solutions. Each makes the left-hand side zero. The first trial that avoids those two functions is
Both resonance examples are valid for all real t. Neither has initial conditions, so the two complementary constants remain arbitrary.
The trial-form rule
The power of t is determined by the multiplicity of a characteristic root: the number of times that root occurs in the characteristic polynomial. A value that is not a root has multiplicity zero.
Let Pn(t) be a known polynomial of degree n. Let Qn(t) and Rn(t) be polynomials with separate unknown coefficients for every power from tn down to the constant term. For example,
Qn(t)=Antn+An−1tn−1+⋯+A0.
The symbols α and β below are known real constants from the forcing. Use β=0 in the trigonometric row. The exponent s is the multiplicity of the root listed in the last column. For ay′′+by′+cy=g(t) with constant coefficients and a=0:
Forcing component
Trial particular solution
Root whose multiplicity is s
Pn(t)
tsQn(t)
0
Pn(t)eαt
tseαtQn(t)
α
Pn(t)eαtcos(βt) or Pn(t)eαtsin(βt)
tseαt[Qn(t)cos(βt)+Rn(t)sin(βt)]
α+iβ
The exponent s is the smallest nonnegative integer that removes overlap with the homogeneous solution space. In a second-order equation it is 0, 1, or 2; a nonreal root of a real quadratic can only be simple. Multiply the whole trial by ts, not just one of its terms.
This recovers both examples: the root 1 is simple for r2−1, so use tet; it is double for (r−1)2, so use t2et. For a sum of forcing components, choose the appropriate trial for each component and add the resulting particular solutions.
Variation of parameters
Undetermined coefficients works by recognizing a finite family of functions that stays closed under differentiation. Variation of parameters takes a different approach: start with two known homogeneous solutions and replace their constant multipliers with unknown functions. This works for more general forcing terms and for variable coefficients, provided we know a fundamental set for the homogeneous equation.
Consider the normalized equation
y′′+p(t)y′+q(t)y=g(t),
where p, q, and g are continuous on an open interval I. Let {y1,y2} be a fundamental set for the associated homogeneous equation on I. Write its Wronskian as
W(t)=y1(t)y2′(t)−y1′(t)y2(t)=0,t∈I.
Normalization matters here. If the original equation is a2(t)y′′+a1(t)y′+a0(t)y=h(t), divide by a2(t) on an interval where it is nonzero. The forcing used in this method is g=h/a2, not the original h.
Choosing the two unknown functions
Keep the known functions y1 and y2, but replace their constant multipliers with unknown functions u1 and u2. Look for a particular solution of the form
yp(t)=u1(t)y1(t)+u2(t)y2(t).
The product rule gives
yp′=u1′y1+u1y1′+u2′y2+u2y2′.
We have introduced two unknown functions to construct one solution. Use that freedom to impose an auxiliary condition that cancels the first and third terms:
y1u1′+y2u2′=0.
This is a condition we choose for the construction, not an identity that holds for arbitrary u1,u2. It leaves
yp′=u1y1′+u2y2′,
so differentiating again gives
yp′′=u1′y1′+u1y1′′+u2′y2′+u2y2′′.
The benefit is that no second derivatives of u1 or u2 appear. Put these expressions into the nonhomogeneous equation and group the terms multiplying each unknown function:
Both parentheses vanish because y1 and y2 solve the homogeneous equation. To produce the required forcing, the remaining terms must satisfy
y1′u1′+y2′u2′=g(t).
Solving the two conditions
Together, the auxiliary condition and the ODE give a linear system for the derivatives u1′ and u2′:
(y1y1′y2y2′)(u1′u2′)=(0g).
All functions in this system are evaluated at the same t. The determinant of its coefficient matrix is W(t), which is nonzero on I. Its inverse is therefore
(y1y1′y2y2′)−1=W(t)1(y2′−y1′−y2y1).
Multiplying by the column with entries 0 and g gives
u1′=−Wy2g,u2′=Wy1g.
The minus sign in the first formula comes from the upper-right entry of the inverse matrix. Keep the Wronskian in the same order, W[y1,y2], in both formulas.
Integrate to find one choice of the two functions:
Why can we omit the integration constants? Adding constants k1,k2 to u1,u2 adds only k1y1+k2y2 to yp. Those terms are already included in the complementary solution. Choose any antiderivatives on I to obtain one particular solution.
The general solution
Putting u1 and u2 back into yp=u1y1+u2y2 gives
where C1,C2∈R. If initial conditions are given, apply them to this full solution. Variation of parameters supplies the integrals without guessing a trial family, though those integrals need not have elementary antiderivatives.
We can also choose a fixed t0∈I as the lower limit of both integrals and combine them:
Here s is just the integration variable; t is the time at which we want the answer. This form gives yp(t0)=yp′(t0)=0. It is still a valid particular solution when the integral cannot be simplified further.
Example: recovering the resonant exponential
Return to y′′−y=7et, now using variation of parameters rather than a modified trial. Choose the ordered pair
Multiplying by the corresponding homogeneous solutions gives
yp=u1y1+u2y2=27tet−47et.
The last term is itself homogeneous. Absorb it into the arbitrary coefficient of et to obtain
y(t)=C1et+C2e−t+27tet,t∈R.
This is the same family found by undetermined coefficients. Variation of parameters produces the needed factor of t through integration, without requiring us to guess it.
Example: tangent forcing
Now consider an input outside the usual undetermined-coefficients families:
y′′+y=tant,−2π<t<2π.
The endpoints are excluded because tant is undefined there. On this open interval, the coefficients and forcing are continuous. The homogeneous equation has roots ±i, so choose
y1=sint,y2=cost,W=sint(−sint)−cos2t=−1.
Keep this order when applying the formulas. The first integral simplifies immediately:
Thus the general solution on the stated interval is
y(t)=C1sint+C2cost−costln∣sect+tant∣.
For a direct check, let H(t)=ln∣sect+tant∣. Since H′=sect,
yp′=sintH−1,yp′′=costH+tant,
and yp′′+yp=tant, as required.
Choosing a particular-solution method
Use undetermined coefficients when the coefficients are constant and the forcing is built from polynomials, exponentials, sine, and cosine. Check for overlap with the homogeneous solutions and multiply the whole trial by the required power of t.
Use variation of parameters for more general forcing or variable coefficients when a fundamental homogeneous pair is known. It does not find that pair for us, and its integrals may need to remain unevaluated.