4.10e - Second order non-homogeneous equations

4.10e - Second order non-homogeneous equations

Solve second order equations with a polynomial, exponential or trigonometric forcing term. You will choose a particular integral, combine it with the complementary function, and recognise when a familiar-looking trial must change because it already belongs to the complementary function.

Polynomial forcing

How can you solve y′′+3y′+2y=6x+5y''+3y'+2y=6x+5 when the right-hand side is no longer zero? The extra term does not destroy the homogeneous solution: it asks you to find one extra piece.

You already know

For y′′+3y′+2y=0y''+3y'+2y=0, the auxiliary equation is (m+1)(m+2)=0(m+1)(m+2)=0, giving y=Ae−x+Be−2xy=Ae^{-x}+Be^{-2x}. Two independent conditions determine the two arbitrary constants.

Try y=3x−2y=3x-2. Its derivatives are 33 and 00, so 0+9+2(3x−2)=6x+50+9+2(3x-2)=6x+5. Adding either homogeneous exponential does not change that right-hand side, because its contribution to the left-hand side is zero.

Complementary function and particular integral

The complementary function, yCFy_{\mathrm{CF}}, is the general solution of the associated homogeneous equation. A particular integral, yPIy_{\mathrm{PI}}, is any one solution of the non-homogeneous equation, with no arbitrary constants needed. It is a function, rather than an instruction to integrate. It is not yet the particular solution selected by initial conditions.

Linearity explains why the two pieces fit. If L[y]=y′′+ay′+byL[y]=y''+ay'+by, then L[yCF+yPI]=0+f(x)L[y_{\mathrm{CF}}+y_{\mathrm{PI}}]=0+f(x). Conversely, subtracting one particular integral from any solution leaves a homogeneous solution.

General solution with a forcing term

For constants aa and bb, if L[yCF]=0L[y_{\mathrm{CF}}]=0 and L[yPI]=f(x)L[y_{\mathrm{PI}}]=f(x), then

y=yCF+yPIy=y_{\mathrm{CF}}+y_{\mathrm{PI}}

is the general solution of y′′+ay′+by=f(x)y''+ay'+by=f(x). Find constants from conditions only after adding both pieces.
Not in the formula booklet: learn it.

For a polynomial forcing term, start with a polynomial of the same degree, including all lower powers. Differentiation mixes the lower coefficients, so a missing term on the right does not usually mean its trial coefficient is zero.

Worked example 1: a linear forcing term

Question. Find the general solution of y′′+3y′+2y=6x+5y''+3y'+2y=6x+5.

Plan. Find the complementary function, then substitute yPI=px+qy_{\mathrm{PI}}=px+q and compare coefficients.

m2+3m+2=(m+1)(m+2)=0auxiliary equationyCF=Ae−x+Be−2xtwo distinct rootsyPI′=p,yPI′′=0differentiate the trial3p+2(px+q)=6x+5substitute2p=6,3p+2q=5compare coefficientsp=3,q=−2solve\begin{aligned} m^2+3m+2&=(m+1)(m+2)=0 && \text{auxiliary equation}\\ y_{\mathrm{CF}}&=Ae^{-x}+Be^{-2x} && \text{two distinct roots}\\ y_{\mathrm{PI}}'&=p,\qquad y_{\mathrm{PI}}''=0 && \text{differentiate the trial}\\ 3p+2(px+q)&=6x+5 && \text{substitute}\\ 2p=6,\qquad 3p+2q&=5 && \text{compare coefficients}\\ p=3,\qquad q&=-2 && \text{solve} \end{aligned}

Why this trial? A linear function produces a linear expression on the left, and the constant qq absorbs the extra constant from differentiation.

Answer. y=Ae−x+Be−2x+3x−2y=Ae^{-x}+Be^{-2x}+3x-2.

Check. The polynomial contributes 0+9+6x−4=6x+50+9+6x-4=6x+5; each exponential contributes zero.

Change just the degree of the forcing polynomial: the next trial needs a quadratic term as well as its linear and constant terms.

Worked example 2: a quadratic forcing term

Question. Find the general solution of y′′+3y′+2y=6x2+5y''+3y'+2y=6x^2+5.

Plan. Keep the same complementary function and substitute yPI=px2+qx+ry_{\mathrm{PI}}=px^2+qx+r.

