Pc13, Pc14 - Second order non-homogeneous equations

Pc13, Pc14 - Second order non-homogeneous equations

A non-zero right side adds a forcing term to a second-order equation. Pc13 combines the homogeneous solution with one particular integral; Pc14 finds that integral for polynomial, exponential and trigonometric forcing, including cases where the first trial overlaps the complementary function. You will choose a trial, substitute it, and apply conditions to the complete solution.

Combining the complementary function and a particular integral

Why does the apparently sensible trial y=Ce2xy=Ce^{2x} fail completely for y′′−3y′+2y=3e2xy''-3y'+2y=3e^{2x}?

Its shape matches the right side, but it is already a homogeneous solution: substituting it on the left gives (4−6+2)Ce2x=0(4-6+2)Ce^{2x}=0, whatever CC is. No choice of constant can turn zero into 3e2x3e^{2x}. Part 5 repairs this trial by adding a factor of xx.

You already know

Solve the zero-right-side equation using its auxiliary roots. Distinct roots give two exponentials, a repeated root gives (A+Bx)erx(A+Bx)e^{rx}, and conjugate roots give a real exponential times a sine–cosine combination. This is the complementary function.

The forcing needs one additional solution. Linearity then lets you add it to every homogeneous solution.

Particular integral

A particular integral, written ypy_p, is one chosen solution of the non-homogeneous equation y′′+ay′+by=f(x)y''+ay'+by=f(x), without new arbitrary constants. The complementary function ycy_c solves yc′′+ayc′+byc=0y_c''+ay_c'+by_c=0. A particular integral is used to build the general solution; it need not itself satisfy the problem's initial conditions.

For example, y′′+y=1y''+y=1 has particular integral 11 and general solution Acos⁡x+Bsin⁡x+1A\cos x+B\sin x+1. The conditions y(0)=0y(0)=0, y′(0)=0y'(0)=0 select 1−cos⁡x1-\cos x, not the particular integral 11 by itself.

Complementary function plus particular integral

For constant real a,ba,b, the general solution of

y′′+ay′+by=f(x)y''+ay'+by=f(x)

is

y=yc+ypy=y_c+y_p

where ycy_c contains the two arbitrary constants and ypy_p is any one particular integral. Apply any supplied conditions to this complete sum.

Not in the formula booklet: learn it.

The reason is direct: the left side applied to yc+ypy_c+y_p is the homogeneous contribution 00 plus the forced contribution f(x)f(x). Different choices of particular integral can differ by a homogeneous term, which the arbitrary constants already cover.

When the trial does not overlap the complementary function, use these starting shapes:

ForcingTrial particular integral
A polynomial of degree nnA full polynomial of degree nn, including lower powers
KeλxKe^{\lambda x}CeλxCe^{\lambda x}
Ucos⁡ωx+Vsin⁡ωxU\cos\omega x+V\sin\omega xCcos⁡ωx+Dsin⁡ωxC\cos\omega x+D\sin\omega x

These trial forms are not in the formula booklet. Their coefficients are unknowns to determine, not arbitrary constants to leave in the final answer. Overlap requires a modification, taught in Part 5.

Key idea

The complementary function supplies the freedom; the particular integral supplies the forcing. Initial conditions belong to their sum.

The following check targets the most common error when using that sum.

Matching a polynomial forcing term

Use every power down to the constant term in a polynomial trial, because differentiation mixes those powers on the left.

For the next two examples, the homogeneous equation is y′′−3y′+2y=0y''-3y'+2y=0. Its roots are 11 and 22, so yc=Aex+Be2xy_c=Ae^x+Be^{2x}. No polynomial term is in that complementary function, so the usual polynomial trial is suitable.

Worked example 1: linear forcing and initial conditions

Question. Solve y′′−3y′+2y=4x+2y''-3y'+2y=4x+2, given y(0)=0y(0)=0, y′(0)=1y'(0)=1.

Plan. Find a linear particular integral, add the complementary function, then apply both conditions to the sum.

Try yp=ax+by_p=ax+b, so yp′=ay_p'=a and yp′′=0y_p''=0. Substitution gives

0−3a+2(ax+b)=4x+2substitute the trial2a=4,2b−3a=2match coefficientsa=2,b=4solvey=Aex+Be2x+2x+4general solutiony′=Aex+2Be2x+2differentiate the whole sum\begin{aligned} 0-3a+2(ax+b)&=4x+2 && \text{substitute the trial} \\ 2a&=4,\quad2b-3a=2 && \text{match coefficients} \\ a&=2,\quad b=4 && \text{solve} \\ y&=Ae^x+Be^{2x}+2x+4 && \text{general solution} \\ y'&=Ae^x+2Be^{2x}+2 && \text{differentiate the whole sum} \end{aligned}

Why this step? The derivative term contributes a constant, so the trial needs a constant even though the forcing's leading term is linear.

The conditions give

A+B=−4y(0)=0A+2B=−1y′(0)=1B=3,A=−7solve simultaneously\begin{aligned} A+B&=-4 && y(0)=0 \\ A+2B&=-1 && y'(0)=1 \\ B&=3,\quad A=-7 && \text{solve simultaneously} \end{aligned}

Answer. y=−7ex+3e2x+2x+4y=-7e^x+3e^{2x}+2x+4.

Check. The initial values are −7+3+4=0-7+3+4=0 and −7+6+2=1-7+6+2=1. The polynomial contributes −6+2(2x+4)=4x+2-6+2(2x+4)=4x+2; the complementary function contributes zero.

The next example changes only the leading forcing term from 4x4x to 4x24x^2. Keep the same differential operator and conditions, but include all three polynomial coefficients.

Worked example 2: quadratic forcing

