49
Solution of Linear Nonhomogeneous Recurrence Relations Ioan Despi [email protected] University of New England September 25, 2013

Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Solution of Linear NonhomogeneousRecurrence Relations

Ioan Despi

[email protected]

University of New England

September 25, 2013

Page 2: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Outline

1 A Case for Thought

2 Method of Undetermined CoefficientsNotesExamples

Ioan Despi – AMTH140 2 of 16

Page 3: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for ThoughtWe already mentioned that finding a particular solution for a nonhomogeneousproblem can be more involved than those exemplified in the previous lecture.

Let us first highlight our point with the following example.

Example

Solve 𝑎𝑛+2 + 𝑎𝑛+1 − 6𝑎𝑛 = 2𝑛 for 𝑛 ≥ 0.

Solution.

First we observe that the homogeneous problem

𝑢𝑛+2 + 𝑢𝑛+1 − 6𝑢𝑛 = 0

has the general solution 𝑢𝑛 = 𝐴2𝑛 + 𝐵(−3)𝑛 for 𝑛 ≥ 0 because theassociated characteristic equation 𝜆2 + 𝜆− 6 = 0 has 2 distinct roots𝜆1 = 2 and 𝜆2 = −3.Since the r.h.s. of the nonhomogeneous recurrence relation is 2𝑛, if weformally follow the strategy in the previous lecture, we would try𝑣𝑛 = 𝐶2𝑛 for a particular solution.But there is a difficulty: 𝐶2𝑛 fits into the format of 𝑢𝑛 which is a solutionof the homogeneous problem.

I In other words, it can’t be a particular solution of the nonhomogeneousproblem.

Ioan Despi – AMTH140 3 of 16

Page 4: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for ThoughtWe already mentioned that finding a particular solution for a nonhomogeneousproblem can be more involved than those exemplified in the previous lecture.

Let us first highlight our point with the following example.

Example

Solve 𝑎𝑛+2 + 𝑎𝑛+1 − 6𝑎𝑛 = 2𝑛 for 𝑛 ≥ 0.

Solution.

First we observe that the homogeneous problem

𝑢𝑛+2 + 𝑢𝑛+1 − 6𝑢𝑛 = 0

has the general solution 𝑢𝑛 = 𝐴2𝑛 + 𝐵(−3)𝑛 for 𝑛 ≥ 0 because theassociated characteristic equation 𝜆2 + 𝜆− 6 = 0 has 2 distinct roots𝜆1 = 2 and 𝜆2 = −3.

Since the r.h.s. of the nonhomogeneous recurrence relation is 2𝑛, if weformally follow the strategy in the previous lecture, we would try𝑣𝑛 = 𝐶2𝑛 for a particular solution.But there is a difficulty: 𝐶2𝑛 fits into the format of 𝑢𝑛 which is a solutionof the homogeneous problem.

I In other words, it can’t be a particular solution of the nonhomogeneousproblem.

Ioan Despi – AMTH140 3 of 16

Page 5: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for ThoughtWe already mentioned that finding a particular solution for a nonhomogeneousproblem can be more involved than those exemplified in the previous lecture.

Let us first highlight our point with the following example.

Example

Solve 𝑎𝑛+2 + 𝑎𝑛+1 − 6𝑎𝑛 = 2𝑛 for 𝑛 ≥ 0.

Solution.

First we observe that the homogeneous problem

𝑢𝑛+2 + 𝑢𝑛+1 − 6𝑢𝑛 = 0

has the general solution 𝑢𝑛 = 𝐴2𝑛 + 𝐵(−3)𝑛 for 𝑛 ≥ 0 because theassociated characteristic equation 𝜆2 + 𝜆− 6 = 0 has 2 distinct roots𝜆1 = 2 and 𝜆2 = −3.Since the r.h.s. of the nonhomogeneous recurrence relation is 2𝑛, if weformally follow the strategy in the previous lecture, we would try𝑣𝑛 = 𝐶2𝑛 for a particular solution.

But there is a difficulty: 𝐶2𝑛 fits into the format of 𝑢𝑛 which is a solutionof the homogeneous problem.

I In other words, it can’t be a particular solution of the nonhomogeneousproblem.

Ioan Despi – AMTH140 3 of 16

Page 6: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for ThoughtWe already mentioned that finding a particular solution for a nonhomogeneousproblem can be more involved than those exemplified in the previous lecture.

Let us first highlight our point with the following example.

Example

Solve 𝑎𝑛+2 + 𝑎𝑛+1 − 6𝑎𝑛 = 2𝑛 for 𝑛 ≥ 0.

Solution.

First we observe that the homogeneous problem

𝑢𝑛+2 + 𝑢𝑛+1 − 6𝑢𝑛 = 0

has the general solution 𝑢𝑛 = 𝐴2𝑛 + 𝐵(−3)𝑛 for 𝑛 ≥ 0 because theassociated characteristic equation 𝜆2 + 𝜆− 6 = 0 has 2 distinct roots𝜆1 = 2 and 𝜆2 = −3.Since the r.h.s. of the nonhomogeneous recurrence relation is 2𝑛, if weformally follow the strategy in the previous lecture, we would try𝑣𝑛 = 𝐶2𝑛 for a particular solution.But there is a difficulty: 𝐶2𝑛 fits into the format of 𝑢𝑛 which is a solutionof the homogeneous problem.

I In other words, it can’t be a particular solution of the nonhomogeneousproblem.

Ioan Despi – AMTH140 3 of 16

Page 7: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for ThoughtWe already mentioned that finding a particular solution for a nonhomogeneousproblem can be more involved than those exemplified in the previous lecture.

Let us first highlight our point with the following example.

Example

Solve 𝑎𝑛+2 + 𝑎𝑛+1 − 6𝑎𝑛 = 2𝑛 for 𝑛 ≥ 0.

Solution.

First we observe that the homogeneous problem

𝑢𝑛+2 + 𝑢𝑛+1 − 6𝑢𝑛 = 0

has the general solution 𝑢𝑛 = 𝐴2𝑛 + 𝐵(−3)𝑛 for 𝑛 ≥ 0 because theassociated characteristic equation 𝜆2 + 𝜆− 6 = 0 has 2 distinct roots𝜆1 = 2 and 𝜆2 = −3.Since the r.h.s. of the nonhomogeneous recurrence relation is 2𝑛, if weformally follow the strategy in the previous lecture, we would try𝑣𝑛 = 𝐶2𝑛 for a particular solution.But there is a difficulty: 𝐶2𝑛 fits into the format of 𝑢𝑛 which is a solutionof the homogeneous problem.

I In other words, it can’t be a particular solution of the nonhomogeneousproblem.

Ioan Despi – AMTH140 3 of 16

Page 8: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for Thought

This is really because 2 happens to be one of the two roots 𝜆1 and 𝜆2.

However, we suspect that a particular solution would still have to have 2𝑛

as a factor, so we try 𝑣𝑛 = 𝐶𝑛2𝑛.

Substituting it to 𝑣𝑛+2 + 𝑣𝑛+1 − 6𝑣𝑛 = 2𝑛, we obtain

𝐶(𝑛 + 2)2𝑛+2 + 𝐶(𝑛 + 1)2𝑛+1 − 6𝐶𝑛2𝑛 = 2𝑛 ,

i.e., 10𝐶2𝑛 = 2𝑛 or 𝐶 = 110 .

Hence a particular solution is 𝑣𝑛 =𝑛

102𝑛 and the general solution of our

nonhomogeneous recurrence relation is

𝑎𝑛 = 𝐴2𝑛 + 𝐵(−3)𝑛 +𝑛

102𝑛 , 𝑛 ≥ 0 .

In general, it is important that a correct form, often termed ansatz inphysics, for a particular solution is used before we fix up the unknownconstants in the solution ansatz. The following theorem can help.