yPI′=2px+q,yPI′′=2pdifferentiate2p+3(2px+q)+2(px2+qx+r)=6x2+5substitute2p=6,6p+2q=0,2p+3q+2r=5compare powersp=3,q=−9,r=13solve in order\begin{aligned} y_{\mathrm{PI}}'&=2px+q,\qquad y_{\mathrm{PI}}''=2p && \text{differentiate}\\ 2p+3(2px+q)+2(px^2+qx+r)&=6x^2+5 && \text{substitute}\\ 2p=6,\quad 6p+2q=0,\quad 2p+3q+2r&=5 && \text{compare powers}\\ p=3,\qquad q=-9,\qquad r&=13 && \text{solve in order} \end{aligned}

Why keep qxqx when the forcing has no linear term? The derivative of px2px^2 produces one; qxqx is needed to cancel it.

Answer. y=Ae−x+Be−2x+3x2−9x+13y=Ae^{-x}+Be^{-2x}+3x^2-9x+13.

Check. The polynomial contributes 6+18x−27+6x2−18x+26=6x2+56+18x-27+6x^2-18x+26=6x^2+5.

A particular integral is often simple; the complete answer still needs both arbitrary constants.

Watch out

Wrong: y=3x2+52y=3x^2+\tfrac52 because the forcing has no xx term. Differentiation creates 18x18x in the left-hand side. Right: include qxqx, then compare coefficients to find it.

Now change the constant in the forcing, leaving the method and the other coefficients unchanged.

Exponential forcing

An exponential keeps its shape when differentiated, making it a natural trial for an exponential forcing term.

Exponential trial

For y′′+ay′+by=Cekxy''+ay'+by=Ce^{kx}, first try yPI=Kekxy_{\mathrm{PI}}=Ke^{kx}. If k2+ak+b≠0k^2+ak+b\ne0, then

K=Ck2+ak+bK=\frac{C}{k^2+ak+b}

This is a substitution result, not a rule to use when the denominator is zero.
Not in the formula booklet: learn it.

The auxiliary polynomial appears again because each differentiation multiplies the trial by kk. Keep the substitution visible when detailed reasoning is requested.

Worked example 3: an exponential particular integral

Question. Find the general solution of y′′+3y′+2y=12e2xy''+3y'+2y=12e^{2x}.

Plan. Add a multiple of e2xe^{2x} to the familiar complementary function.

yPI=Ke2xmatch the forcingyPI′=2Ke2x,yPI′′=4Ke2xdifferentiate(4+6+2)Ke2x=12e2xsubstituteK=1divide by the non-zero exponential\begin{aligned} y_{\mathrm{PI}}&=Ke^{2x} && \text{match the forcing}\\ y_{\mathrm{PI}}'&=2Ke^{2x},\qquad y_{\mathrm{PI}}''=4Ke^{2x} && \text{differentiate}\\ (4+6+2)Ke^{2x}&=12e^{2x} && \text{substitute}\\ K&=1 && \text{divide by the non-zero exponential} \end{aligned}

Why this step? No new function is created by differentiation, so only one unknown coefficient is needed.

Answer. y=Ae−x+Be−2x+e2xy=Ae^{-x}+Be^{-2x}+e^{2x}.

Check. L[e2x]=(4+6+2)e2x=12e2xL[e^{2x}]=(4+6+2)e^{2x}=12e^{2x}.

Change only the exponent in the forcing. The coefficient changes because the first and second derivatives now multiply by different numbers.

Worked example 4: a different exponent

Question. Find the general solution of y′′+3y′+2y=12e3xy''+3y'+2y=12e^{3x}.

Plan. Substitute yPI=Ke3xy_{\mathrm{PI}}=Ke^{3x}, keeping the complementary function unchanged.

yPI′=3Ke3x,yPI′′=9Ke3xdifferentiate(9+9+2)Ke3x=12e3xsubstituteK=35compare coefficients\begin{aligned} y_{\mathrm{PI}}'&=3Ke^{3x},\qquad y_{\mathrm{PI}}''=9Ke^{3x} && \text{differentiate}\\ (9+9+2)Ke^{3x}&=12e^{3x} && \text{substitute}\\ K&=\frac35 && \text{compare coefficients} \end{aligned}

Why divide by e3xe^{3x}? It is positive for every real xx, so the division loses no solutions.

Answer. y=Ae−x+Be−2x+35e3xy=Ae^{-x}+Be^{-2x}+\tfrac35e^{3x}.

Check. 20×35=1220\times\tfrac35=12, as required.

A zero denominator will signal a different trial, rather than an infinite answer; that case comes shortly.

Watch out

Wrong: differentiating Ke3xKe^{3x} twice gives 3Ke3x3Ke^{3x}. Right: the second derivative is 9Ke3x9Ke^{3x}; the chain-rule factor appears each time.

