Top Banner
Summary of Solving Linear, Constant-Coefficient Recurrence Relations Ioan Despi [email protected] University of New England September 27, 2013
55

Summary of Solving Linear, Constant-Coefficient Recurrence ...

Feb 28, 2022

Download

Documents

dariahiddleston
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Summary of Solving Linear,Constant-Coefficient Recurrence Relations

Ioan Despi

[email protected]

University of New England

September 27, 2013

Page 2: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Outline

1 The Technique

2 Homogeneous Case

3 Non-Homogeneous Case

4 Examples

Ioan Despi – AMTH140 2 of 12

Page 3: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:

I any answer which works is the correct answer since there is only onecorrect answer (this can be proved!).

There are two parts of the total solution:

1 The homogeneous part of the solution depends only on what is on the leftof the recurrence relation.

2 The particular part of the total solution depends on what is in RHS andhas the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 4: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:

I any answer which works is the correct answer since there is only onecorrect answer (this can be proved!).

There are two parts of the total solution:

1 The homogeneous part of the solution depends only on what is on the leftof the recurrence relation.

2 The particular part of the total solution depends on what is in RHS andhas the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 5: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:I any answer which works is the correct answer since there is only one

correct answer (this can be proved!).

There are two parts of the total solution:

1 The homogeneous part of the solution depends only on what is on the leftof the recurrence relation.

2 The particular part of the total solution depends on what is in RHS andhas the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 6: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:I any answer which works is the correct answer since there is only one

correct answer (this can be proved!).

There are two parts of the total solution:

1 The homogeneous part of the solution depends only on what is on the leftof the recurrence relation.

2 The particular part of the total solution depends on what is in RHS andhas the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 7: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:I any answer which works is the correct answer since there is only one

correct answer (this can be proved!).

There are two parts of the total solution:1 The homogeneous part of the solution depends only on what is on the left

of the recurrence relation.

2 The particular part of the total solution depends on what is in RHS andhas the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 8: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:I any answer which works is the correct answer since there is only one

correct answer (this can be proved!).

There are two parts of the total solution:1 The homogeneous part of the solution depends only on what is on the left

of the recurrence relation.2 The particular part of the total solution depends on what is in RHS and

has the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 9: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

The technique is based on method of characteristic equations.

It relies on the principle of uniqueness:I any answer which works is the correct answer since there is only one

correct answer (this can be proved!).

There are two parts of the total solution:1 The homogeneous part of the solution depends only on what is on the left

of the recurrence relation.2 The particular part of the total solution depends on what is in RHS and

has the same form as RHS.

We calculate the two parts separately and add them to form the totalsolution.

Ioan Despi – AMTH140 3 of 12

Page 10: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.

I This step does not produce any additional undetermined coefficients, nordoes it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 11: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.

I This step does not produce any additional undetermined coefficients, nordoes it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 12: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).

I The solution will contain one or more undetermined coefficients whosevalues cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.

I This step does not produce any additional undetermined coefficients, nordoes it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 13: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.

I This step does not produce any additional undetermined coefficients, nordoes it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 14: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.

I This step does not produce any additional undetermined coefficients, nordoes it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 15: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.I This step does not produce any additional undetermined coefficients, nor

does it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 16: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.I This step does not produce any additional undetermined coefficients, nor

does it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 17: Summary of Solving Linear, Constant-Coefficient Recurrence ...

The Technique

There are four steps in the process:

(S1.) Find the homogeneous solution to the homogeneous equation (the onethat results when you set RHS=0).

I If RHS is already zero, skip next two steps and go to (S4).I The solution will contain one or more undetermined coefficients whose

values cannot be determined until (S4).

(S2.) Find the particular solution by guessing a form similar to RHS.I This step does not produce any additional undetermined coefficients, nor

does it eliminate those from (S1).

(S3.) Combine (add) the homogeneous and particular solutions.

(S4.) Use initial conditions to eliminate the undetermined constants from (S1).

