Xs8, Xs9 - Second order non-homogeneous recurrences

Xs8, Xs9 - Second order non-homogeneous recurrences

Combine a homogeneous family with an appropriate trial solution. Handle polynomial and exponential forcing, resolve overlap, and use complete solutions to justify limits, model validity and the behaviour of associated sequences.

The complete solution has two ingredients

Can a sequence grow without bound while the ratio of consecutive terms settles to a finite number?

Yes. A recurrence's solution and an associated sequence can have very different limits. First we need a dependable way to obtain the complete solution.

You already know

The previous lesson solved homogeneous second order recurrences using distinct, repeated or complex auxiliary roots. First order non-homogeneous solutions combined a homogeneous family with one trial solution, and initial conditions applied to their sum.

The same addition principle works here. Let L[u]n=αun+2+βun+1+γun\mathcal L[u]_n=\alpha u_{n+2}+\beta u_{n+1}+\gamma u_n, where the coefficients are constant. This notation is only a short name for the displayed linear expression. If L[h]n=0\mathcal L[h]_n=0 and L[p]n=f(n)\mathcal L[p]_n=f(n), then L[h+p]n=f(n)\mathcal L[h+p]_n=f(n).

Homogeneous family plus trial solution

For L[u]n=f(n)\mathcal L[u]_n=f(n),

un=hn+pn,u_n=h_n+p_n,

where hnh_n is the full two-constant homogeneous family and pnp_n is one trial solution for the forcing. Try a constant for constant forcing and An+BAn+B for linear forcing, provided the trial does not overlap the homogeneous family.

Not in the formula booklet: learn it.

Keep the equation in its supplied form. An index shift would change the forcing too; it is usually unnecessary.

Worked example 1: constant forcing

Question. Solve un+2−5un+1+6un=4u_{n+2}-5u_{n+1}+6u_n=4, with u0=6u_0=6, u1=13u_1=13.

Plan. Find the homogeneous roots, add a constant trial and then use both conditions.

r2−5r+6=(r−2)(r−3)=0homogeneous equationhn=A2n+B3ntwo-constant familyK−5K+6K=4  ⟹  K=2constant trialun=A2n+B3n+2general solutionA+B=4,2A+3B=11apply conditions to the sumB=3,A=1solve\begin{aligned} r^2-5r+6&=(r-2)(r-3)=0 && \text{homogeneous equation}\\ h_n&=A2^n+B3^n && \text{two-constant family}\\ K-5K+6K&=4\implies K=2 && \text{constant trial}\\ u_n&=A2^n+B3^n+2 && \text{general solution}\\ A+B&=4,\quad2A+3B=11 && \text{apply conditions to the sum}\\ B&=3,\quad A=1 && \text{solve} \end{aligned}

Why this step? The trial contributes 22 to both initial values; ignoring it would select the wrong constants.

Answer. un=2n+3 3n+2u_n=2^n+3\,3^n+2.

Check. The initial values are 66 and 1313. The geometric terms have zero residual, while the constant gives 2−10+12=42-10+12=4.

Change only the forcing from 44 to 4n4n. Keep the homogeneous equation and both initial conditions.

Worked example 2: linear forcing

Question. Solve vn+2−5vn+1+6vn=4nv_{n+2}-5v_{n+1}+6v_n=4n, with v0=6v_0=6, v1=13v_1=13.

Plan. Try pn=an+bp_n=an+b, then add the same homogeneous family.

pn+2=a(n+2)+bshift by twoL[p]n=2an+(−3a+2b)substitute and collect2a=4,−3a+2b=0compare coefficientsa=2,b=3trial pn=2n+3vn=A2n+B3n+2n+3general solutionA+B=3,2A+3B=8initial conditionsB=2,A=1solve\begin{aligned} p_{n+2}&=a(n+2)+b && \text{shift by two}\\ \mathcal L[p]_n&=2an+(-3a+2b) && \text{substitute and collect}\\ 2a&=4,\quad-3a+2b=0 && \text{compare coefficients}\\ a&=2,\quad b=3 && \text{trial }p_n=2n+3\\ v_n&=A2^n+B3^n+2n+3 && \text{general solution}\\ A+B&=3,\quad2A+3B=8 && \text{initial conditions}\\ B&=2,\quad A=1 && \text{solve} \end{aligned}