One further change of exponent tests the same substitution without repeating the full complementary-function calculation.

Trigonometric forcing

A cosine forcing term usually needs both cosine and sine in the trial: the first derivative swaps one into the other.

Trigonometric trial

For a forcing term Ccos⁡kx+Dsin⁡kxC\cos kx+D\sin kx, with k≠0k\ne0, try

yPI=pcos⁡kx+qsin⁡kxy_{\mathrm{PI}}=p\cos kx+q\sin kx

provided this trial does not overlap the complementary function. Substitute both derivatives and compare the cosine and sine coefficients separately.
Not in the formula booklet: learn it.

Even if D=0D=0, keep qq initially: a first-derivative term can force it to be non-zero.

Worked example 5: cosine forcing

Question. Find the general solution of y′′+3y′+2y=10cos⁡xy''+3y'+2y=10\cos x.

Plan. Use both trigonometric functions in the particular integral and add the complementary function.

yPI=pcos⁡x+qsin⁡xtrialyPI′=−psin⁡x+qcos⁡xdifferentiateyPI′′=−pcos⁡x−qsin⁡xdifferentiate again(p+3q)cos⁡x+(q−3p)sin⁡x=10cos⁡xsubstitute and collectp+3q=10,q−3p=0compare coefficientsp=1,q=3solve\begin{aligned} y_{\mathrm{PI}}&=p\cos x+q\sin x && \text{trial}\\ y_{\mathrm{PI}}'&=-p\sin x+q\cos x && \text{differentiate}\\ y_{\mathrm{PI}}''&=-p\cos x-q\sin x && \text{differentiate again}\\ (p+3q)\cos x+(q-3p)\sin x&=10\cos x && \text{substitute and collect}\\ p+3q=10,\qquad q-3p&=0 && \text{compare coefficients}\\ p=1,\qquad q&=3 && \text{solve} \end{aligned}

Why include sine? The 3y′3y' term produces a sine term from cosine, and the extra trial term cancels it.

Answer. y=Ae−x+Be−2x+cos⁡x+3sin⁡xy=Ae^{-x}+Be^{-2x}+\cos x+3\sin x.

Check. The cosine coefficient is 1+9=101+9=10; the sine coefficient is 3−3=03-3=0.

Change only the forcing from cosine to sine, at the same frequency. Keep the trial shape and change the two coefficient equations.

Worked example 6: sine forcing

Question. Find the general solution of y′′+3y′+2y=10sin⁡xy''+3y'+2y=10\sin x.

Plan. Repeat the trial, putting zero on the cosine side and ten on the sine side.

yPI=pcos⁡x+qsin⁡xtrialyPI′=−psin⁡x+qcos⁡x,yPI′′=−pcos⁡x−qsin⁡xdifferentiatep+3q=0,q−3p=10substitute and comparep=−3,q=1solve\begin{aligned} y_{\mathrm{PI}}&=p\cos x+q\sin x && \text{trial}\\ y_{\mathrm{PI}}'&=-p\sin x+q\cos x,\quad y_{\mathrm{PI}}''=-p\cos x-q\sin x && \text{differentiate}\\ p+3q=0,\qquad q-3p&=10 && \text{substitute and compare}\\ p=-3,\qquad q&=1 && \text{solve} \end{aligned}

Why compare with zero as well? The absence of cosine on the right is a coefficient condition, not permission to omit cosine from the trial.

Answer. y=Ae−x+Be−2x−3cos⁡x+sin⁡xy=Ae^{-x}+Be^{-2x}-3\cos x+\sin x.

Check. −3+3=0-3+3=0 and 1−3(−3)=101-3(-3)=10.

The coefficient comparison should be an identity in xx, rather than an equation checked at just one convenient value.

Watch out

Wrong: use only psin⁡xp\sin x because the forcing is a sine. Right: begin with pcos⁡x+qsin⁡xp\cos x+q\sin x; substitution decides whether either coefficient vanishes.

Now change the frequency while keeping the forcing as a sine.

When the trial overlaps the complementary function

If e−xe^{-x} already belongs to the complementary function, substituting Ke−xKe^{-x} gives zero for every KK. It cannot produce a non-zero forcing term. Multiplying the trial by xx gives it a new shape.

Repairing an overlapping trial

If the usual trial is a homogeneous solution, multiply it by xx, repeating until it no longer overlaps the complementary function. For forcing CekxCe^{kx}, use KxekxKxe^{kx} when kk is a simple auxiliary root, and Kx2ekxKx^2e^{kx} when it is a repeated root.
Not in the formula booklet: learn it.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account