FP2 6.1, 6.2 - Second-order recurrence relations

FP2 6.1, 6.2 - Second-order recurrence relations

Solve second-order recurrence relations using auxiliary roots, complementary functions and particular solutions (FP2 6.1, 6.2). You will handle all three root types, repeated-root overlap and a population model with a one-year delay.

Two previous terms give two arbitrary constants

Can a sequence have a closed form full of square roots and trigonometric functions, yet every term be an integer? The auxiliary equation will explain how. First, two simpler roots show why a second-order rule needs two initial values.

You already know

A complementary function solves the homogeneous equation; adding a particular solution solves the full equation. Auxiliary roots also organised second-order differential equations, but recurrence solutions use powers rnr^n, rather than erx\mathrm{e}^{rx}. Initial values must use their stated indices.

A second-order linear recurrence has the form

un+2+f(n)un+1+g(n)un=h(n)u_{n+2}+f(n)u_{n+1}+g(n)u_n=h(n)

and uses two preceding terms. For example, un+2=3un+1−2unu_{n+2}=3u_{n+1}-2u_n, with u0=1,u1=4u_0=1,u_1=4, gives u2=10u_2=10. One starting value alone would leave u1u_1, and hence later terms, undetermined.

For constant coefficients, try un=rnu_n=r^n in the homogeneous equation. With a nonzero root,

rn+2+prn+1+qrn=rn(r2+pr+q)r^{n+2}+pr^{n+1}+qr^n =r^n(r^2+pr+q)

so the bracket gives the auxiliary equation.

Distinct auxiliary roots

For

un+2+pun+1+qun=0u_{n+2}+pu_{n+1}+qu_n=0

with constant real p,qp,q, q≠0q\ne0, solve

r2+pr+q=0r^2+pr+q=0

Distinct roots r1,r2r_1,r_2 give

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

Two initial values determine A,BA,B.

Not in the formula booklet: learn it.

If the coefficient of un+2u_{n+2} is not 11, divide through first or retain it in the auxiliary quadratic. These constant-coefficient forms do not automatically solve arbitrary changing coefficients.

Worked example 1: distinct real roots

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

Plan. Factor the auxiliary quadratic, write both power terms and apply both initial conditions.

r2−3r+2=(r−1)(r−2)=0auxiliary equationun=A+B2none term per rootA+B=1,A+2B=4indices 0,1B=3,A=−2solve simultaneously\begin{aligned} r^2-3r+2&=(r-1)(r-2)=0 &&\text{auxiliary equation}\\ u_n&=A+B2^n &&\text{one term per root}\\ A+B&=1,\qquad A+2B=4 &&\text{indices }0,1\\ B&=3,\qquad A=-2 &&\text{solve simultaneously} \end{aligned}

Why this step? The first equation alone fixes only a sum; the next initial term separates the two constants.

Answer. un=3⋅2n−2u_n=3\cdot2^n-2, for n≥0n\geq0.

Check. It gives u0=1,u1=4,u2=10u_0=1,u_1=4,u_2=10, and 10−3(4)+2(1)=010-3(4)+2(1)=0.

Change only u1u_1, leaving the roots and u0u_0 unchanged.

Worked example 2: use both initial values again

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

Plan. Use the same two-constant family and the changed second equation.

un=A+B2nsame complementary functionA+B=1,A+2B=5new second initial valueB=4,A=−3subtract and solveun=4⋅2n−3closed form\begin{aligned} u_n&=A+B2^n &&\text{same complementary function}\\ A+B&=1,\qquad A+2B=5 &&\text{new second initial value}\\ B&=4,\qquad A=-3 &&\text{subtract and solve}\\ u_n&=4\cdot2^n-3 &&\text{closed form} \end{aligned}

Why this step? Changing an initial value changes the member of the solution family, not the auxiliary equation.

Answer. un=4⋅2n−3u_n=4\cdot2^n-3.

Check. u2=13=3(5)−2(1)u_2=13=3(5)-2(1), and both supplied values agree.

A zero root needs care at the starting index. For un+2=2un+1u_{n+2}=2u_{n+1}, u0=5,u1=3u_0=5,u_1=3, simply use un=3⋅2n−1u_n=3\cdot2^{n-1} for n≥1n\geq1, with u0=5u_0=5 separately. This avoids an ambiguous 000^0; the first value no longer influences later terms.

Watch out

The line un=Aen+Be2nu_n=A\mathrm{e}^n+B\mathrm{e}^{2n} uses the differential-equation form. For recurrence roots 1,21,2, the correct line is un=A1n+B2n=A+B2nu_n=A1^n+B2^n=A+B2^n.

Change only the second initial term once more.

A repeated root needs an extra factor of n

Two identical power terms would merge: Arn+Brn=(A+B)rnAr^n+Br^n=(A+B)r^n. A repeated root must still provide two independent sequences.

For r≠0r\ne0, substitute un=rnvnu_n=r^nv_n into un+2−2run+1+r2un=0u_{n+2}-2r u_{n+1}+r^2u_n=0. Cancelling rn+2r^{n+2} gives

vn+2−2vn+1+vn=0v_{n+2}-2v_{n+1}+v_n=0

so consecutive differences of vnv_n are constant. Thus vn=A+Bnv_n=A+Bn.

Repeated auxiliary root

A repeated nonzero root rr gives

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

The factor nn keeps the second solution independent.

Not in the formula booklet: learn it.

A negative repeated root is allowed; retain (−a)n(-a)^n with brackets. If the auxiliary equation is r2=0r^2=0, the recurrence is un+2=0u_{n+2}=0: retain the two initial values separately, then all later terms vanish.

Worked example 3: two independent repeated-root terms

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

Plan. Use the repeated-root form before applying the conditions.