Why this step? Shifting an+ban+b produces a constant contribution, so the trial needs bb even though 4n4n has no constant term.

Answer. vn=2n+2 3n+2n+3v_n=2^n+2\,3^n+2n+3.

Check. v0=6v_0=6, v1=13v_1=13, and L[2n+3]n=4n\mathcal L[2n+3]_n=4n.

“General solution” means both arbitrary homogeneous constants remain. “Particular solution” may refer to a trial solving the equation or to the sequence after conditions are imposed; write the full equality so the role is clear.

Watch out

Wrong: apply the initial values to hnh_n, then add pnp_n afterwards. Right: apply every condition to un=hn+pnu_n=h_n+p_n. The trial contributes to the starting terms.

Find the full family for a new linear forcing.

A quadratic needs all its coefficients

A missing term in the forcing is a coefficient of zero to match, not permission to omit that term from the trial. Shift first, expand next, then collect one power at a time.

Quadratic forcing

For quadratic f(n)f(n), first try

pn=an2+bn+c.p_n=an^2+bn+c.

If 11 is not an auxiliary root, this full quadratic trial is sufficient. The homogeneous roots may be distinct, repeated or complex: their family is still added in the appropriate form.

Not in the formula booklet: learn it.

The following forcing is only 2n22n^2, yet a non-zero trial constant will be essential.

Worked example 3: no constant in the forcing

Question. Solve un+2−5un+1+6un=2n2u_{n+2}-5u_{n+1}+6u_n=2n^2, with u0=8u_0=8, u1=17u_1=17.

Plan. Use the full quadratic trial and retain the original indexing.

pn+2=an2+(4a+b)n+(4a+2b+c)expand the shiftpn+1=an2+(2a+b)n+(a+b+c)other shiftL[p]n=2an2+(−6a+2b)n+(−a−3b+2c)collect2a=2,−6a+2b=0,−a−3b+2c=0comparea=1,b=3,c=5solveun=A2n+B3n+n2+3n+5general solutionA+B=3,2A+3B=8initial valuesA=1,B=2solve\begin{aligned} p_{n+2}&=an^2+(4a+b)n+(4a+2b+c) && \text{expand the shift}\\ p_{n+1}&=an^2+(2a+b)n+(a+b+c) && \text{other shift}\\ \mathcal L[p]_n&=2an^2+(-6a+2b)n+(-a-3b+2c) && \text{collect}\\ 2a&=2,\quad-6a+2b=0,\quad-a-3b+2c=0 && \text{compare}\\ a&=1,\quad b=3,\quad c=5 && \text{solve}\\ u_n&=A2^n+B3^n+n^2+3n+5 && \text{general solution}\\ A+B&=3,\quad2A+3B=8 && \text{initial values}\\ A&=1,\quad B=2 && \text{solve} \end{aligned}

Why this step? The shifts create lower powers. The trial constant 55 cancels the unwanted constant left by its quadratic and linear terms.

Answer. un=2n+2 3n+n2+3n+5u_n=2^n+2\,3^n+n^2+3n+5.

Check. The polynomial residual is 2n22n^2. The full expression gives u0=8u_0=8, u1=17u_1=17, as required.

Keep the forcing and initial values but change the homogeneous operator to un+2+unu_{n+2}+u_n. Its roots are now complex; the polynomial calculation remains entirely real.

Worked example 4: adding a trigonometric family

Question. Solve vn+2+vn=2n2v_{n+2}+v_n=2n^2, with v0=8v_0=8, v1=17v_1=17.