Ioan Despi – AMTH140 4 of 16

Page 9: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

A Case for Thought

Theorem (The Rational Roots Test.)

Let 𝑃 (𝑥) = 𝑎𝑛𝑥𝑛 + 𝑎𝑛−1𝑥

𝑛−1 + · · · + 𝑎1𝑥 + 𝑎0 be a polynomial with realcoefficients and 𝑎𝑛 ̸= 0. If 𝑃 (𝑥) has rational roos, they are of the form ±𝑝

𝑞

where 𝑝 | 𝑎0 and 𝑞 | 𝑎𝑛.

The choice of the form of a particular solution, covering the cases in thiscurrent lecture as well as the previous one, can be summarized below.

Ioan Despi – AMTH140 5 of 16

Page 10: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Method of Undetermined Coefficients

Consider a linear, constant coefficient recurrence relation of the form

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 𝑔(𝑛) , 𝑐0𝑐𝑚 ̸= 0 , 𝑛 ≥ 0 . (*)

Suppose function 𝑔(𝑛), the nonhomogeneous part of the recurrencerelation, is of the following form

𝑔(𝑛) = 𝜇𝑛(𝑏0 + 𝑏1𝑛 + · · · + 𝑏𝑘𝑛𝑘) , (**)

where 𝑘 ∈ N, 𝜇, 𝑏0, · · · , 𝑏𝑘 are constants, and 𝜇 is a root of multiplicity 𝑀of the associated characteristic equation

𝑐𝑚𝜆𝑚 + · · · + 𝑐1𝜆 + 𝑐0 = 0 .

Then a particular solution 𝑣𝑛 of (*) should be sought in the form

𝑣𝑛 =

[︂ 𝑘∑︁𝑖=0

𝐵𝑖𝑛𝑖

]︂𝜇𝑛𝑛𝑀 = 𝜇𝑛

(︀𝐵0 + 𝐵1𝑛 + · · · + 𝐵𝑘−1𝑛

𝑘−1 + 𝐵𝑘𝑛𝑘)︀𝑛𝑀

(* * *)where constants 𝐵0, · · · , 𝐵𝑘 are to be determined from the requirementthat 𝑎𝑛 = 𝑣𝑛 should satisfy the recurrence relation (*).

Ioan Despi – AMTH140 6 of 16

Page 11: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Method of Undetermined Coefficients

Consider a linear, constant coefficient recurrence relation of the form

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 𝑔(𝑛) , 𝑐0𝑐𝑚 ̸= 0 , 𝑛 ≥ 0 . (*)

Suppose function 𝑔(𝑛), the nonhomogeneous part of the recurrencerelation, is of the following form

𝑔(𝑛) = 𝜇𝑛(𝑏0 + 𝑏1𝑛 + · · · + 𝑏𝑘𝑛𝑘) , (**)

where 𝑘 ∈ N, 𝜇, 𝑏0, · · · , 𝑏𝑘 are constants, and 𝜇 is a root of multiplicity 𝑀of the associated characteristic equation

𝑐𝑚𝜆𝑚 + · · · + 𝑐1𝜆 + 𝑐0 = 0 .

Then a particular solution 𝑣𝑛 of (*) should be sought in the form

𝑣𝑛 =

[︂ 𝑘∑︁𝑖=0

𝐵𝑖𝑛𝑖

]︂𝜇𝑛𝑛𝑀 = 𝜇𝑛

(︀𝐵0 + 𝐵1𝑛 + · · · + 𝐵𝑘−1𝑛

𝑘−1 + 𝐵𝑘𝑛𝑘)︀𝑛𝑀

(* * *)where constants 𝐵0, · · · , 𝐵𝑘 are to be determined from the requirementthat 𝑎𝑛 = 𝑣𝑛 should satisfy the recurrence relation (*).

Ioan Despi – AMTH140 6 of 16

Page 12: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Method of Undetermined Coefficients

𝑣𝑛 = 𝜇𝑛(︀𝐵0 + 𝐵1𝑛 + · · · + 𝐵𝑘−1𝑛

𝑘−1 + 𝐵𝑘𝑛𝑘)︀𝑛𝑀 (* * *)

Obviously, the 𝑣𝑛 in (* * *) is composed of two parts:

I 𝜇𝑛(𝐵0+𝐵1𝑛+ · · ·+𝐵𝑘𝑛𝑘) (which is of the same form of 𝑔(𝑛) in (**))

I 𝑛𝑀 , which is a necessary adjustment for the case when 𝜇, appearing in𝑔(𝑛) in (**), is also a root (of multiplicity 𝑀) of the characteristicequation of the associated homogeneous recurrence relation.

If 𝜇 is not a root of the characteristic equation, then just choose 𝑀 = 0,implying alternatively that 𝜇 is a ”root” of 0 multiplicity.

Ioan Despi – AMTH140 7 of 16

Page 13: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Method of Undetermined Coefficients

𝑣𝑛 = 𝜇𝑛(︀𝐵0 + 𝐵1𝑛 + · · · + 𝐵𝑘−1𝑛

𝑘−1 + 𝐵𝑘𝑛𝑘)︀𝑛𝑀 (* * *)

Obviously, the 𝑣𝑛 in (* * *) is composed of two parts:

I 𝜇𝑛(𝐵0+𝐵1𝑛+ · · ·+𝐵𝑘𝑛𝑘) (which is of the same form of 𝑔(𝑛) in (**))

I 𝑛𝑀 , which is a necessary adjustment for the case when 𝜇, appearing in𝑔(𝑛) in (**), is also a root (of multiplicity 𝑀) of the characteristicequation of the associated homogeneous recurrence relation.

If 𝜇 is not a root of the characteristic equation, then just choose 𝑀 = 0,implying alternatively that 𝜇 is a ”root” of 0 multiplicity.

Ioan Despi – AMTH140 7 of 16

Page 14: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Method of Undetermined Coefficients

𝑣𝑛 = 𝜇𝑛(︀𝐵0 + 𝐵1𝑛 + · · · + 𝐵𝑘−1𝑛

𝑘−1 + 𝐵𝑘𝑛𝑘)︀𝑛𝑀 (* * *)

Obviously, the 𝑣𝑛 in (* * *) is composed of two parts:

I 𝜇𝑛(𝐵0+𝐵1𝑛+ · · ·+𝐵𝑘𝑛𝑘) (which is of the same form of 𝑔(𝑛) in (**))

I 𝑛𝑀 , which is a necessary adjustment for the case when 𝜇, appearing in𝑔(𝑛) in (**), is also a root (of multiplicity 𝑀) of the characteristicequation of the associated homogeneous recurrence relation.

If 𝜇 is not a root of the characteristic equation, then just choose 𝑀 = 0,implying alternatively that 𝜇 is a ”root” of 0 multiplicity.

Ioan Despi – AMTH140 7 of 16

Page 15: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Method of Undetermined Coefficients

𝑣𝑛 = 𝜇𝑛(︀𝐵0 + 𝐵1𝑛 + · · · + 𝐵𝑘−1𝑛

𝑘−1 + 𝐵𝑘𝑛𝑘)︀𝑛𝑀 (* * *)

Obviously, the 𝑣𝑛 in (* * *) is composed of two parts:

I 𝜇𝑛(𝐵0+𝐵1𝑛+ · · ·+𝐵𝑘𝑛𝑘) (which is of the same form of 𝑔(𝑛) in (**))

I 𝑛𝑀 , which is a necessary adjustment for the case when 𝜇, appearing in𝑔(𝑛) in (**), is also a root (of multiplicity 𝑀) of the characteristicequation of the associated homogeneous recurrence relation.

