D2 6.2 - Solving second-order recurrence relations

D2 6.2 - Solving second-order recurrence relations

A second-order relation remembers two previous terms. You will use its auxiliary equation, handle distinct and repeated roots, add particular solutions for forcing terms and apply two conditions, including conditions that control the signs of later terms.

Two roots give two independent components

How can two irrational powers combine to give an exact integer at every step?

The sequence 1,1,2,3,5,…1,1,2,3,5,\ldots, in which each new term is the sum of the previous two, has just such a formula. Its two irrational components cancel in precisely the way needed to obey the integer update rule.

You already know

A linear recurrence is solved by adding a complementary function and a particular solution, then applying the stated conditions. First-order auxiliary equations arise by trying rnr^n. Core Pure supplies quadratic equations, complex roots and de Moivre's theorem; no other Further Mathematics option is needed here.

For aun+2+bun+1+cun=0a u_{n+2}+b u_{n+1}+c u_n=0, substitute rnr^n and divide by rnr^n. This gives the auxiliary equation ar2+br+c=0ar^2+br+c=0. We consider genuine second-order constant-coefficient relations, with a,c≠0a,c\ne0; a missing trailing term reduces the order after shifting the index.

Distinct auxiliary roots

If ar2+br+c=0ar^2+br+c=0 has distinct roots r1,r2r_1,r_2, the complementary function is

un=Ar1n+Br2nu_n=Ar_1^n+Br_2^n

Here A,BA,B are arbitrary constants before two independent conditions are applied. Keep irrational roots exact. Not in the formula booklet: learn it.

If conditions are given at n=1,2n=1,2, substitute those indices. Do not automatically write A+B=u1A+B=u_1.

Worked example 1: an integer sequence from irrational roots

Question. Solve un+2=un+1+un, n≥1, u1=1, u2=1u_{n+2}=u_{n+1}+u_n,\ n\ge1,\ u_1=1,\ u_2=1.

Plan. Solve the auxiliary quadratic, then apply the two conditions at their actual indices.

r2−r−1=0auxiliary equationϕ=1+52,ψ=1−52un=Aϕn+BψnAϕ+Bψ=1,Aϕ2+Bψ2=1A+B=0ϕ2=ϕ+1, ψ2=ψ+1A(ϕ−ψ)=1  ⟹  A=15,B=−15\begin{aligned} r^2-r-1&=0 &&\text{auxiliary equation}\\ \phi&=\frac{1+\sqrt5}{2},\qquad\psi=\frac{1-\sqrt5}{2}\\ u_n&=A\phi^n+B\psi^n\\ A\phi+B\psi&=1,\qquad A\phi^2+B\psi^2=1\\ A+B&=0 &&\phi^2=\phi+1,\ \psi^2=\psi+1\\ A(\phi-\psi)&=1\implies A=\frac1{\sqrt5},\quad B=-\frac1{\sqrt5} \end{aligned}

Why this step? Subtracting the two condition equations uses the same quadratic identity that generated the roots.

Answer. un=(ϕn−ψn)/5u_n=(\phi^n-\psi^n)/\sqrt5.

Check. The recurrence and initial values generate integers, even though this exact expression uses irrational numbers. At n=5n=5, both methods give 55.

Worked example 2 changes only u2u_2, from 11 to 22.

Worked example 2: a changed second starting value

Question. Solve the same recurrence with u1=1, u2=2u_1=1,\ u_2=2.

Plan. Keep the roots and change the two equations for the constants.

Aϕ+Bψ=1,Aϕ2+Bψ2=2A+B=1subtract using the root identitiesA(ϕ−ψ)=1−ψ=ϕA=ϕ5,B=−ψ5un=ϕn+1−ψn+15\begin{aligned} A\phi+B\psi&=1,\qquad A\phi^2+B\psi^2=2\\ A+B&=1 &&\text{subtract using the root identities}\\ A(\phi-\psi)&=1-\psi=\phi\\ A&=\frac{\phi}{\sqrt5},\qquad B=-\frac{\psi}{\sqrt5}\\ u_n&=\frac{\phi^{n+1}-\psi^{n+1}}{\sqrt5} \end{aligned}

Why this step? Only the constants depend on the starting values; the update rule fixes the roots.

Answer. un=(ϕn+1−ψn+1)/5u_n=(\phi^{n+1}-\psi^{n+1})/\sqrt5.

Check. The next term is u3=3u_3=3, as required by 2+12+1.

Negative real roots are also valid. Their powers alternate in sign; whether that component dominates later matters in the final part.

Watch out

Wrong: use r2+r+1=0r^2+r+1=0, round the roots before taking powers, or treat u1u_1 as A+BA+B. Right: move all sequence terms to one side, preserve exact roots and substitute the stated indices.

Change only the second starting value again.

A repeated root needs a second kind of term

If the auxiliary equation has the same root twice, writing Arn+BrnAr^n+Br^n gives only one adjustable coefficient. Two starting conditions need two independent components.

Repeated auxiliary root

For a repeated non-zero root rr, use

un=(A+Bn)rnu_n=(A+Bn)r^n

Both rnr^n and nrnnr^n satisfy the homogeneous recurrence. Not in the formula booklet: learn it.

For a recurrence with auxiliary equation (m−r)2=0(m-r)^2=0, dividing unu_n by rnr^n leaves a sequence with zero second difference. Its first difference is constant, so it has the form A+BnA+Bn. This explains the extra nn.

Worked example 3: a repeated root

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

Plan. Identify the repeated root and fit both constants in (A+Bn)2n(A+Bn)2^n.

