Xs4–Xs6 - Solving first order recurrences

Xs4–Xs6 - Solving first order recurrences

Verify a solution, solve first order homogeneous recurrences and add a trial solution for constant, polynomial or exponential forcing. Keep the starting index and the initial condition visible.

Two checks, not one

Can a formula satisfy a recurrence perfectly and still be the wrong solution to the question?

Yes: it may describe a different starting value. A particular solution must pass both the recurrence check and every supplied condition.

You already know

The preceding lesson distinguished a general family from a particular sequence. To replace nn by n+1n+1 in a formula, replace every occurrence, including exponents and polynomial terms.

Verification uses the given formula directly. Checking the first few generated terms is useful for spotting mistakes, but is not a substitute for an identity valid for every permitted nn.

Worked example 1: verify the rule and the start

Question. Verify that un=4 2n−3u_n=4\,2^n-3 solves un+1=2un+3u_{n+1}=2u_n+3, u0=1u_0=1, for n≥0n\ge0.

Plan. Calculate the next term from the formula, compare it with the recurrence's right side, then check n=0n=0.

un+1=4 2n+1−3shift the index2un+3=2(4 2n−3)+3substitute the proposed formula=8 2n−3=4 2n+1−3same expressionu0=4−3=1initial condition\begin{aligned} u_{n+1}&=4\,2^{n+1}-3 && \text{shift the index}\\ 2u_n+3&=2(4\,2^n-3)+3 && \text{substitute the proposed formula}\\ &=8\,2^n-3=4\,2^{n+1}-3 && \text{same expression}\\ u_0&=4-3=1 && \text{initial condition} \end{aligned}

Why this step? The identity checks the rule at every step; the final line selects the correct member of the family.

Answer. The formula satisfies the recurrence and the initial condition, so it is the required solution.

Check. It gives u1=5u_1=5, and the original rule gives 2(1)+3=52(1)+3=5.

Change only the initial condition to u0=2u_0=2. The algebraic identity remains true, but its conclusion must change.

Worked example 2: a correct identity, a wrong solution

Question. Does un=4 2n−3u_n=4\,2^n-3 solve un+1=2un+3u_{n+1}=2u_n+3, u0=2u_0=2?

Plan. Separate satisfaction of the recurrence from satisfaction of the new initial condition.

2un+3=4 2n+1−3=un+1recurrence still satisfiedu0=4−3=1≠2new condition fails\begin{aligned} 2u_n+3&=4\,2^{n+1}-3=u_{n+1} && \text{recurrence still satisfied}\\ u_0&=4-3=1\ne2 && \text{new condition fails} \end{aligned}

Why this step? The recurrence admits many sequences; satisfying it alone does not identify the sequence starting from 22.

Answer. No. It solves the recurrence but not this initial-value problem.

Check. The required first step would be u1=2(2)+3=7u_1=2(2)+3=7, whereas the proposed formula gives 55.

The hook has its answer: an identity can be right while the selected sequence is wrong. Always state which requirement has failed.

Watch out

Wrong: “The recurrence identity works, so the verification is complete.” Right: check every condition too. A later condition such as u3=29u_3=29 must also be tested: the proposed 4 2n−34\,2^n-3 gives 4(8)−3=294(8)-3=29.

This proposed formula has new coefficients. Decide whether it satisfies the whole initial-value problem.

A geometric family

With no added term, each step simply multiplies by the same coefficient. The general solution is the geometric family you already know.

First order homogeneous recurrence

For un+1=aunu_{n+1}=au_n, the solution with starting value umu_m is

un=uman−m,n≥m.u_n=u_m a^{n-m},\qquad n\ge m.

Equivalently, when starting at 00, un=Canu_n=Ca^n. If a=0a=0, handle the starting term separately: all subsequent terms are zero.

Not in the formula booklet: learn it.

The exponent counts the number of steps after the starting term. A negative multiplier belongs inside brackets when raised to a power.

Worked example 3: starting at zero

Question. Solve un+1=3unu_{n+1}=3u_n, u0=2u_0=2.

Plan. Write the geometric general solution, then determine its constant.

un=C3ngeneral familyu0=C=2zero steps from the startun=2 3nparticular solution\begin{aligned} u_n&=C3^n && \text{general family}\\ u_0=C&=2 && \text{zero steps from the start}\\ u_n&=2\,3^n && \text{particular solution} \end{aligned}

Why this step? The initial condition determines the coefficient, while the recurrence determines the ratio.