Plan. Find the complex-root homogeneous family, then determine the quadratic trial.

r2+1=0  ⟹  r=±imodulus 1, angle π/2hn=Acos⁡(nπ/2)+Bsin⁡(nπ/2)homogeneous familypn+2+pn=2an2+(4a+2b)n+(4a+2b+2c)full trial2a=2,4a+2b=0,4a+2b+2c=0comparea=1,b=−2,c=0solvevn=Acos⁡(nπ/2)+Bsin⁡(nπ/2)+n2−2ngeneral solutionA=8,B−1=17  ⟹  B=18initial values\begin{aligned} r^2+1&=0\implies r=\pm i && \text{modulus }1,\text{ angle }\pi/2\\ h_n&=A\cos(n\pi/2)+B\sin(n\pi/2) && \text{homogeneous family}\\ p_{n+2}+p_n&=2an^2+(4a+2b)n+(4a+2b+2c) && \text{full trial}\\ 2a&=2,\quad4a+2b=0,\quad4a+2b+2c=0 && \text{compare}\\ a&=1,\quad b=-2,\quad c=0 && \text{solve}\\ v_n&=A\cos(n\pi/2)+B\sin(n\pi/2)+n^2-2n && \text{general solution}\\ A&=8,\quad B-1=17\implies B=18 && \text{initial values} \end{aligned}

Why this step? The forcing determines the trial, while the homogeneous roots determine the complementary shapes. Neither replaces the other.

Answer. vn=8cos⁡(nπ/2)+18sin⁡(nπ/2)+n2−2nv_n=8\cos(n\pi/2)+18\sin(n\pi/2)+n^2-2n.

Check. The quadratic gives (n+2)2−2(n+2)+n2−2n=2n2(n+2)^2-2(n+2)+n^2-2n=2n^2; shifting either trigonometric term by two reverses its sign, so its residual is zero.

Here the final constant vanishes, but that follows from the coefficient equations. It could not safely have been assumed in advance.

Watch out

Wrong: omit the constant because the forcing has no constant. Right: retain an2+bn+can^2+bn+c, then compare all three coefficients. An index shift creates lower powers.

Use a complete trial with this new quadratic forcing.

When the root one gets in the way

A constant is 1n1^n. If 11 is an auxiliary root, a constant trial already belongs to the homogeneous family and has zero residual. If 11 is a repeated root, a linear trial also belongs to that family.

Polynomial overlap

For polynomial forcing of degree dd, start with a full polynomial of degree dd. Multiply it by nmn^m, where mm is the multiplicity of auxiliary root 11: use m=0m=0 if 11 is absent, m=1m=1 for a simple root and m=2m=2 for a repeated root.

Not in the formula booklet: learn it.

Only the trial changes. Keep the full homogeneous family as well.

Worked example 5: a simple root one

Question. Solve un+2−3un+1+2un=4u_{n+2}-3u_{n+1}+2u_n=4, u0=1u_0=1, u1=2u_1=2.

Plan. The roots are 1,21,2, so try KnKn for the constant forcing.

hn=A+B2nhomogeneous familyL[Kn]n=K((n+2)−3(n+1)+2n)substitute=−K=4  ⟹  K=−4matchun=A+B2n−4ngeneral solutionA+B=1,A+2B−4=2conditionsB=5,A=−4solve\begin{aligned} h_n&=A+B2^n && \text{homogeneous family}\\ \mathcal L[Kn]_n&=K\bigl((n+2)-3(n+1)+2n\bigr) && \text{substitute}\\ &=-K=4\implies K=-4 && \text{match}\\ u_n&=A+B2^n-4n && \text{general solution}\\ A+B&=1,\quad A+2B-4=2 && \text{conditions}\\ B&=5,\quad A=-4 && \text{solve} \end{aligned}

Why this step? A constant trial would give K−3K+2K=0K-3K+2K=0, regardless of KK.