r2−4r+4=(r−2)2=0un=(A+Bn)2nu0=1  ⟹  A=1u1=4  ⟹  2(1+B)=4  ⟹  B=1\begin{aligned} r^2-4r+4&=(r-2)^2=0\\ u_n&=(A+Bn)2^n\\ u_0=1&\implies A=1\\ u_1=4&\implies2(1+B)=4\implies B=1 \end{aligned}

Why this step? The repeated-root term n2nn2^n supplies the independent component needed to fit the second condition.

Answer. un=(1+n)2nu_n=(1+n)2^n.

Check. The recurrence gives u2=4(4)−4(1)=12u_2=4(4)-4(1)=12, agreeing with 3(4)=123(4)=12.

Worked example 4 changes only u1u_1, from 44 to 22.

Worked example 4: the second component can vanish

Question. Solve the same recurrence with u0=1, u1=2u_0=1,\ u_1=2.

Plan. Retain the repeated-root form and refit its constants.

A=12(1+B)=2  ⟹  B=0un=2n\begin{aligned} A&=1\\ 2(1+B)&=2\implies B=0\\ u_n&=2^n \end{aligned}

Why this step? A coefficient may be zero after fitting conditions; that does not justify omitting its possible component beforehand.

Answer. un=2nu_n=2^n.

Check. The next value is 44, from both the recurrence and the formula.

Apply initial conditions after choosing the correct general form.

Watch out

Wrong: write A2n+B2nA2^n+B2^n and try to solve two conditions. Right: use (A+Bn)2n(A+Bn)2^n, whose two components are independent.

Change only the second condition again.

Write complex-root solutions in real form

Real recurrence coefficients can have conjugate complex auxiliary roots. Core Pure complex-number methods let us combine their powers into a real formula.

Conjugate-root real form

For roots r(cos⁡θ±isin⁡θ)r(\cos\theta\pm\mathrm i\sin\theta), with r>0r>0 and distinct conjugate roots, a real complementary function is

un=rn(Acos⁡(nθ)+Bsin⁡(nθ))u_n=r^n\bigl(A\cos(n\theta)+B\sin(n\theta)\bigr)

De Moivre's theorem explains how these two real components arise from the conjugate powers. This recurrence solution form is not separately supplied. Not in the formula booklet: learn it.

The powers can oscillate while all sequence values remain real. Do not throw away complex roots merely because the starting values are real.

Worked example 5: a real oscillating solution

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

Plan. Express the roots in modulus-argument form, then apply the two real conditions.

r2−2r+2=0  ⟹  r=1±i1±i=2 (cos⁡π4±isin⁡π4)un=(2)n(Acos⁡nπ4+Bsin⁡nπ4)u0=1  ⟹  A=1u1=0  ⟹  A+B=0  ⟹  B=−1\begin{aligned} r^2-2r+2&=0\implies r=1\pm\mathrm i\\ 1\pm\mathrm i&=\sqrt2\,\left(\cos\frac\pi4\pm\mathrm i\sin\frac\pi4\right)\\ u_n&=(\sqrt2)^n\left(A\cos\frac{n\pi}4+B\sin\frac{n\pi}4\right)\\ u_0=1&\implies A=1\\ u_1=0&\implies A+B=0\implies B=-1 \end{aligned}

Why this step? The conjugate powers combine into real sine and cosine components, so both constants can be fitted using real equations.

Answer. un=(2)n(cos⁡(nπ/4)−sin⁡(nπ/4))u_n=(\sqrt2)^n\bigl(\cos(n\pi/4)-\sin(n\pi/4)\bigr).

Check. The formula gives u2=−2u_2=-2, matching 2(0)−2(1)2(0)-2(1).

Worked example 6 changes only u1u_1, from 00 to 22.

Worked example 6: a changed phase

Question. Solve the same recurrence with u0=1, u1=2u_0=1,\ u_1=2.

Plan. Retain the real complementary function and refit BB.

A=1A+B=2  ⟹  B=1un=(2)n(cos⁡nπ4+sin⁡nπ4)\begin{aligned} A&=1\\ A+B&=2\implies B=1\\ u_n&=(\sqrt2)^n\left(\cos\frac{n\pi}4+\sin\frac{n\pi}4\right) \end{aligned}

Why this step? Changing the starting value changes the mixture of the two oscillating components, not the roots.

Answer. un=(2)n(cos⁡(nπ/4)+sin⁡(nπ/4))u_n=(\sqrt2)^n\bigl(\cos(n\pi/4)+\sin(n\pi/4)\bigr).

Check. The formula gives u2=2u_2=2, matching 2(2)−2(1)2(2)-2(1).

Use radians and retain exact angles when evaluating a symbolic formula.

Watch out

Wrong: replace 1±i1\pm\mathrm i by their modulus alone and write (A+B)(2)n(A+B)(\sqrt2)^n. Right: retain the arguments; they carry the oscillation.

Change only the second condition once more.

Add a polynomial particular solution

For a linear non-homogeneous recurrence, add a particular solution to the complementary function before applying the conditions. Constant, linear and quadratic forcing suggest polynomial trials with all lower powers included.

Polynomial trials and overlap

For constant-coefficient second-order relations, start with a polynomial trial of the same degree as the forcing. If 11 is an auxiliary root of multiplicity ss, multiply the whole trial by nsn^s.

Thus constant forcing uses CC, CnCn or Cn2Cn^2 when the multiplicity of root 11 is respectively 0,1,20,1,2. Substitute the trial to determine its coefficients. 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