Answer. un=2 3nu_n=2\,3^n, for n≥0n\ge0.

Check. un+1=2 3n+1=3unu_{n+1}=2\,3^{n+1}=3u_n, and u0=2u_0=2.

Change only the multiplier to −3-3. The initial value stays 22.

Worked example 4: a negative ratio

Question. Solve vn+1=−3vnv_{n+1}=-3v_n, v0=2v_0=2.

Plan. Preserve the sign of the multiplier in the powered base.

vn=C(−3)ngeneral familyv0=C=2initial conditionvn=2(−3)nselected sequence\begin{aligned} v_n&=C(-3)^n && \text{general family}\\ v_0=C&=2 && \text{initial condition}\\ v_n&=2(-3)^n && \text{selected sequence} \end{aligned}

Why this step? Writing −2 3n-2\,3^n would make every term negative, rather than alternating the sign.

Answer. vn=2(−3)nv_n=2(-3)^n, for n≥0n\ge0.

Check. The first three terms are 2,−6,182,-6,18, each obtained by multiplying its predecessor by −3-3.

Starting at 11 shifts the exponent by one. Apply that change in the next question.

Watch out

Wrong: wn=canw_n=ca^n when w1=cw_1=c. Right: use can−1ca^{n-1}, because no multiplication step has occurred at the starting index.

State the exponent and index range explicitly.

Add one solution to the homogeneous family

For a non-homogeneous recurrence, find one trial solution for the added term, then add the homogeneous family. The difference between any two solutions satisfies the homogeneous recurrence because their added terms cancel.

Constant forcing

For un+1−aun=bu_{n+1}-au_n=b, first try a constant trial solution pn=Kp_n=K. If a≠1a\ne1,

(1−a)K=b,un=Can+b1−a.(1-a)K=b,\qquad u_n=Ca^n+\frac{b}{1-a}.

If a=1a=1, a constant cannot supply non-zero bb; try pn=Knp_n=Kn, giving un=C+bnu_n=C+bn.

Not in the formula booklet: learn it.

Here a “trial solution” is one particular solution to the equation before initial conditions are applied. Adding the homogeneous family gives the general solution; applying the conditions selects the required particular sequence.

Worked example 5: a constant trial

Question. Solve un+1=2un+6u_{n+1}=2u_n+6, u0=1u_0=1.

Plan. Combine the homogeneous family with a constant trial, then apply the condition to the complete expression.

un(h)=C2nhomogeneous familyK−2K=6  ⟹  K=−6constant trialun=C2n−6general solution1=C−6  ⟹  C=7initial condition\begin{aligned} u_n^{(h)}&=C2^n && \text{homogeneous family}\\ K-2K&=6\implies K=-6 && \text{constant trial}\\ u_n&=C2^n-6 && \text{general solution}\\ 1&=C-6\implies C=7 && \text{initial condition} \end{aligned}

Why this step? The initial condition applies to the sum, not just to its homogeneous component.

Answer. un=7 2n−6u_n=7\,2^n-6.

Check. The formula starts at 11 and gives u1=8=2(1)+6u_1=8=2(1)+6. Also the constant contribution has residual −6−2(−6)=6-6-2(-6)=6.

Change only the coefficient of unu_n from 22 to 11. A constant is now already a homogeneous solution, so the first trial must change.

Worked example 6: when the constant trial overlaps

Question. Solve vn+1=vn+6v_{n+1}=v_n+6, v0=1v_0=1.

Plan. Use the homogeneous constant CC and try KnKn for the added amount.

vn(h)=Chomogeneous solutionK(n+1)−Kn=K=6linear trialvn=C+6ngeneral solutionv0=C=1initial condition\begin{aligned} v_n^{(h)}&=C && \text{homogeneous solution}\\ K(n+1)-Kn&=K=6 && \text{linear trial}\\ v_n&=C+6n && \text{general solution}\\ v_0=C&=1 && \text{initial condition} \end{aligned}

Why this step? A constant trial would give K−K=0K-K=0, so it could never produce the required 66.

Answer. vn=1+6nv_n=1+6n.

Check. Consecutive terms differ by exactly 66, and v0=1v_0=1.

This overlap is often called resonance. The practical response is to multiply the usual trial by nn until it is independent of the homogeneous family.

Watch out

Wrong: dividing by 1−a1-a when a=1a=1. Right: test the trial in the recurrence; a constant gives zero residual, so use a linear trial for non-zero constant forcing.

Continue this lesson.

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

Create free account