Answer. un=5 2n−4n−4u_n=5\,2^n-4n-4.

Check. The formula gives u0=1u_0=1, u1=2u_1=2; the trial residual is −(−4)=4-(-4)=4.

Now make root 11 repeated, keeping the forcing and the initial values. The required extra factor changes from nn to n2n^2.

Worked example 6: a repeated root one

Question. Solve vn+2−2vn+1+vn=4v_{n+2}-2v_{n+1}+v_n=4, v0=1v_0=1, v1=2v_1=2.

Plan. Use A+BnA+Bn for the homogeneous family and Kn2Kn^2 for the forcing.

hn=A+Bn(r−1)2=0L[Kn2]n=K((n+2)2−2(n+1)2+n2)substitute=2K=4  ⟹  K=2second differencevn=A+Bn+2n2general solutionA=1,A+B+2=2  ⟹  B=−1conditions\begin{aligned} h_n&=A+Bn && (r-1)^2=0\\ \mathcal L[Kn^2]_n&=K\bigl((n+2)^2-2(n+1)^2+n^2\bigr) && \text{substitute}\\ &=2K=4\implies K=2 && \text{second difference}\\ v_n&=A+Bn+2n^2 && \text{general solution}\\ A&=1,\quad A+B+2=2\implies B=-1 && \text{conditions} \end{aligned}

Why this step? Both a constant and a linear expression have zero second difference. A quadratic is the first degree that can produce a non-zero constant.

Answer. vn=2n2−n+1v_n=2n^2-n+1.

Check. Its second difference is 44, and its first two terms are 1,21,2.

This explains a useful connection: constant second differences characterise quadratic sequences, just as constant first differences characterise arithmetic sequences.

Watch out

Wrong for a repeated root 11 and non-zero constant forcing: try KnKn. Right: try Kn2Kn^2, since every linear sequence already has zero second difference.

Keep the repeated root and change the forcing and initial values.

Match the base before the coefficient

For forcing dkndk^n, try KknKk^n unless kk is an auxiliary root. A simple matching root needs a factor nn; a repeated matching root needs n2n^2.

Exponential forcing

For non-zero kk, use

pn=Knmkn,p_n=Kn^mk^n,

where m=0,1,2m=0,1,2 is the multiplicity of kk as an auxiliary root. Substitute into the original recurrence to find KK, then add the homogeneous family and apply conditions.

Not in the formula booklet: learn it.

A repeated-root homogeneous family already contains both knk^n and nknnk^n. The trial must supply a third shape.

Worked example 7: no overlap

Question. Solve un+2−4un+1+4un=3nu_{n+2}-4u_{n+1}+4u_n=3^n, u0=u1=0u_0=u_1=0.

Plan. The auxiliary root is 22, repeated, but the forcing base is 33, so try K3nK3^n.

hn=(A+Bn)2nrepeated-root familyL[K3n]n=K3n(9−12+4)=K3nsubstituteK=1match 3nun=(A+Bn)2n+3ngeneral solutionA+1=0,2(A+B)+3=0conditionsA=−1,B=−12solve\begin{aligned} h_n&=(A+Bn)2^n && \text{repeated-root family}\\ \mathcal L[K3^n]_n&=K3^n(9-12+4)=K3^n && \text{substitute}\\ K&=1 && \text{match }3^n\\ u_n&=(A+Bn)2^n+3^n && \text{general solution}\\ A+1&=0,\quad2(A+B)+3=0 && \text{conditions}\\ A&=-1,\quad B=-\tfrac12 && \text{solve} \end{aligned}

Why this step? Repeated homogeneous roots do not force an extra nn into every trial; overlap with the forcing base is what matters.

Answer. un=3n−(1+12n)2nu_n=3^n-(1+\tfrac12n)2^n.

Check. Both starting values are zero, and the base-33 trial has residual 3n3^n.

Continue this lesson.

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

Create free account