Ioan Despi – AMTH140 4 of 12

Page 18: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Homogeneous Case

1 First solve the characteristic equation.

(a) Distinct roots

Example 𝜆 = 1, 𝜆 = 2

Solution 𝑎𝑛 = 𝐴(1)𝑛 +𝐵(2)𝑛 = 𝐴+𝐵2𝑛

(b) Repeated roots

Example 𝜆 = 3 with multiplicity 2

Solution 𝑎𝑛 = (𝐴𝑛+𝐵)3𝑛

Example 𝜆 = 2 with multiplicity 3

Solution 𝑎𝑛 = (𝐴𝑛2 +𝐵𝑛+ 𝐶)2𝑛

Example 𝜆 = 2 with multiplicity 1

𝜆 = −1 with multiplicity 2

Solution 𝑎𝑛 = 𝐴2𝑛 + (𝐵𝑛+ 𝐶)(−1)𝑛

2 If there are initial conditions, use them to find the values for theconstants 𝐴,𝐵, etc.

Ioan Despi – AMTH140 5 of 12

Page 19: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Homogeneous Case

1 First solve the characteristic equation.(a) Distinct roots

Example 𝜆 = 1, 𝜆 = 2

Solution 𝑎𝑛 = 𝐴(1)𝑛 +𝐵(2)𝑛 = 𝐴+𝐵2𝑛

(b) Repeated roots

Example 𝜆 = 3 with multiplicity 2

Solution 𝑎𝑛 = (𝐴𝑛+𝐵)3𝑛

Example 𝜆 = 2 with multiplicity 3

Solution 𝑎𝑛 = (𝐴𝑛2 +𝐵𝑛+ 𝐶)2𝑛

Example 𝜆 = 2 with multiplicity 1

𝜆 = −1 with multiplicity 2

Solution 𝑎𝑛 = 𝐴2𝑛 + (𝐵𝑛+ 𝐶)(−1)𝑛

2 If there are initial conditions, use them to find the values for theconstants 𝐴,𝐵, etc.

Ioan Despi – AMTH140 5 of 12

Page 20: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Homogeneous Case

1 First solve the characteristic equation.(a) Distinct roots

Example 𝜆 = 1, 𝜆 = 2

Solution 𝑎𝑛 = 𝐴(1)𝑛 +𝐵(2)𝑛 = 𝐴+𝐵2𝑛

(b) Repeated roots

Example 𝜆 = 3 with multiplicity 2

Solution 𝑎𝑛 = (𝐴𝑛+𝐵)3𝑛

Example 𝜆 = 2 with multiplicity 3

Solution 𝑎𝑛 = (𝐴𝑛2 +𝐵𝑛+ 𝐶)2𝑛

Example 𝜆 = 2 with multiplicity 1

𝜆 = −1 with multiplicity 2

Solution 𝑎𝑛 = 𝐴2𝑛 + (𝐵𝑛+ 𝐶)(−1)𝑛

2 If there are initial conditions, use them to find the values for theconstants 𝐴,𝐵, etc.

Ioan Despi – AMTH140 5 of 12

Page 21: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Homogeneous Case

1 First solve the characteristic equation.(a) Distinct roots

Example 𝜆 = 1, 𝜆 = 2

Solution 𝑎𝑛 = 𝐴(1)𝑛 +𝐵(2)𝑛 = 𝐴+𝐵2𝑛

(b) Repeated roots

Example 𝜆 = 3 with multiplicity 2

Solution 𝑎𝑛 = (𝐴𝑛+𝐵)3𝑛

Example 𝜆 = 2 with multiplicity 3

Solution 𝑎𝑛 = (𝐴𝑛2 +𝐵𝑛+ 𝐶)2𝑛

Example 𝜆 = 2 with multiplicity 1

𝜆 = −1 with multiplicity 2

Solution 𝑎𝑛 = 𝐴2𝑛 + (𝐵𝑛+ 𝐶)(−1)𝑛