If 𝜇 is not a root of the characteristic equation, then just choose 𝑀 = 0,implying alternatively that 𝜇 is a ”root” of 0 multiplicity.

Ioan Despi – AMTH140 7 of 16

Page 16: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

H1 We can also try 𝑣𝑛 = 𝜇𝑛

(︁∑︀𝑘+𝑀𝑗=0 𝐴𝑗𝑛

𝑗)︁

.

I If we rewrite 𝑣𝑛 as 𝜇𝑛 ∑︀𝑘+𝑀𝑗=𝑀 𝐴𝑗𝑛

𝑗 + 𝜇𝑛 ∑︀𝑀−1𝑗=0 𝐴𝑗𝑛

𝑗 , then

F the first part is essentially (* * *), whileF the second part is just a solution of the homogeneous problem.

I It is however obvious that 𝑣𝑛 in (* * *) is simpler than 𝑣𝑛.

Ioan Despi – AMTH140 8 of 16

Page 17: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

H1 We can also try 𝑣𝑛 = 𝜇𝑛

(︁∑︀𝑘+𝑀𝑗=0 𝐴𝑗𝑛

𝑗)︁

.

I If we rewrite 𝑣𝑛 as 𝜇𝑛 ∑︀𝑘+𝑀𝑗=𝑀 𝐴𝑗𝑛

𝑗 + 𝜇𝑛 ∑︀𝑀−1𝑗=0 𝐴𝑗𝑛

𝑗 , then

F the first part is essentially (* * *), whileF the second part is just a solution of the homogeneous problem.

I It is however obvious that 𝑣𝑛 in (* * *) is simpler than 𝑣𝑛.

Ioan Despi – AMTH140 8 of 16

Page 18: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

H1 We can also try 𝑣𝑛 = 𝜇𝑛

(︁∑︀𝑘+𝑀𝑗=0 𝐴𝑗𝑛

𝑗)︁

.

I If we rewrite 𝑣𝑛 as 𝜇𝑛 ∑︀𝑘+𝑀𝑗=𝑀 𝐴𝑗𝑛

𝑗 + 𝜇𝑛 ∑︀𝑀−1𝑗=0 𝐴𝑗𝑛

𝑗 , then

F the first part is essentially (* * *), while

F the second part is just a solution of the homogeneous problem.

I It is however obvious that 𝑣𝑛 in (* * *) is simpler than 𝑣𝑛.

Ioan Despi – AMTH140 8 of 16

Page 19: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

H1 We can also try 𝑣𝑛 = 𝜇𝑛

(︁∑︀𝑘+𝑀𝑗=0 𝐴𝑗𝑛

𝑗)︁

.

I If we rewrite 𝑣𝑛 as 𝜇𝑛 ∑︀𝑘+𝑀𝑗=𝑀 𝐴𝑗𝑛

𝑗 + 𝜇𝑛 ∑︀𝑀−1𝑗=0 𝐴𝑗𝑛

𝑗 , then

F the first part is essentially (* * *), whileF the second part is just a solution of the homogeneous problem.

I It is however obvious that 𝑣𝑛 in (* * *) is simpler than 𝑣𝑛.

Ioan Despi – AMTH140 8 of 16

Page 20: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

H1 We can also try 𝑣𝑛 = 𝜇𝑛

(︁∑︀𝑘+𝑀𝑗=0 𝐴𝑗𝑛

𝑗)︁

.

I If we rewrite 𝑣𝑛 as 𝜇𝑛 ∑︀𝑘+𝑀𝑗=𝑀 𝐴𝑗𝑛

𝑗 + 𝜇𝑛 ∑︀𝑀−1𝑗=0 𝐴𝑗𝑛

𝑗 , then

F the first part is essentially (* * *), whileF the second part is just a solution of the homogeneous problem.

I It is however obvious that 𝑣𝑛 in (* * *) is simpler than 𝑣𝑛.

Ioan Despi – AMTH140 8 of 16

Page 21: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

3 We briefly hint why 𝑣𝑛 is chosen in the form of (* * *).

I Let Δ, 𝑓(𝜆) and 𝑃𝑠(𝜆) be defined in the same way as we did in thederivation hints of the theorem in the lecture just before the previous one,and we’ll also make use of some intermediate results there.

I Recall that (*) can be written as 𝑓(Δ)𝑎𝑛 = 𝑔(𝑛) and (**) implies𝑔(𝑛) ∈ 𝑃𝑘(𝜇).

1 If 𝑓(𝜇) ̸= 0, then 𝑓(Δ)𝑃𝑘(𝜇) ⊆ 𝑃𝑘(𝜇). Hence if we try𝑣𝑛 = (𝐵0 +𝐵1𝑛+ · · ·+𝐵𝑘𝑛

𝑘)𝜇𝑛 ∈ 𝑃𝑘(𝜇), then we can derive a set ofexactly (𝑘 + 1) linear equations in 𝐵0, · · · , 𝐵𝑘, which can be used todetermine these 𝐵𝑖’s.

2 If 𝜇 is a root of 𝑓(𝜆) = 0 with multiplicity 𝑀 ≥ 1, then

𝑓(Δ)𝑃𝑀−1(𝜇) ⊆ {0} , 𝑓(Δ)𝑃𝑀+𝑘(𝜇) ⊆ 𝑃𝑘(𝜇) .

Hence if we try 𝑣𝑛 = 𝑛𝑀 (𝐵0 + · · ·+𝐵𝑘𝑛𝑘)𝜇𝑛 ∈ 𝑃𝑀+𝑘(𝜇), we’ll again have

a set of exactly (𝑘 + 1) linear equations as the coefficients of the terms𝜇𝑛, 𝜇𝑛𝑛, · · · , 𝜇𝑛𝑛𝑘. The (𝑘 + 1) constants 𝐵0, · · · , 𝐵𝑘 can thus bedetermined from these linear equations.

N

Ioan Despi – AMTH140 9 of 16

Page 22: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

3 We briefly hint why 𝑣𝑛 is chosen in the form of (* * *).I Let Δ, 𝑓(𝜆) and 𝑃𝑠(𝜆) be defined in the same way as we did in the

derivation hints of the theorem in the lecture just before the previous one,and we’ll also make use of some intermediate results there.

I Recall that (*) can be written as 𝑓(Δ)𝑎𝑛 = 𝑔(𝑛) and (**) implies𝑔(𝑛) ∈ 𝑃𝑘(𝜇).

1 If 𝑓(𝜇) ̸= 0, then 𝑓(Δ)𝑃𝑘(𝜇) ⊆ 𝑃𝑘(𝜇). Hence if we try𝑣𝑛 = (𝐵0 +𝐵1𝑛+ · · ·+𝐵𝑘𝑛

𝑘)𝜇𝑛 ∈ 𝑃𝑘(𝜇), then we can derive a set ofexactly (𝑘 + 1) linear equations in 𝐵0, · · · , 𝐵𝑘, which can be used todetermine these 𝐵𝑖’s.

2 If 𝜇 is a root of 𝑓(𝜆) = 0 with multiplicity 𝑀 ≥ 1, then

𝑓(Δ)𝑃𝑀−1(𝜇) ⊆ {0} , 𝑓(Δ)𝑃𝑀+𝑘(𝜇) ⊆ 𝑃𝑘(𝜇) .

Hence if we try 𝑣𝑛 = 𝑛𝑀 (𝐵0 + · · ·+𝐵𝑘𝑛𝑘)𝜇𝑛 ∈ 𝑃𝑀+𝑘(𝜇), we’ll again have

a set of exactly (𝑘 + 1) linear equations as the coefficients of the terms𝜇𝑛, 𝜇𝑛𝑛, · · · , 𝜇𝑛𝑛𝑘. The (𝑘 + 1) constants 𝐵0, · · · , 𝐵𝑘 can thus bedetermined from these linear equations.