r2−4r+4=(r−2)2=0repeated rootun=(A+Bn)2nindependent termsA=1,2(A+B)=6initial valuesB=2solve\begin{aligned} r^2-4r+4&=(r-2)^2=0 &&\text{repeated root}\\ u_n&=(A+Bn)2^n &&\text{independent terms}\\ A&=1,\qquad 2(A+B)=6 &&\text{initial values}\\ B&=2 &&\text{solve} \end{aligned}

Why this step? Repeating 2n2^n twice cannot fit two independently chosen initial values; n2nn2^n supplies the missing freedom.

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

Check. u2=20u_2=20, and 20−4(6)+4(1)=020-4(6)+4(1)=0.

Change only the second initial value.

Worked example 4: the same repeated root

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

Plan. Keep the repeated-root form and replace the second condition.

un=(A+Bn)2nsame root structureA=1use u02(1+B)=8use u1B=3solve\begin{aligned} u_n&=(A+Bn)2^n &&\text{same root structure}\\ A&=1 &&\text{use }u_0\\ 2(1+B)&=8 &&\text{use }u_1\\ B&=3 &&\text{solve} \end{aligned}

Why this step? The value at n=0n=0 eliminates the BnBn term, but the value at n=1n=1 includes both terms and the multiplier 22.

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

Check. u2=28=4(8)−4(1)u_2=28=4(8)-4(1).

The same root can produce different growth rates within its family: the extra linear factor matters, even though the exponential base stays fixed.

Watch out

Writing u1=A+Bu_1=A+B omits the factor 212^1. The correct second condition is u1=2(A+B)u_1=2(A+B).

Change just the second initial value again.

Complex roots can describe an integer sequence

For conjugate roots, use their modulus and argument. The real part of a recurrence root is not the base of an exponential envelope.

Conjugate auxiliary roots

If the roots are ρ(cos⁡θ±isin⁡θ)\rho(\cos\theta\pm\mathrm{i}\sin\theta), with ρ>0\rho>0, their real complementary function is

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

Here A,BA,B are real for a real-valued sequence. This follows by combining the conjugate powers using De Moivre's theorem, which is supplied; this recurrence solution form is not supplied.

Not in the formula booklet: learn it.

For roots 1±i1\pm\mathrm{i}, the modulus is 2\sqrt2 and the angles are ±π/4\pm\pi/4. Their powers combine into a real expression.

Worked example 5: real values from complex roots

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

Plan. Write the roots in polar form, then use the two initial values in the real trigonometric form.

(r−1)2=−1auxiliary equationr=1±i=2 (cos⁡(π/4)±isin⁡(π/4))polar rootsun=(2)n(Acos⁡(nπ/4)+Bsin⁡(nπ/4))real CFA=1,A+B=0use u0,u1B=−1solve\begin{aligned} (r-1)^2&=-1 &&\text{auxiliary equation}\\ r&=1\pm\mathrm{i}=\sqrt2\,(\cos(\pi/4)\pm\mathrm{i}\sin(\pi/4)) &&\text{polar roots}\\ u_n&=(\sqrt2)^n\bigl(A\cos(n\pi/4)+B\sin(n\pi/4)\bigr) &&\text{real CF}\\ A&=1,\qquad A+B=0 &&\text{use }u_0,u_1\\ B&=-1 &&\text{solve} \end{aligned}

Why this step? At n=1n=1, 2cos⁡(π/4)=2sin⁡(π/4)=1\sqrt2\cos(\pi/4)=\sqrt2\sin(\pi/4)=1, so the second condition is especially simple.

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. It gives u2=−2u_2=-2, agreeing with 2(0)−2(1)2(0)-2(1).

Change only u1u_1, keeping the roots and u0u_0 unchanged.

Worked example 6: another real combination

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

Plan. Keep the polar-root form and apply the new second initial value.

un=(2)n(Acos⁡(nπ/4)+Bsin⁡(nπ/4))same CFA=1,A+B=2initial valuesB=1solve\begin{aligned} u_n&=(\sqrt2)^n\bigl(A\cos(n\pi/4)+B\sin(n\pi/4)\bigr) &&\text{same CF}\\ A&=1,\qquad A+B=2 &&\text{initial values}\\ B&=1 &&\text{solve} \end{aligned}

Why this step? The two conditions select a different sine coefficient, while the modulus and angular step stay fixed.

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. u2=2u_2=2, and 2−2(2)+2(1)=02-2(2)+2(1)=0.

The first sequence begins 1,0,−2,−4,−4,0,8,16,…1,0,-2,-4,-4,0,8,16,\ldots. Every term is an integer: its initial values and recurrence coefficients are integers. The square roots and trigonometric values in its closed form cancel exactly.

[DIAGRAM: asset_name: Integer terms from conjugate auxiliary roots; asset_slug: conjugate-root-integer-sequence; caption: A trigonometric closed form can produce integer terms at every integer index.; description: Discrete unjoined blue points for the first conjugate-root example from n0 to12 show the values1,0,minus2,minus4,minus4,0,8,16,16,0,minus32,minus64,minus64. Pale sage dashed upper and lower envelopes have heights plus and minus root2 to the power n+1. The expression and roots1 plus or minus i are labelled in ink; axes have integer indices.]
A trigonometric closed form can produce integer terms at every integer index.

The envelope in the diagram has modulus base 2\sqrt2, rather than the root's real part 11.

Watch out

For roots 1±i1\pm\mathrm{i}, un=en(Acos⁡n+Bsin⁡n)u_n=\mathrm{e}^n(A\cos n+B\sin n) is the wrong solution type. Use the root modulus 2\sqrt2 and argument π/4\pi/4 in the recurrence form.

Change only the second initial term once more.

Continue this lesson.

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

Create free account