2 If there are initial conditions, use them to find the values for theconstants 𝐴,𝐵, etc.

Ioan Despi – AMTH140 5 of 12

Page 22: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Homogeneous Case

1 First solve the characteristic equation.(a) Distinct roots

Example 𝜆 = 1, 𝜆 = 2

Solution 𝑎𝑛 = 𝐴(1)𝑛 +𝐵(2)𝑛 = 𝐴+𝐵2𝑛

(b) Repeated roots

Example 𝜆 = 3 with multiplicity 2

Solution 𝑎𝑛 = (𝐴𝑛+𝐵)3𝑛

Example 𝜆 = 2 with multiplicity 3

Solution 𝑎𝑛 = (𝐴𝑛2 +𝐵𝑛+ 𝐶)2𝑛

Example 𝜆 = 2 with multiplicity 1

𝜆 = −1 with multiplicity 2

Solution 𝑎𝑛 = 𝐴2𝑛 + (𝐵𝑛+ 𝐶)(−1)𝑛

2 If there are initial conditions, use them to find the values for theconstants 𝐴,𝐵, etc.

Ioan Despi – AMTH140 5 of 12

Page 23: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Homogeneous Case

1 First solve the characteristic equation.(a) Distinct roots

Example 𝜆 = 1, 𝜆 = 2

Solution 𝑎𝑛 = 𝐴(1)𝑛 +𝐵(2)𝑛 = 𝐴+𝐵2𝑛

(b) Repeated roots

Example 𝜆 = 3 with multiplicity 2

Solution 𝑎𝑛 = (𝐴𝑛+𝐵)3𝑛

Example 𝜆 = 2 with multiplicity 3

Solution 𝑎𝑛 = (𝐴𝑛2 +𝐵𝑛+ 𝐶)2𝑛

Example 𝜆 = 2 with multiplicity 1

𝜆 = −1 with multiplicity 2

Solution 𝑎𝑛 = 𝐴2𝑛 + (𝐵𝑛+ 𝐶)(−1)𝑛

2 If there are initial conditions, use them to find the values for theconstants 𝐴,𝐵, etc.

Ioan Despi – AMTH140 5 of 12

Page 24: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.

If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.

(a) Solution to the homogeneous case not like the right hand side of therecurrence relation.

F Try substituting something that looks like the right hand side (RHS).Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 25: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.

Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.

(a) Solution to the homogeneous case not like the right hand side of therecurrence relation.

F Try substituting something that looks like the right hand side (RHS).Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 26: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.

(a) Solution to the homogeneous case not like the right hand side of therecurrence relation.

F Try substituting something that looks like the right hand side (RHS).Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 27: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.

F Try substituting something that looks like the right hand side (RHS).Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 28: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 29: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 30: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵

Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 31: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)

Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 32: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.

(i) Distinct roots: Try a solution with an extra 𝑛.Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 33: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.(i) Distinct roots: Try a solution with an extra 𝑛.

Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.