N

Ioan Despi – AMTH140 9 of 16

Page 23: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

3 We briefly hint why 𝑣𝑛 is chosen in the form of (* * *).I Let Δ, 𝑓(𝜆) and 𝑃𝑠(𝜆) be defined in the same way as we did in the

derivation hints of the theorem in the lecture just before the previous one,and we’ll also make use of some intermediate results there.

I Recall that (*) can be written as 𝑓(Δ)𝑎𝑛 = 𝑔(𝑛) and (**) implies𝑔(𝑛) ∈ 𝑃𝑘(𝜇).

1 If 𝑓(𝜇) ̸= 0, then 𝑓(Δ)𝑃𝑘(𝜇) ⊆ 𝑃𝑘(𝜇). Hence if we try𝑣𝑛 = (𝐵0 +𝐵1𝑛+ · · ·+𝐵𝑘𝑛

𝑘)𝜇𝑛 ∈ 𝑃𝑘(𝜇), then we can derive a set ofexactly (𝑘 + 1) linear equations in 𝐵0, · · · , 𝐵𝑘, which can be used todetermine these 𝐵𝑖’s.

2 If 𝜇 is a root of 𝑓(𝜆) = 0 with multiplicity 𝑀 ≥ 1, then

𝑓(Δ)𝑃𝑀−1(𝜇) ⊆ {0} , 𝑓(Δ)𝑃𝑀+𝑘(𝜇) ⊆ 𝑃𝑘(𝜇) .

Hence if we try 𝑣𝑛 = 𝑛𝑀 (𝐵0 + · · ·+𝐵𝑘𝑛𝑘)𝜇𝑛 ∈ 𝑃𝑀+𝑘(𝜇), we’ll again have

a set of exactly (𝑘 + 1) linear equations as the coefficients of the terms𝜇𝑛, 𝜇𝑛𝑛, · · · , 𝜇𝑛𝑛𝑘. The (𝑘 + 1) constants 𝐵0, · · · , 𝐵𝑘 can thus bedetermined from these linear equations.

N

Ioan Despi – AMTH140 9 of 16

Page 24: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

3 We briefly hint why 𝑣𝑛 is chosen in the form of (* * *).I Let Δ, 𝑓(𝜆) and 𝑃𝑠(𝜆) be defined in the same way as we did in the

derivation hints of the theorem in the lecture just before the previous one,and we’ll also make use of some intermediate results there.

I Recall that (*) can be written as 𝑓(Δ)𝑎𝑛 = 𝑔(𝑛) and (**) implies𝑔(𝑛) ∈ 𝑃𝑘(𝜇).

1 If 𝑓(𝜇) ̸= 0, then 𝑓(Δ)𝑃𝑘(𝜇) ⊆ 𝑃𝑘(𝜇). Hence if we try𝑣𝑛 = (𝐵0 +𝐵1𝑛+ · · ·+𝐵𝑘𝑛

𝑘)𝜇𝑛 ∈ 𝑃𝑘(𝜇), then we can derive a set ofexactly (𝑘 + 1) linear equations in 𝐵0, · · · , 𝐵𝑘, which can be used todetermine these 𝐵𝑖’s.

2 If 𝜇 is a root of 𝑓(𝜆) = 0 with multiplicity 𝑀 ≥ 1, then

𝑓(Δ)𝑃𝑀−1(𝜇) ⊆ {0} , 𝑓(Δ)𝑃𝑀+𝑘(𝜇) ⊆ 𝑃𝑘(𝜇) .

Hence if we try 𝑣𝑛 = 𝑛𝑀 (𝐵0 + · · ·+𝐵𝑘𝑛𝑘)𝜇𝑛 ∈ 𝑃𝑀+𝑘(𝜇), we’ll again have

a set of exactly (𝑘 + 1) linear equations as the coefficients of the terms𝜇𝑛, 𝜇𝑛𝑛, · · · , 𝜇𝑛𝑛𝑘. The (𝑘 + 1) constants 𝐵0, · · · , 𝐵𝑘 can thus bedetermined from these linear equations.

N

Ioan Despi – AMTH140 9 of 16

Page 25: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Notes

3 We briefly hint why 𝑣𝑛 is chosen in the form of (* * *).I Let Δ, 𝑓(𝜆) and 𝑃𝑠(𝜆) be defined in the same way as we did in the

derivation hints of the theorem in the lecture just before the previous one,and we’ll also make use of some intermediate results there.

I Recall that (*) can be written as 𝑓(Δ)𝑎𝑛 = 𝑔(𝑛) and (**) implies𝑔(𝑛) ∈ 𝑃𝑘(𝜇).

1 If 𝑓(𝜇) ̸= 0, then 𝑓(Δ)𝑃𝑘(𝜇) ⊆ 𝑃𝑘(𝜇). Hence if we try𝑣𝑛 = (𝐵0 +𝐵1𝑛+ · · ·+𝐵𝑘𝑛

𝑘)𝜇𝑛 ∈ 𝑃𝑘(𝜇), then we can derive a set ofexactly (𝑘 + 1) linear equations in 𝐵0, · · · , 𝐵𝑘, which can be used todetermine these 𝐵𝑖’s.

2 If 𝜇 is a root of 𝑓(𝜆) = 0 with multiplicity 𝑀 ≥ 1, then

𝑓(Δ)𝑃𝑀−1(𝜇) ⊆ {0} , 𝑓(Δ)𝑃𝑀+𝑘(𝜇) ⊆ 𝑃𝑘(𝜇) .

Hence if we try 𝑣𝑛 = 𝑛𝑀 (𝐵0 + · · ·+𝐵𝑘𝑛𝑘)𝜇𝑛 ∈ 𝑃𝑀+𝑘(𝜇), we’ll again have

a set of exactly (𝑘 + 1) linear equations as the coefficients of the terms𝜇𝑛, 𝜇𝑛𝑛, · · · , 𝜇𝑛𝑛𝑘. The (𝑘 + 1) constants 𝐵0, · · · , 𝐵𝑘 can thus bedetermined from these linear equations.

N

Ioan Despi – AMTH140 9 of 16

Page 26: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the general solution of 𝑓(𝑛 + 2) − 6𝑓(𝑛 + 1) + 9𝑓(𝑛) = 5 × 3𝑛, 𝑛 ≥ 0.

Solution. Let 𝑓(𝑛) = 𝑢𝑛 + 𝑣𝑛, with 𝑢𝑛 being the general solution of thehomogeneous problem and 𝑣𝑛 a particular solution.

(a) Find 𝑢𝑛: The associated characteristic equation 𝜆2 − 6𝜆 + 9 = 0 has arepeated root 𝜆 = 3 with multiplicity 2. Hence the general solution of thehomogeneous problem 𝑢𝑛+2 − 6𝑢𝑛+1 + 9𝑢𝑛 = 0, 𝑛 ≥ 0 is 𝑢𝑛 = (𝐴 + 𝐵𝑛)3𝑛.

(b) Find 𝑣𝑛: Since the r.h.s. of the recurrence relation, the nonhomogeneouspart, is 5 × 3𝑛 and 3 is a root of multiplicity 2 of the characteristicequation (i.e. 𝜇 = 3, 𝑘 = 0, 𝑀 = 2), we try due to (* * *)𝑣𝑛 = 𝐵0𝜇

𝑛 × 𝑛𝑀 ≡ 𝐶𝑛23𝑛: we just need to observe that 𝐶3𝑛 is of theform 5 × 3𝑛 and that the extra factor 𝑛2 is due to 𝜇 = 3 being a doubleroot of the characteristic equation. Thus

