Steply

Solve a_n = a_(n-1) + 2a_(n-2), a_0 = 0, a_1 = 3

Step by step, with the reason for every step · Second-order recurrences · Discrete Math

Step by step

The question

Question: solve aₙ = aₙ₋₁ + 2aₙ₋₂, with a₀ = 0 and a₁ = 3.

an = an − 1 + 2an − 2, a0 = 0, a1 = 3

1 Everything on one side

Move everything to one side.

Each term changes its sign when it moves.

an − an − 1 − 2an − 2 = 0

2 The characteristic equation

Powers are good at this: try aₙ = x to the n, for some number x.

try an = xn

Put x to the n in for aₙ, x to the n minus 1 for aₙ₋₁, and so on.

xn − xn − 1 − 2xn − 2 = 0

Divide everything by x to the n minus 2: the powers drop to 2, 1 and 0.

This is the characteristic equation.

x2 − x − 2 = 0
÷ xn − 2 on both sides

Careful!

Watch the signs.

The terms moved to the left, so their signs changed.

Careful: not x2 − x + 2 = 0 ✗

3 Solve it

Factor: we need two numbers that multiply to −2 and add to −1: 1 and −2.

(x + 1)(x − 2) = 0
1 × (−2) = −2, 1 + (−2) = −1

So x = −1 or x = 2.

x = −1 or 2

4 The general form

Each root gives a power that works.

Any mix of them works too: A times −1 to the n, plus B times 2 to the n.

an = A × (−1)n + B × 2n

5 Use the start values

n = 0: every power to the 0 is 1.

So A + B = 0.

A + B = 0 ①

n = 1: −1A + 2B = 3.

−A + 2B = 3 ②

From equation 1: A = 0 − B.

A = 0 − B

Put it into equation 2.

-1(0 − B) + 2B = 3

Open the bracket.

0 + 1B + 2B = 3

Like terms: 3B.

0 + 3B = 3

Take away 0 on both sides.

3B = 3

Divide by 3: B = 1.

B = 1

And A = 0 minus B, that is −1.

A = 0 − 1 = −1

So aₙ = −(−1)ⁿ + 2ⁿ.

an = −(−1)n + 2n

6 Check

Check a₂.

The rule: 1 times 3, plus 2 times 0: 3.

rule: a2 = 1 × 3 + 2 × 0 = 3

The formula with n = 2 gives 3 too.

Right!

formula: a2 = 3

Let's look back.

First: everything on one side.

Then: the characteristic equation.

Then: solve it.

Then: the general form.

Then: use the start values.

Last: check.

Answer
an = −(−1)n + 2n

Your turn

Try this one yourself, then check:

Solve an7an − 1 − 10an − 2, a0 = −1, a1 = 1
Show the answer
an = −2 × 2n + 5n

More from Second-order recurrences

The whole lesson: Second-order recurrences →