(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 formultiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 34: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.(i) Distinct roots: Try a solution with an extra 𝑛.

Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 for

multiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 35: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.(i) Distinct roots: Try a solution with an extra 𝑛.

Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 for

multiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 36: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Solve the characteristic equation and obtain a solution to thehomogeneous case as in 1. Call it 𝑢𝑛.If there are initial conditions leave these for the moment.Next find a particular solution, 𝑣𝑛, to the non-homogeneous case.(a) Solution to the homogeneous case not like the right hand side of the

recurrence relation.F Try substituting something that looks like the right hand side (RHS).

Example RHS = 2𝑛, try 𝑣𝑛 = 𝐶2𝑛

Example RHS = 4𝑛, try 𝑣𝑛 = 𝐴𝑛+𝐵Example RHS = 3𝑛𝑛, try 𝑣𝑛 = 3𝑛(𝐴𝑛+𝐵)Example RHS = 𝑛2, try 𝑣𝑛 = 𝐴𝑛2 +𝐵𝑛+ 𝐶

(b) Solution to the homogeneous case similar the the RHS of the recurrencerelation.(i) Distinct roots: Try a solution with an extra 𝑛.

Example 𝜆 = 2 and RHS = 2𝑛, try 𝑣𝑛 = 𝐶𝑛2𝑛.(ii) Repeat Roots: Try a solution with an extra 𝑛2 for multiplicity 2, 𝑛3 for

multiplicity 3 etc.

Example 𝜆 = 3 with multiplicity 2 and RHS = 3𝑛, try

𝑣𝑛 = 𝐶𝑛23𝑛

Example 𝜆 = 1 with multiplicity 3 and RHS = 4 = 4× 1𝑛, try

𝑣𝑛 = 𝐶𝑛3 · 13 = 𝐶𝑛3

Ioan Despi – AMTH140 6 of 12

Page 37: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Once you have decided what a possible solution to the nonhomogeneouscase could be, substitute it into the original recurrence relation.

Then find values for the constants and put these values back into theexpressions for 𝑣𝑛.

Now add 𝑢𝑛 and 𝑣𝑛 to obtain the general solution. That is,

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

If there are initial conditions, substitute them in now to find the values ofthe constants that were part of 𝑣𝑛.

Finally, check your answer by substituting it into the original recurrencerelation.

Ioan Despi – AMTH140 7 of 12

Page 38: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Once you have decided what a possible solution to the nonhomogeneouscase could be, substitute it into the original recurrence relation.

Then find values for the constants and put these values back into theexpressions for 𝑣𝑛.

Now add 𝑢𝑛 and 𝑣𝑛 to obtain the general solution. That is,

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

If there are initial conditions, substitute them in now to find the values ofthe constants that were part of 𝑣𝑛.

Finally, check your answer by substituting it into the original recurrencerelation.

Ioan Despi – AMTH140 7 of 12

Page 39: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Once you have decided what a possible solution to the nonhomogeneouscase could be, substitute it into the original recurrence relation.

Then find values for the constants and put these values back into theexpressions for 𝑣𝑛.

Now add 𝑢𝑛 and 𝑣𝑛 to obtain the general solution. That is,

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

If there are initial conditions, substitute them in now to find the values ofthe constants that were part of 𝑣𝑛.

Finally, check your answer by substituting it into the original recurrencerelation.

Ioan Despi – AMTH140 7 of 12

Page 40: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Once you have decided what a possible solution to the nonhomogeneouscase could be, substitute it into the original recurrence relation.

Then find values for the constants and put these values back into theexpressions for 𝑣𝑛.

Now add 𝑢𝑛 and 𝑣𝑛 to obtain the general solution. That is,

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

If there are initial conditions, substitute them in now to find the values ofthe constants that were part of 𝑣𝑛.

Finally, check your answer by substituting it into the original recurrencerelation.

Ioan Despi – AMTH140 7 of 12

Page 41: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Non-Homogeneous Case

Once you have decided what a possible solution to the nonhomogeneouscase could be, substitute it into the original recurrence relation.

Then find values for the constants and put these values back into theexpressions for 𝑣𝑛.

Now add 𝑢𝑛 and 𝑣𝑛 to obtain the general solution. That is,

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

If there are initial conditions, substitute them in now to find the values ofthe constants that were part of 𝑣𝑛.

Finally, check your answer by substituting it into the original recurrencerelation.

Ioan Despi – AMTH140 7 of 12

Page 42: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution of the recurrence relation

𝑎𝑛+2 − 5𝑎𝑛+1 + 6𝑎𝑛 = 0, 𝑛 ≥ 0 .

Solution.

The associated characteristic equation

𝜆2 − 5𝜆 + 6 = 0

has two (distinct) roots 𝜆1 = 2 and 𝜆2 = 3.

Hence the general solution of the recurrence relation is

𝑎𝑛 = 𝐴2𝑛 + 𝐵3𝑛, 𝑛 ≥ 0 ,

where 𝐴 and 𝐵 are arbitrary constants.

Ioan Despi – AMTH140 8 of 12

Page 43: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution of the recurrence relation

𝑎𝑛+2 − 5𝑎𝑛+1 + 6𝑎𝑛 = 0, 𝑛 ≥ 0 .

Solution.

The associated characteristic equation

𝜆2 − 5𝜆 + 6 = 0

has two (distinct) roots 𝜆1 = 2 and 𝜆2 = 3.

Hence the general solution of the recurrence relation is

𝑎𝑛 = 𝐴2𝑛 + 𝐵3𝑛, 𝑛 ≥ 0 ,

where 𝐴 and 𝐵 are arbitrary constants.

Ioan Despi – AMTH140 8 of 12

Page 44: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution of the recurrence relation

𝑎𝑛+2 − 5𝑎𝑛+1 + 6𝑎𝑛 = 0, 𝑛 ≥ 0 .

Solution.

The associated characteristic equation

𝜆2 − 5𝜆 + 6 = 0

has two (distinct) roots 𝜆1 = 2 and 𝜆2 = 3.

Hence the general solution of the recurrence relation is

𝑎𝑛 = 𝐴2𝑛 + 𝐵3𝑛, 𝑛 ≥ 0 ,

where 𝐴 and 𝐵 are arbitrary constants.

Ioan Despi – AMTH140 8 of 12

Page 45: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find a particular solution of the previous recurrence relation

𝑎𝑛+2 − 5𝑎𝑛+1 + 6𝑎𝑛 = 0, 𝑛 ≥ 0

such that it satisfies the initial conditions 𝑎0 = 2 and 𝑎1 = 3.

Solution.

From the general solution obtained in the previous example, the initialconditions give rise to the following two equations

𝑎0 = 𝐴 + 𝐵 = 2 , 𝑎1 = 𝐴× 2 + 𝐵 × 3 = 3

Solving the above 2 equations we obtain 𝐴 = 3 and 𝐵 = −1.Hence the particular solution satisfying the initial conditions is

𝑎𝑛 = 3 × 2𝑛 − 3𝑛, 𝑛 ≥ 0

Ioan Despi – AMTH140 9 of 12

Page 46: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find a particular solution of the previous recurrence relation

𝑎𝑛+2 − 5𝑎𝑛+1 + 6𝑎𝑛 = 0, 𝑛 ≥ 0

such that it satisfies the initial conditions 𝑎0 = 2 and 𝑎1 = 3.

Solution.

From the general solution obtained in the previous example, the initialconditions give rise to the following two equations

𝑎0 = 𝐴 + 𝐵 = 2 , 𝑎1 = 𝐴× 2 + 𝐵 × 3 = 3

Solving the above 2 equations we obtain 𝐴 = 3 and 𝐵 = −1.

Hence the particular solution satisfying the initial conditions is

𝑎𝑛 = 3 × 2𝑛 − 3𝑛, 𝑛 ≥ 0

Ioan Despi – AMTH140 9 of 12

Page 47: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find a particular solution of the previous recurrence relation

𝑎𝑛+2 − 5𝑎𝑛+1 + 6𝑎𝑛 = 0, 𝑛 ≥ 0

such that it satisfies the initial conditions 𝑎0 = 2 and 𝑎1 = 3.

Solution.

From the general solution obtained in the previous example, the initialconditions give rise to the following two equations

𝑎0 = 𝐴 + 𝐵 = 2 , 𝑎1 = 𝐴× 2 + 𝐵 × 3 = 3

Solving the above 2 equations we obtain 𝐴 = 3 and 𝐵 = −1.Hence the particular solution satisfying the initial conditions is

𝑎𝑛 = 3 × 2𝑛 − 3𝑛, 𝑛 ≥ 0

Ioan Despi – AMTH140 9 of 12

Page 48: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution for the recurrence relation

𝑤𝑛+2 − 4𝑤𝑛+1 + 4𝑤𝑛 = 2𝑛+2 , 𝑛 ≥ 0

Solution.

The associated characteristic equation 𝜆2 − 4𝜆 + 4 = (𝜆− 2)2 = 0 has adouble root 𝜆1 = 2.Hence the general solution of the corresponding homogeneous problem is𝑢𝑛 = 2𝑛(𝐴 + 𝐵𝑛) for 𝑛 ≥ 0, where 𝐴 and 𝐵 are arbitrary constants.Since the nonhomogeneous term is 2𝑛+2 = 4 × 2𝑛, a particular solution 𝑣𝑛will take the form 𝑣𝑛 = 𝐶𝑛22𝑛 because 2 is a double root of theassociated characteristic equation.Hence, substituting 𝑣𝑛 into the nonhomogeneous recurrence relation𝑣𝑛+2 − 4𝑣𝑛+1 + 4𝑣𝑛 = 2𝑛+2, we obtain

𝐶[︁4(𝑛 + 2)2 − 4(𝑛 + 1)2 × 2 + 4𝑛2

]︁= 4

which then simplifies to just 2𝐶 = 1.

Ioan Despi – AMTH140 10 of 12

Page 49: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution for the recurrence relation

𝑤𝑛+2 − 4𝑤𝑛+1 + 4𝑤𝑛 = 2𝑛+2 , 𝑛 ≥ 0

Solution.

The associated characteristic equation 𝜆2 − 4𝜆 + 4 = (𝜆− 2)2 = 0 has adouble root 𝜆1 = 2.

Hence the general solution of the corresponding homogeneous problem is𝑢𝑛 = 2𝑛(𝐴 + 𝐵𝑛) for 𝑛 ≥ 0, where 𝐴 and 𝐵 are arbitrary constants.Since the nonhomogeneous term is 2𝑛+2 = 4 × 2𝑛, a particular solution 𝑣𝑛will take the form 𝑣𝑛 = 𝐶𝑛22𝑛 because 2 is a double root of theassociated characteristic equation.Hence, substituting 𝑣𝑛 into the nonhomogeneous recurrence relation𝑣𝑛+2 − 4𝑣𝑛+1 + 4𝑣𝑛 = 2𝑛+2, we obtain

𝐶[︁4(𝑛 + 2)2 − 4(𝑛 + 1)2 × 2 + 4𝑛2

]︁= 4

which then simplifies to just 2𝐶 = 1.

Ioan Despi – AMTH140 10 of 12

Page 50: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution for the recurrence relation

𝑤𝑛+2 − 4𝑤𝑛+1 + 4𝑤𝑛 = 2𝑛+2 , 𝑛 ≥ 0

Solution.

The associated characteristic equation 𝜆2 − 4𝜆 + 4 = (𝜆− 2)2 = 0 has adouble root 𝜆1 = 2.Hence the general solution of the corresponding homogeneous problem is𝑢𝑛 = 2𝑛(𝐴 + 𝐵𝑛) for 𝑛 ≥ 0, where 𝐴 and 𝐵 are arbitrary constants.

Since the nonhomogeneous term is 2𝑛+2 = 4 × 2𝑛, a particular solution 𝑣𝑛will take the form 𝑣𝑛 = 𝐶𝑛22𝑛 because 2 is a double root of theassociated characteristic equation.Hence, substituting 𝑣𝑛 into the nonhomogeneous recurrence relation𝑣𝑛+2 − 4𝑣𝑛+1 + 4𝑣𝑛 = 2𝑛+2, we obtain

𝐶[︁4(𝑛 + 2)2 − 4(𝑛 + 1)2 × 2 + 4𝑛2

]︁= 4

which then simplifies to just 2𝐶 = 1.

Ioan Despi – AMTH140 10 of 12

Page 51: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution for the recurrence relation

𝑤𝑛+2 − 4𝑤𝑛+1 + 4𝑤𝑛 = 2𝑛+2 , 𝑛 ≥ 0

Solution.

The associated characteristic equation 𝜆2 − 4𝜆 + 4 = (𝜆− 2)2 = 0 has adouble root 𝜆1 = 2.Hence the general solution of the corresponding homogeneous problem is𝑢𝑛 = 2𝑛(𝐴 + 𝐵𝑛) for 𝑛 ≥ 0, where 𝐴 and 𝐵 are arbitrary constants.Since the nonhomogeneous term is 2𝑛+2 = 4 × 2𝑛, a particular solution 𝑣𝑛will take the form 𝑣𝑛 = 𝐶𝑛22𝑛 because 2 is a double root of theassociated characteristic equation.

Hence, substituting 𝑣𝑛 into the nonhomogeneous recurrence relation𝑣𝑛+2 − 4𝑣𝑛+1 + 4𝑣𝑛 = 2𝑛+2, we obtain

𝐶[︁4(𝑛 + 2)2 − 4(𝑛 + 1)2 × 2 + 4𝑛2

]︁= 4

which then simplifies to just 2𝐶 = 1.

Ioan Despi – AMTH140 10 of 12

Page 52: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Example

Find the general solution for the recurrence relation

𝑤𝑛+2 − 4𝑤𝑛+1 + 4𝑤𝑛 = 2𝑛+2 , 𝑛 ≥ 0

Solution.

The associated characteristic equation 𝜆2 − 4𝜆 + 4 = (𝜆− 2)2 = 0 has adouble root 𝜆1 = 2.Hence the general solution of the corresponding homogeneous problem is𝑢𝑛 = 2𝑛(𝐴 + 𝐵𝑛) for 𝑛 ≥ 0, where 𝐴 and 𝐵 are arbitrary constants.Since the nonhomogeneous term is 2𝑛+2 = 4 × 2𝑛, a particular solution 𝑣𝑛will take the form 𝑣𝑛 = 𝐶𝑛22𝑛 because 2 is a double root of theassociated characteristic equation.Hence, substituting 𝑣𝑛 into the nonhomogeneous recurrence relation𝑣𝑛+2 − 4𝑣𝑛+1 + 4𝑣𝑛 = 2𝑛+2, we obtain

𝐶[︁4(𝑛 + 2)2 − 4(𝑛 + 1)2 × 2 + 4𝑛2

]︁= 4

which then simplifies to just 2𝐶 = 1.

Ioan Despi – AMTH140 10 of 12

Page 53: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Hence we have 𝐶 = 12 and 𝑣𝑛 = 𝑛22𝑛−1.

The general solution 𝑤𝑛 of the nonhomogeneous recurrence relation isthus 𝑤𝑛 = 𝑢𝑛 + 𝑣𝑛, and hence takes the form

𝑤𝑛 = 2𝑛(𝐴 + 𝐵𝑛) + 𝑛2 · 2𝑛−1

= 2𝑛[︁𝐴 + 𝐵𝑛 +

𝑛2

2

]︁, 𝑛 ≥ 0 .

Ioan Despi – AMTH140 11 of 12

Page 54: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Examples

Hence we have 𝐶 = 12 and 𝑣𝑛 = 𝑛22𝑛−1.

The general solution 𝑤𝑛 of the nonhomogeneous recurrence relation isthus 𝑤𝑛 = 𝑢𝑛 + 𝑣𝑛, and hence takes the form

𝑤𝑛 = 2𝑛(𝐴 + 𝐵𝑛) + 𝑛2 · 2𝑛−1

= 2𝑛[︁𝐴 + 𝐵𝑛 +

𝑛2

2

]︁, 𝑛 ≥ 0 .

Ioan Despi – AMTH140 11 of 12

Page 55: Summary of Solving Linear, Constant-Coefficient Recurrence ...

Ioan Despi – AMTH140 12 of 12