5 × 3𝑛 = 𝑣𝑛+2 − 6𝑣𝑛+1 + 9𝑣𝑛 = 𝐶(𝑛 + 2)23𝑛+2 − 6𝐶(𝑛 + 1)23𝑛+1 + 9𝐶𝑛23𝑛

= 18𝐶3𝑛 . Hence 𝐶 =5

18and 𝑣𝑛 =

5

18𝑛23𝑛. The general solution is

𝑓(𝑛) =(︁𝐴 + 𝐵𝑛 +

5

18𝑛2

)︁3𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 10 of 16

Page 27: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the general solution of 𝑓(𝑛 + 2) − 6𝑓(𝑛 + 1) + 9𝑓(𝑛) = 5 × 3𝑛, 𝑛 ≥ 0.

Solution. Let 𝑓(𝑛) = 𝑢𝑛 + 𝑣𝑛, with 𝑢𝑛 being the general solution of thehomogeneous problem and 𝑣𝑛 a particular solution.

(a) Find 𝑢𝑛: The associated characteristic equation 𝜆2 − 6𝜆 + 9 = 0 has arepeated root 𝜆 = 3 with multiplicity 2. Hence the general solution of thehomogeneous problem 𝑢𝑛+2 − 6𝑢𝑛+1 + 9𝑢𝑛 = 0, 𝑛 ≥ 0 is 𝑢𝑛 = (𝐴 + 𝐵𝑛)3𝑛.

(b) Find 𝑣𝑛: Since the r.h.s. of the recurrence relation, the nonhomogeneouspart, is 5 × 3𝑛 and 3 is a root of multiplicity 2 of the characteristicequation (i.e. 𝜇 = 3, 𝑘 = 0, 𝑀 = 2), we try due to (* * *)𝑣𝑛 = 𝐵0𝜇

𝑛 × 𝑛𝑀 ≡ 𝐶𝑛23𝑛: we just need to observe that 𝐶3𝑛 is of theform 5 × 3𝑛 and that the extra factor 𝑛2 is due to 𝜇 = 3 being a doubleroot of the characteristic equation. Thus

5 × 3𝑛 = 𝑣𝑛+2 − 6𝑣𝑛+1 + 9𝑣𝑛 = 𝐶(𝑛 + 2)23𝑛+2 − 6𝐶(𝑛 + 1)23𝑛+1 + 9𝐶𝑛23𝑛

= 18𝐶3𝑛 . Hence 𝐶 =5

18and 𝑣𝑛 =

5

18𝑛23𝑛. The general solution is

𝑓(𝑛) =(︁𝐴 + 𝐵𝑛 +

5

18𝑛2

)︁3𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 10 of 16

Page 28: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the general solution of 𝑓(𝑛 + 2) − 6𝑓(𝑛 + 1) + 9𝑓(𝑛) = 5 × 3𝑛, 𝑛 ≥ 0.

Solution. Let 𝑓(𝑛) = 𝑢𝑛 + 𝑣𝑛, with 𝑢𝑛 being the general solution of thehomogeneous problem and 𝑣𝑛 a particular solution.

(a) Find 𝑢𝑛: The associated characteristic equation 𝜆2 − 6𝜆 + 9 = 0 has arepeated root 𝜆 = 3 with multiplicity 2. Hence the general solution of thehomogeneous problem 𝑢𝑛+2 − 6𝑢𝑛+1 + 9𝑢𝑛 = 0, 𝑛 ≥ 0 is 𝑢𝑛 = (𝐴 + 𝐵𝑛)3𝑛.

(b) Find 𝑣𝑛: Since the r.h.s. of the recurrence relation, the nonhomogeneouspart, is 5 × 3𝑛 and 3 is a root of multiplicity 2 of the characteristicequation (i.e. 𝜇 = 3, 𝑘 = 0, 𝑀 = 2), we try due to (* * *)𝑣𝑛 = 𝐵0𝜇

𝑛 × 𝑛𝑀 ≡ 𝐶𝑛23𝑛: we just need to observe that 𝐶3𝑛 is of theform 5 × 3𝑛 and that the extra factor 𝑛2 is due to 𝜇 = 3 being a doubleroot of the characteristic equation. Thus

5 × 3𝑛 = 𝑣𝑛+2 − 6𝑣𝑛+1 + 9𝑣𝑛 = 𝐶(𝑛 + 2)23𝑛+2 − 6𝐶(𝑛 + 1)23𝑛+1 + 9𝐶𝑛23𝑛

= 18𝐶3𝑛 . Hence 𝐶 =5

18and 𝑣𝑛 =

5

18𝑛23𝑛. The general solution is

𝑓(𝑛) =(︁𝐴 + 𝐵𝑛 +

5

18𝑛2

)︁3𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 10 of 16

Page 29: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the general solution of 𝑓(𝑛 + 2) − 6𝑓(𝑛 + 1) + 9𝑓(𝑛) = 5 × 3𝑛, 𝑛 ≥ 0.

Solution. Let 𝑓(𝑛) = 𝑢𝑛 + 𝑣𝑛, with 𝑢𝑛 being the general solution of thehomogeneous problem and 𝑣𝑛 a particular solution.

(a) Find 𝑢𝑛: The associated characteristic equation 𝜆2 − 6𝜆 + 9 = 0 has arepeated root 𝜆 = 3 with multiplicity 2. Hence the general solution of thehomogeneous problem 𝑢𝑛+2 − 6𝑢𝑛+1 + 9𝑢𝑛 = 0, 𝑛 ≥ 0 is 𝑢𝑛 = (𝐴 + 𝐵𝑛)3𝑛.

(b) Find 𝑣𝑛: Since the r.h.s. of the recurrence relation, the nonhomogeneouspart, is 5 × 3𝑛 and 3 is a root of multiplicity 2 of the characteristicequation (i.e. 𝜇 = 3, 𝑘 = 0, 𝑀 = 2), we try due to (* * *)𝑣𝑛 = 𝐵0𝜇

𝑛 × 𝑛𝑀 ≡ 𝐶𝑛23𝑛: we just need to observe that 𝐶3𝑛 is of theform 5 × 3𝑛 and that the extra factor 𝑛2 is due to 𝜇 = 3 being a doubleroot of the characteristic equation. Thus

5 × 3𝑛 = 𝑣𝑛+2 − 6𝑣𝑛+1 + 9𝑣𝑛 = 𝐶(𝑛 + 2)23𝑛+2 − 6𝐶(𝑛 + 1)23𝑛+1 + 9𝐶𝑛23𝑛

= 18𝐶3𝑛 . Hence 𝐶 =5

18and 𝑣𝑛 =

5

18𝑛23𝑛. The general solution is

𝑓(𝑛) =(︁𝐴 + 𝐵𝑛 +

5

18𝑛2

)︁3𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 10 of 16

Page 30: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the general solution of 𝑓(𝑛 + 2) − 6𝑓(𝑛 + 1) + 9𝑓(𝑛) = 5 × 3𝑛, 𝑛 ≥ 0.

Solution. Let 𝑓(𝑛) = 𝑢𝑛 + 𝑣𝑛, with 𝑢𝑛 being the general solution of thehomogeneous problem and 𝑣𝑛 a particular solution.

(a) Find 𝑢𝑛: The associated characteristic equation 𝜆2 − 6𝜆 + 9 = 0 has arepeated root 𝜆 = 3 with multiplicity 2. Hence the general solution of thehomogeneous problem 𝑢𝑛+2 − 6𝑢𝑛+1 + 9𝑢𝑛 = 0, 𝑛 ≥ 0 is 𝑢𝑛 = (𝐴 + 𝐵𝑛)3𝑛.

(b) Find 𝑣𝑛: Since the r.h.s. of the recurrence relation, the nonhomogeneouspart, is 5 × 3𝑛 and 3 is a root of multiplicity 2 of the characteristicequation (i.e. 𝜇 = 3, 𝑘 = 0, 𝑀 = 2), we try due to (* * *)𝑣𝑛 = 𝐵0𝜇