Question. Solve y′′−3y′+2y=4x2+2y''-3y'+2y=4x^2+2, given y(0)=0y(0)=0, y′(0)=1y'(0)=1.

Plan. Use a full quadratic trial, match all powers, then apply the unchanged conditions to the new general solution.

Try yp=ax2+bx+cy_p=ax^2+bx+c, so yp′=2ax+by_p'=2ax+b, yp′′=2ay_p''=2a. Then

2a−3(2ax+b)+2(ax2+bx+c)=4x2+2substitute2a=4x2 terms2b−6a=0x terms2c−3b+2a=2constant termsa=2,b=6,c=8solve in order\begin{aligned} 2a-3(2ax+b)+2(ax^2+bx+c)&=4x^2+2 && \text{substitute} \\ 2a&=4 && x^2\text{ terms} \\ 2b-6a&=0 && x\text{ terms} \\ 2c-3b+2a&=2 && \text{constant terms} \\ a&=2,\quad b=6,\quad c=8 && \text{solve in order} \end{aligned}

Why this step? The forcing has no xx-term, so the corresponding coefficient equation is zero, not absent. It determines bb, which is needed to cancel the trial's derivative contribution.

Thus y=Aex+Be2x+2x2+6x+8y=Ae^x+Be^{2x}+2x^2+6x+8, and

A+B=−8y(0)=0A+2B=−5y′(0)=1B=3,A=−11solve\begin{aligned} A+B&=-8 && y(0)=0 \\ A+2B&=-5 && y'(0)=1 \\ B&=3,\quad A=-11 && \text{solve} \end{aligned}

Answer. y=−11ex+3e2x+2x2+6x+8y=-11e^x+3e^{2x}+2x^2+6x+8.

Check. The initial values are −11+3+8=0-11+3+8=0 and −11+6+6=1-11+6+6=1. Substitution of the polynomial gives 4x2+(12−12)x+(16−18+4)=4x2+24x^2+(12-12)x+(16-18+4)=4x^2+2.

The same coefficient-matching idea handles higher-degree polynomial forcing. If the complementary function contains polynomial terms because zero is an auxiliary root, modify the trial as in Part 5.

Watch out

Wrong: use yp=ax2+cy_p=ax^2+c because the right side has no xx-term. Right: start with ax2+bx+cax^2+bx+c; derivatives can create an xx-term that needs cancelling.

Find only the particular integral in the next question; no initial conditions are being imposed.

Matching an exponential forcing term

Differentiating an exponential preserves its shape, so an unknown multiple of that exponential is an efficient first trial.

Check the complementary function first. For y′′−3y′+2yy''-3y'+2y, the exponent values 11 and 22 already occur in it; the following two examples use exponents that do not.

Worked example 3: a non-overlapping positive exponent

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

Plan. Add a trial Ce3xCe^{3x} to the known complementary function and determine CC by substitution.

yc=Aex+Be2xauxiliary roots 1,2yp=Ce3x,yp′=3Ce3x,yp′′=9Ce3xtrial and derivatives(9−9+2)Ce3x=3e3xsubstitute2C=3  ⟹  C=32match the exponential\begin{aligned} y_c&=Ae^x+Be^{2x} && \text{auxiliary roots }1,2 \\ y_p&=Ce^{3x},\quad y_p'=3Ce^{3x},\quad y_p''=9Ce^{3x} && \text{trial and derivatives} \\ (9-9+2)Ce^{3x}&=3e^{3x} && \text{substitute} \\ 2C&=3\implies C=\frac32 && \text{match the exponential} \end{aligned}

Why this step? All three trial terms contain the same non-zero exponential, leaving one ordinary equation for its coefficient.

Answer. y=Aex+Be2x+32e3xy=Ae^x+Be^{2x}+\tfrac32e^{3x}.

Check. The particular integral contributes 2(3/2)e3x=3e3x2(3/2)e^{3x}=3e^{3x}; the complementary function contributes zero.

The next example changes only the forcing exponent, from 33 to −1-1. Keep the sign of that exponent in both derivatives.

Worked example 4: a non-overlapping negative exponent

Question. Find the general solution of y′′−3y′+2y=3e−xy''-3y'+2y=3e^{-x}.

Plan. Use Ce−xCe^{-x}, differentiate twice and match its coefficient.

yc=Aex+Be2xsame homogeneous equationyp=Ce−x,yp′=−Ce−x,yp′′=Ce−xretain signs(1+3+2)Ce−x=3e−xsubstitute6C=3  ⟹  C=12solve\begin{aligned} y_c&=Ae^x+Be^{2x} && \text{same homogeneous equation} \\ y_p&=Ce^{-x},\quad y_p'=-Ce^{-x},\quad y_p''=Ce^{-x} && \text{retain signs} \\ (1+3+2)Ce^{-x}&=3e^{-x} && \text{substitute} \\ 6C&=3\implies C=\frac12 && \text{solve} \end{aligned}

Why this step? The first derivative is negative, and the equation subtracts three times it. That contribution is positive, giving 1+3+21+3+2, not 1−3+21-3+2.

Answer. y=Aex+Be2x+12e−xy=Ae^x+Be^{2x}+\tfrac12e^{-x}.

Check. The exponent −1-1 is not an auxiliary root; substituting it into r2−3r+2r^2-3r+2 gives 66, the same non-zero multiplier as above.

These trial and coefficient steps are not supplied in the formula booklet. The original equation tells you the forcing shape; the auxiliary roots tell you whether the trial overlaps.

Watch out

Wrong: attach a factor xx to every exponential trial. Right: use CeλxCe^{\lambda x} when λ\lambda is not an auxiliary root. Unnecessary factors add terms that do not match the forcing.

The next equation has a different forcing coefficient and exponent, still outside the complementary function.

Continue this lesson.

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

Create free account