𝑛 × 𝑛𝑀 ≡ 𝐶𝑛23𝑛: we just need to observe that 𝐶3𝑛 is of theform 5 × 3𝑛 and that the extra factor 𝑛2 is due to 𝜇 = 3 being a doubleroot of the characteristic equation. Thus

5 × 3𝑛 = 𝑣𝑛+2 − 6𝑣𝑛+1 + 9𝑣𝑛 = 𝐶(𝑛 + 2)23𝑛+2 − 6𝐶(𝑛 + 1)23𝑛+1 + 9𝐶𝑛23𝑛

= 18𝐶3𝑛 . Hence 𝐶 =5

18and 𝑣𝑛 =

5

18𝑛23𝑛. The general solution is

𝑓(𝑛) =(︁𝐴 + 𝐵𝑛 +

5

18𝑛2

)︁3𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 10 of 16

Page 31: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

We first find the general solution 𝑢𝑛 for the homogeneous problem.

We then find a particular solution 𝑣𝑛 for the nonhomogeneous problemwithout considering the initial conditions.

Then 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 would be the general solution of the nonhomogeneousproblem.

We finally make use of the initial conditions to determine the arbitraryconstants in the general solution so as to arrive at our required particularsolution.

Ioan Despi – AMTH140 11 of 16

Page 32: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

We first find the general solution 𝑢𝑛 for the homogeneous problem.

We then find a particular solution 𝑣𝑛 for the nonhomogeneous problemwithout considering the initial conditions.

Then 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 would be the general solution of the nonhomogeneousproblem.

We finally make use of the initial conditions to determine the arbitraryconstants in the general solution so as to arrive at our required particularsolution.

Ioan Despi – AMTH140 11 of 16

Page 33: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

We first find the general solution 𝑢𝑛 for the homogeneous problem.

We then find a particular solution 𝑣𝑛 for the nonhomogeneous problemwithout considering the initial conditions.

Then 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 would be the general solution of the nonhomogeneousproblem.

We finally make use of the initial conditions to determine the arbitraryconstants in the general solution so as to arrive at our required particularsolution.

Ioan Despi – AMTH140 11 of 16

Page 34: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

We first find the general solution 𝑢𝑛 for the homogeneous problem.

We then find a particular solution 𝑣𝑛 for the nonhomogeneous problemwithout considering the initial conditions.

Then 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 would be the general solution of the nonhomogeneousproblem.

We finally make use of the initial conditions to determine the arbitraryconstants in the general solution so as to arrive at our required particularsolution.

Ioan Despi – AMTH140 11 of 16

Page 35: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

We first find the general solution 𝑢𝑛 for the homogeneous problem.

We then find a particular solution 𝑣𝑛 for the nonhomogeneous problemwithout considering the initial conditions.

Then 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 would be the general solution of the nonhomogeneousproblem.

We finally make use of the initial conditions to determine the arbitraryconstants in the general solution so as to arrive at our required particularsolution.

Ioan Despi – AMTH140 11 of 16

Page 36: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

(a) Find 𝑢𝑛: Since the associated characteristic equation𝜆4 − 5𝜆3 + 9𝜆2 − 7𝜆 + 2 = 0 has the sum of all the coefficients being zero,i.e. 1 − 5 + 9 − 7 + 2 = 0, it must have a root 𝜆 = 1. After factorising out(𝜆− 1) via 𝜆4 − 5𝜆3 + 9𝜆2 − 7𝜆 + 2 = (𝜆− 1)(𝜆3 − 4𝜆2 + 5𝜆− 2), the restof the roots will come from 𝜆3 − 4𝜆2 + 5𝜆− 2 = 0. Notice that𝜆3 − 4𝜆2 + 5𝜆− 2 = 0 can again be factorised by a factor (𝜆− 1) because1 − 4 + 5 − 2 = 0. This way we can derive in the end that the roots are

𝜆1 = 1 with multiplicity 𝑚1 = 3 , and𝜆2 = 2 with multiplicity 𝑚2 = 1 .

Thus the general solutions for the homogeneous problem is

𝑢𝑛 = (𝐴 + 𝐵𝑛 + 𝐶𝑛2)1𝑛 + 𝐷2𝑛 ,

or simply 𝑢𝑛 = 𝐴 + 𝐵𝑛 + 𝐶𝑛2 + 𝐷2𝑛 because 1𝑛 ≡ 1.

Ioan Despi – AMTH140 12 of 16

Page 37: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

(a) Find 𝑢𝑛: Since the associated characteristic equation𝜆4 − 5𝜆3 + 9𝜆2 − 7𝜆 + 2 = 0 has the sum of all the coefficients being zero,i.e. 1 − 5 + 9 − 7 + 2 = 0, it must have a root 𝜆 = 1. After factorising out(𝜆− 1) via 𝜆4 − 5𝜆3 + 9𝜆2 − 7𝜆 + 2 = (𝜆− 1)(𝜆3 − 4𝜆2 + 5𝜆− 2), the restof the roots will come from 𝜆3 − 4𝜆2 + 5𝜆− 2 = 0. Notice that𝜆3 − 4𝜆2 + 5𝜆− 2 = 0 can again be factorised by a factor (𝜆− 1) because1 − 4 + 5 − 2 = 0. This way we can derive in the end that the roots are

𝜆1 = 1 with multiplicity 𝑚1 = 3 , and𝜆2 = 2 with multiplicity 𝑚2 = 1 .

Thus the general solutions for the homogeneous problem is

𝑢𝑛 = (𝐴 + 𝐵𝑛 + 𝐶𝑛2)1𝑛 + 𝐷2𝑛 ,

or simply 𝑢𝑛 = 𝐴 + 𝐵𝑛 + 𝐶𝑛2 + 𝐷2𝑛 because 1𝑛 ≡ 1.Ioan Despi – AMTH140 12 of 16

Page 38: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of 𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.(b) Find 𝑣𝑛: Notice that the nonhomogeneous part is a constant 3 which can

be written as 3 × 1𝑛 when cast into the form of (**), and that 1 is in facta root of multiplicity 3. In other words, we have in (* * *) 𝜇 = 1, 𝑘 = 0and 𝑀 = 3. Hence we try a particular solution 𝑣𝑛 = 𝐸𝑛3 · 1𝑛 = 𝐸𝑛3. Thesubstitution of 𝑣𝑛 into the nonhomogeneous recurrence equations thengives

3 = 𝑣𝑛+4 − 5𝑣𝑛+3 + 9𝑣𝑛+2 − 7𝑣𝑛+1 + 2𝑣𝑛

= 𝐸(𝑛 + 4)3 − 5𝐸(𝑛 + 3)3 + 9𝐸(𝑛 + 2)3 − 7𝐸(𝑛 + 1)3 + 2𝐸𝑛3

= 𝐸(𝑛3 + 3𝑛2 × 4 + 3𝑛× 42 + 43) − 5𝐸(𝑛3 + 3𝑛2 × 3 + 3𝑛× 32 + 33)

+ 9𝐸(𝑛3+3𝑛2 × 2+3𝑛× 22+23) − 7𝐸(𝑛3 + 3𝑛2 × 1 + 3𝑛× 12 + 13) + 2𝐸𝑛3

= −6𝐸

i.e., 𝐸 = − 12 . Hence 𝑣𝑛 = −𝑛3

2 .

Ioan Despi – AMTH140 13 of 16

Page 39: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of 𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

(b) Find 𝑣𝑛: Notice that the nonhomogeneous part is a constant 3 which canbe written as 3 × 1𝑛 when cast into the form of (**), and that 1 is in facta root of multiplicity 3. In other words, we have in (* * *) 𝜇 = 1, 𝑘 = 0and 𝑀 = 3. Hence we try a particular solution 𝑣𝑛 = 𝐸𝑛3 · 1𝑛 = 𝐸𝑛3. Thesubstitution of 𝑣𝑛 into the nonhomogeneous recurrence equations thengives

3 = 𝑣𝑛+4 − 5𝑣𝑛+3 + 9𝑣𝑛+2 − 7𝑣𝑛+1 + 2𝑣𝑛

= 𝐸(𝑛 + 4)3 − 5𝐸(𝑛 + 3)3 + 9𝐸(𝑛 + 2)3 − 7𝐸(𝑛 + 1)3 + 2𝐸𝑛3

= 𝐸(𝑛3 + 3𝑛2 × 4 + 3𝑛× 42 + 43) − 5𝐸(𝑛3 + 3𝑛2 × 3 + 3𝑛× 32 + 33)

+ 9𝐸(𝑛3+3𝑛2 × 2+3𝑛× 22+23) − 7𝐸(𝑛3 + 3𝑛2 × 1 + 3𝑛× 12 + 13) + 2𝐸𝑛3

= −6𝐸

i.e., 𝐸 = − 12 . Hence 𝑣𝑛 = −𝑛3

2 .

Ioan Despi – AMTH140 13 of 16

Page 40: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of 𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

(c) The general solution of the nonhomogeneous problem is thus

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 = 𝐴 + 𝐵𝑛 + 𝐶𝑛2 + 𝐷2𝑛 − 𝑛

2

3.

(d) We now ask the solution in (c) to comply with the initial conditions.Initial Conditions Induced Equations Solutions

𝑎0 = 2𝑎1 = −1/2𝑎2 = −5𝑎3 = −31/2

𝐴 + 𝐷 = 2𝐴 + 𝐵 + 𝐶 + 2𝐷 = 0

𝐴 + 2𝐵 + 4𝐶 + 4𝐷 = −1𝐴 + 3𝐵 + 9𝐶 + 8𝐷 = −2

𝐴 = 3𝐵 = −2𝐶 = 1𝐷 = −1

Hence our required particular solution takes the following final form

𝑎𝑛 = 3 − 2𝑛 + 𝑛2 − 𝑛

2

3− 2𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 14 of 16

Page 41: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

Examples

Example

Find the particular solution of 𝑎𝑛+4 − 5𝑎𝑛+3 + 9𝑎𝑛+2 − 7𝑎𝑛+1 + 2𝑎𝑛 = 3 , 𝑛 ≥ 0satisfying the initial conditions 𝑎0 = 2 , 𝑎1 = − 1

2 , 𝑎2 = −5 , 𝑎3 = − 312 .

Solution.

(c) The general solution of the nonhomogeneous problem is thus

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 = 𝐴 + 𝐵𝑛 + 𝐶𝑛2 + 𝐷2𝑛 − 𝑛

2

3.

(d) We now ask the solution in (c) to comply with the initial conditions.Initial Conditions Induced Equations Solutions

𝑎0 = 2𝑎1 = −1/2𝑎2 = −5𝑎3 = −31/2

𝐴 + 𝐷 = 2𝐴 + 𝐵 + 𝐶 + 2𝐷 = 0

𝐴 + 2𝐵 + 4𝐶 + 4𝐷 = −1𝐴 + 3𝐵 + 9𝐶 + 8𝐷 = −2

𝐴 = 3𝐵 = −2𝐶 = 1𝐷 = −1

Hence our required particular solution takes the following final form

𝑎𝑛 = 3 − 2𝑛 + 𝑛2 − 𝑛

2

3− 2𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 14 of 16

Page 42: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Find the general solution of 𝑎𝑛+1 − 𝑎𝑛 = 𝑛2𝑛 + 1 for 𝑛 ≥ 0.

Solution.

(a) The general solution for homogeneous problem is 𝑢𝑛 = 𝐴 because theonly root of the characteristic equation is 𝜆1 = 1.

(b) Since 𝑛2𝑛 + 1 = 2𝑛 × 𝑛+ 1𝑛 is of the form 𝜇𝑛1 (𝑏1𝑛+ 𝑏0) + 𝜇𝑛

2 𝑐0 and 𝜇2 = 1is a simple root of the characteristic equation, we try the similar form𝑣𝑛 = 2𝑛(𝐵 + 𝐶𝑛) + 𝐷𝑛 for a particular solution. Substituting 𝑣𝑛 into therecurrence relation, we have

𝑛2𝑛 + 1 = 𝑣𝑛+1 − 𝑣𝑛= 2𝑛+1(𝐵 + 𝐶(𝑛 + 1)) + 𝐷(𝑛 + 1) − 2𝑛(𝐵 + 𝐶𝑛) −𝐷𝑛

= 2𝑛(𝐶𝑛 + 𝐵 + 2𝐶) + 𝐷 , i.e.,

2𝑛[︁(𝐶 − 1)𝑛 + (𝐵 + 2𝐶)

]︁+ (𝐷 − 1) = 0 .

In order the above equation be identically 0 for all 𝑛 ≥ 0, we require all itscoefficients to be 0, i.e., 𝐶 − 1 = 0 , 𝐵 + 2𝐶 = 0 , 𝐷 − 1 = 0. Hence𝐵 = −2, 𝐶 = 1 and 𝐷 = 1 and the particular solution 𝑣𝑛 = 2𝑛(𝑛− 2) + 𝑛.

(c) The general solution is 𝑢𝑛 + 𝑣𝑛 and thus reads

𝑎𝑛 = 2𝑛(𝑛− 2) + 𝑛 + 𝐴 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 15 of 16

Page 43: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Find the general solution of 𝑎𝑛+1 − 𝑎𝑛 = 𝑛2𝑛 + 1 for 𝑛 ≥ 0.

Solution.

(a) The general solution for homogeneous problem is 𝑢𝑛 = 𝐴 because theonly root of the characteristic equation is 𝜆1 = 1.

(b) Since 𝑛2𝑛 + 1 = 2𝑛 × 𝑛+ 1𝑛 is of the form 𝜇𝑛1 (𝑏1𝑛+ 𝑏0) + 𝜇𝑛

2 𝑐0 and 𝜇2 = 1is a simple root of the characteristic equation, we try the similar form𝑣𝑛 = 2𝑛(𝐵 + 𝐶𝑛) + 𝐷𝑛 for a particular solution. Substituting 𝑣𝑛 into therecurrence relation, we have

𝑛2𝑛 + 1 = 𝑣𝑛+1 − 𝑣𝑛= 2𝑛+1(𝐵 + 𝐶(𝑛 + 1)) + 𝐷(𝑛 + 1) − 2𝑛(𝐵 + 𝐶𝑛) −𝐷𝑛

= 2𝑛(𝐶𝑛 + 𝐵 + 2𝐶) + 𝐷 , i.e.,

2𝑛[︁(𝐶 − 1)𝑛 + (𝐵 + 2𝐶)

]︁+ (𝐷 − 1) = 0 .

In order the above equation be identically 0 for all 𝑛 ≥ 0, we require all itscoefficients to be 0, i.e., 𝐶 − 1 = 0 , 𝐵 + 2𝐶 = 0 , 𝐷 − 1 = 0. Hence𝐵 = −2, 𝐶 = 1 and 𝐷 = 1 and the particular solution 𝑣𝑛 = 2𝑛(𝑛− 2) + 𝑛.

(c) The general solution is 𝑢𝑛 + 𝑣𝑛 and thus reads

𝑎𝑛 = 2𝑛(𝑛− 2) + 𝑛 + 𝐴 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 15 of 16

Page 44: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Find the general solution of 𝑎𝑛+1 − 𝑎𝑛 = 𝑛2𝑛 + 1 for 𝑛 ≥ 0.

Solution.

(a) The general solution for homogeneous problem is 𝑢𝑛 = 𝐴 because theonly root of the characteristic equation is 𝜆1 = 1.

(b) Since 𝑛2𝑛 + 1 = 2𝑛 × 𝑛+ 1𝑛 is of the form 𝜇𝑛1 (𝑏1𝑛+ 𝑏0) + 𝜇𝑛

2 𝑐0 and 𝜇2 = 1is a simple root of the characteristic equation, we try the similar form𝑣𝑛 = 2𝑛(𝐵 + 𝐶𝑛) + 𝐷𝑛 for a particular solution. Substituting 𝑣𝑛 into therecurrence relation, we have

𝑛2𝑛 + 1 = 𝑣𝑛+1 − 𝑣𝑛= 2𝑛+1(𝐵 + 𝐶(𝑛 + 1)) + 𝐷(𝑛 + 1) − 2𝑛(𝐵 + 𝐶𝑛) −𝐷𝑛

= 2𝑛(𝐶𝑛 + 𝐵 + 2𝐶) + 𝐷 , i.e.,

2𝑛[︁(𝐶 − 1)𝑛 + (𝐵 + 2𝐶)

]︁+ (𝐷 − 1) = 0 .

In order the above equation be identically 0 for all 𝑛 ≥ 0, we require all itscoefficients to be 0, i.e., 𝐶 − 1 = 0 , 𝐵 + 2𝐶 = 0 , 𝐷 − 1 = 0. Hence𝐵 = −2, 𝐶 = 1 and 𝐷 = 1 and the particular solution 𝑣𝑛 = 2𝑛(𝑛− 2) + 𝑛.

(c) The general solution is 𝑢𝑛 + 𝑣𝑛 and thus reads

𝑎𝑛 = 2𝑛(𝑛− 2) + 𝑛 + 𝐴 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 15 of 16

Page 45: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Find the general solution of 𝑎𝑛+1 − 𝑎𝑛 = 𝑛2𝑛 + 1 for 𝑛 ≥ 0.

Solution.

(a) The general solution for homogeneous problem is 𝑢𝑛 = 𝐴 because theonly root of the characteristic equation is 𝜆1 = 1.

(b) Since 𝑛2𝑛 + 1 = 2𝑛 × 𝑛+ 1𝑛 is of the form 𝜇𝑛1 (𝑏1𝑛+ 𝑏0) + 𝜇𝑛

2 𝑐0 and 𝜇2 = 1is a simple root of the characteristic equation, we try the similar form𝑣𝑛 = 2𝑛(𝐵 + 𝐶𝑛) + 𝐷𝑛 for a particular solution. Substituting 𝑣𝑛 into therecurrence relation, we have

𝑛2𝑛 + 1 = 𝑣𝑛+1 − 𝑣𝑛= 2𝑛+1(𝐵 + 𝐶(𝑛 + 1)) + 𝐷(𝑛 + 1) − 2𝑛(𝐵 + 𝐶𝑛) −𝐷𝑛

= 2𝑛(𝐶𝑛 + 𝐵 + 2𝐶) + 𝐷 , i.e.,

2𝑛[︁(𝐶 − 1)𝑛 + (𝐵 + 2𝐶)

]︁+ (𝐷 − 1) = 0 .

In order the above equation be identically 0 for all 𝑛 ≥ 0, we require all itscoefficients to be 0, i.e., 𝐶 − 1 = 0 , 𝐵 + 2𝐶 = 0 , 𝐷 − 1 = 0. Hence𝐵 = −2, 𝐶 = 1 and 𝐷 = 1 and the particular solution 𝑣𝑛 = 2𝑛(𝑛− 2) + 𝑛.

(c) The general solution is 𝑢𝑛 + 𝑣𝑛 and thus reads

𝑎𝑛 = 2𝑛(𝑛− 2) + 𝑛 + 𝐴 , 𝑛 ≥ 0 .Ioan Despi – AMTH140 15 of 16

Page 46: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Let 𝑚 ∈ N and 𝑆(𝑛) =

𝑛∑︁𝑖=0

𝑖𝑚 for 𝑛 ∈ N. Convert the problem of finding 𝑆(𝑛)

to a problem of solving a recurrence relation.

Solution.

We first observe

𝑆(𝑛 + 1) = (𝑛 + 1)𝑚 +

𝑛∑︁𝑖=0

𝑖𝑚 = 𝑆(𝑛) + (𝑛 + 1)𝑚 .

Since the general solution will contain just 1 arbitrary constant, oneinitial condition should suffice.

Hence 𝑆(𝑛) is the solution of

𝑆(𝑛 + 1) − 𝑆(𝑛) = (𝑛 + 1)𝑚, ∀𝑛 ∈ N𝑆(0) = 0 .

Ioan Despi – AMTH140 16 of 16

Page 47: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Let 𝑚 ∈ N and 𝑆(𝑛) =

𝑛∑︁𝑖=0

𝑖𝑚 for 𝑛 ∈ N. Convert the problem of finding 𝑆(𝑛)

to a problem of solving a recurrence relation.

Solution.

We first observe

𝑆(𝑛 + 1) = (𝑛 + 1)𝑚 +

𝑛∑︁𝑖=0

𝑖𝑚 = 𝑆(𝑛) + (𝑛 + 1)𝑚 .

Since the general solution will contain just 1 arbitrary constant, oneinitial condition should suffice.

Hence 𝑆(𝑛) is the solution of

𝑆(𝑛 + 1) − 𝑆(𝑛) = (𝑛 + 1)𝑚, ∀𝑛 ∈ N𝑆(0) = 0 .

Ioan Despi – AMTH140 16 of 16

Page 48: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Let 𝑚 ∈ N and 𝑆(𝑛) =

𝑛∑︁𝑖=0

𝑖𝑚 for 𝑛 ∈ N. Convert the problem of finding 𝑆(𝑛)

to a problem of solving a recurrence relation.

Solution.

We first observe

𝑆(𝑛 + 1) = (𝑛 + 1)𝑚 +

𝑛∑︁𝑖=0

𝑖𝑚 = 𝑆(𝑛) + (𝑛 + 1)𝑚 .

Since the general solution will contain just 1 arbitrary constant, oneinitial condition should suffice.

Hence 𝑆(𝑛) is the solution of

𝑆(𝑛 + 1) − 𝑆(𝑛) = (𝑛 + 1)𝑚, ∀𝑛 ∈ N𝑆(0) = 0 .

Ioan Despi – AMTH140 16 of 16

Page 49: Solution of Linear Nonhomogeneous Recurrence Relationsmcs.une.edu.au/~amth140/Lectures/Lecture_27/Slides/slides.pdf · Solution of Linear Nonhomogeneous Recurrence Relations Ioan

ExamplesExample

Let 𝑚 ∈ N and 𝑆(𝑛) =

𝑛∑︁𝑖=0

𝑖𝑚 for 𝑛 ∈ N. Convert the problem of finding 𝑆(𝑛)

to a problem of solving a recurrence relation.

Solution.

We first observe

𝑆(𝑛 + 1) = (𝑛 + 1)𝑚 +

𝑛∑︁𝑖=0

𝑖𝑚 = 𝑆(𝑛) + (𝑛 + 1)𝑚 .

Since the general solution will contain just 1 arbitrary constant, oneinitial condition should suffice.

Hence 𝑆(𝑛) is the solution of

𝑆(𝑛 + 1) − 𝑆(𝑛) = (𝑛 + 1)𝑚, ∀𝑛 ∈ N𝑆(0) = 0 .

Ioan Despi – AMTH140 16 of 16