linear nonhomogeneous recurrence...

32
Linear Nonhomogeneous Recurrence Relations Connection between Homogeneous and Nonhomogeneous Problems Ioan Despi [email protected] University of New England September 23, 2013

Upload: others

Post on 03-Jan-2020

8 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Linear Nonhomogeneous RecurrenceRelations

Connection between Homogeneous and NonhomogeneousProblems

Ioan Despi

[email protected]

University of New England

September 23, 2013

Page 2: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Outline

1 Introduction

2 Main theorem

3 Examples

4 Notes

Ioan Despi – AMTH140 2 of 12

Page 3: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Introduction

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

𝑚∑︁𝑘=0

𝑐𝑘𝑎𝑛+𝑘 = 𝑔(𝑛), 𝑐0𝑐𝑚 ̸= 0

𝑐𝑚𝑎𝑛+𝑚 + 𝑐𝑚−1𝑎𝑛+𝑚−1 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 0, 𝑛 ≥ 0 (**)

𝑚∑︁𝑘=0

𝑐𝑘𝑎𝑛+𝑘 = 0, 𝑐0𝑐𝑚 ̸= 0

The solutions of linear nonhomogeneous recurrence relations are closelyrelated to those of the corresponding homogeneous equations.

First of all, remember Corrolary 3, Section 21:

If 𝑣𝑛 and 𝑤𝑛 are two solutions of the nonhomogeneous equation (*),

then 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 , 𝑛 ≥ 0 is a solution of the homogeneous equation (**).

Ioan Despi – AMTH140 3 of 12

Page 4: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Theorem

Consider the following linear constant coefficient recurrence relation

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

and its corresponding homogeneous form

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 = 0 . (**)

If 𝑢𝑛 is the general solution of the homogeneous equation (**), and 𝑣𝑛 is anyparticular solution of the nonhomogeneous equation (*), then

𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 , 𝑛 ≥ 0

is the general solution of the nonhomogeneous equation (*).

Ioan Despi – AMTH140 4 of 12

Page 5: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Proof.

For 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, we have

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 =

𝑚∑︁𝑖=0

𝑐𝑖𝑎𝑛+𝑖 =

0‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑢𝑛+𝑖 +

𝑔(𝑛)‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑣𝑛+𝑖

= 𝑔(𝑛) ,

i.e., 𝑎𝑛 satisfies the non-homogeneous recurrence relation (*).

Since the general solution 𝑢𝑛 of the homogeneous problem has 𝑚arbitrary constants thus so is 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Hence 𝑎𝑛 is the general solution of (*).

More precisely, for any solution 𝑤𝑛 of (*), since 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 satisfies(**), 𝜙𝑛 will just be a special case of the general solution 𝑢𝑛 of (**).

Hence 𝑤𝑛 = 𝜙𝑛 + 𝑣𝑛 is included in the solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Therefore, 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 is the general solution of the nonhomogeneous

problem (*).

Ioan Despi – AMTH140 5 of 12

Page 6: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Proof.

For 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, we have

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 =

𝑚∑︁𝑖=0

𝑐𝑖𝑎𝑛+𝑖 =

0‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑢𝑛+𝑖 +

𝑔(𝑛)‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑣𝑛+𝑖

= 𝑔(𝑛) ,

i.e., 𝑎𝑛 satisfies the non-homogeneous recurrence relation (*).

Since the general solution 𝑢𝑛 of the homogeneous problem has 𝑚arbitrary constants thus so is 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Hence 𝑎𝑛 is the general solution of (*).

More precisely, for any solution 𝑤𝑛 of (*), since 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 satisfies(**), 𝜙𝑛 will just be a special case of the general solution 𝑢𝑛 of (**).

Hence 𝑤𝑛 = 𝜙𝑛 + 𝑣𝑛 is included in the solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Therefore, 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 is the general solution of the nonhomogeneous

problem (*).

Ioan Despi – AMTH140 5 of 12

Page 7: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Proof.

For 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, we have

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 =

𝑚∑︁𝑖=0

𝑐𝑖𝑎𝑛+𝑖 =

0‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑢𝑛+𝑖 +

𝑔(𝑛)‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑣𝑛+𝑖

= 𝑔(𝑛) ,

i.e., 𝑎𝑛 satisfies the non-homogeneous recurrence relation (*).

Since the general solution 𝑢𝑛 of the homogeneous problem has 𝑚arbitrary constants thus so is 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Hence 𝑎𝑛 is the general solution of (*).

More precisely, for any solution 𝑤𝑛 of (*), since 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 satisfies(**), 𝜙𝑛 will just be a special case of the general solution 𝑢𝑛 of (**).

Hence 𝑤𝑛 = 𝜙𝑛 + 𝑣𝑛 is included in the solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Therefore, 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 is the general solution of the nonhomogeneous

problem (*).

Ioan Despi – AMTH140 5 of 12

Page 8: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Proof.

For 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, we have

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 =

𝑚∑︁𝑖=0

𝑐𝑖𝑎𝑛+𝑖 =

0‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑢𝑛+𝑖 +

𝑔(𝑛)‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑣𝑛+𝑖

= 𝑔(𝑛) ,

i.e., 𝑎𝑛 satisfies the non-homogeneous recurrence relation (*).

Since the general solution 𝑢𝑛 of the homogeneous problem has 𝑚arbitrary constants thus so is 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Hence 𝑎𝑛 is the general solution of (*).

More precisely, for any solution 𝑤𝑛 of (*), since 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 satisfies(**), 𝜙𝑛 will just be a special case of the general solution 𝑢𝑛 of (**).

Hence 𝑤𝑛 = 𝜙𝑛 + 𝑣𝑛 is included in the solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Therefore, 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 is the general solution of the nonhomogeneous

problem (*).

Ioan Despi – AMTH140 5 of 12

Page 9: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Proof.

For 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, we have

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 =

𝑚∑︁𝑖=0

𝑐𝑖𝑎𝑛+𝑖 =

0‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑢𝑛+𝑖 +

𝑔(𝑛)‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑣𝑛+𝑖

= 𝑔(𝑛) ,

i.e., 𝑎𝑛 satisfies the non-homogeneous recurrence relation (*).

Since the general solution 𝑢𝑛 of the homogeneous problem has 𝑚arbitrary constants thus so is 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Hence 𝑎𝑛 is the general solution of (*).

More precisely, for any solution 𝑤𝑛 of (*), since 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 satisfies(**), 𝜙𝑛 will just be a special case of the general solution 𝑢𝑛 of (**).

Hence 𝑤𝑛 = 𝜙𝑛 + 𝑣𝑛 is included in the solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Therefore, 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 is the general solution of the nonhomogeneous

problem (*).

Ioan Despi – AMTH140 5 of 12

Page 10: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Main theorem

Proof.

For 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, we have

𝑐𝑚𝑎𝑛+𝑚 + · · · + 𝑐1𝑎𝑛+1 + 𝑐0𝑎𝑛 =

𝑚∑︁𝑖=0

𝑐𝑖𝑎𝑛+𝑖 =

0‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑢𝑛+𝑖 +

𝑔(𝑛)‖⏞ ⏟

𝑚∑︁𝑖=0

𝑐𝑖𝑣𝑛+𝑖

= 𝑔(𝑛) ,

i.e., 𝑎𝑛 satisfies the non-homogeneous recurrence relation (*).

Since the general solution 𝑢𝑛 of the homogeneous problem has 𝑚arbitrary constants thus so is 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Hence 𝑎𝑛 is the general solution of (*).

More precisely, for any solution 𝑤𝑛 of (*), since 𝜙𝑛 = 𝑤𝑛 − 𝑣𝑛 satisfies(**), 𝜙𝑛 will just be a special case of the general solution 𝑢𝑛 of (**).

Hence 𝑤𝑛 = 𝜙𝑛 + 𝑣𝑛 is included in the solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛.

Therefore, 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 is the general solution of the nonhomogeneous

problem (*).Ioan Despi – AMTH140 5 of 12

Page 11: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 1

Example

Find a particular solution of 𝑎𝑛+2 − 5𝑎𝑛 = 2 × 3𝑛 for 𝑛 ≥ 0.

Solution.

As the r.h.s. is 2 × 3𝑛, we try the special solution in the form of𝑎𝑛 = 𝐶3𝑛, with the constant 𝐶 to be determined.

The substitution of 𝑎𝑛 = 𝐶3𝑛 into the recurrence relation thus gives

𝐶 · 3𝑛+2⏟ ⏞ ‖

𝑎𝑛+2

− 5 · 𝐶 · 3𝑛⏟ ⏞ ‖𝑎𝑛

= 2 × 3𝑛 ,

i.e., 4𝐶 = 2 or 𝐶 =1

2. Hence 𝑎𝑛 =

1

2× 3𝑛 for 𝑛 ≥ 0 is a particular

solution.

Ioan Despi – AMTH140 6 of 12

Page 12: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 1

Example

Find a particular solution of 𝑎𝑛+2 − 5𝑎𝑛 = 2 × 3𝑛 for 𝑛 ≥ 0.

Solution.

As the r.h.s. is 2 × 3𝑛, we try the special solution in the form of𝑎𝑛 = 𝐶3𝑛, with the constant 𝐶 to be determined.

The substitution of 𝑎𝑛 = 𝐶3𝑛 into the recurrence relation thus gives

𝐶 · 3𝑛+2⏟ ⏞ ‖

𝑎𝑛+2

− 5 · 𝐶 · 3𝑛⏟ ⏞ ‖𝑎𝑛

= 2 × 3𝑛 ,

i.e., 4𝐶 = 2 or 𝐶 =1

2. Hence 𝑎𝑛 =

1

2× 3𝑛 for 𝑛 ≥ 0 is a particular

solution.

Ioan Despi – AMTH140 6 of 12

Page 13: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 1

Example

Find a particular solution of 𝑎𝑛+2 − 5𝑎𝑛 = 2 × 3𝑛 for 𝑛 ≥ 0.

Solution.

As the r.h.s. is 2 × 3𝑛, we try the special solution in the form of𝑎𝑛 = 𝐶3𝑛, with the constant 𝐶 to be determined.

The substitution of 𝑎𝑛 = 𝐶3𝑛 into the recurrence relation thus gives

𝐶 · 3𝑛+2⏟ ⏞ ‖

𝑎𝑛+2

− 5 · 𝐶 · 3𝑛⏟ ⏞ ‖𝑎𝑛

= 2 × 3𝑛 ,

i.e., 4𝐶 = 2 or 𝐶 =1

2. Hence 𝑎𝑛 =

1

2× 3𝑛 for 𝑛 ≥ 0 is a particular

solution.

Ioan Despi – AMTH140 6 of 12

Page 14: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 2

Example

Find a particular solution of 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4 = 6𝑛, 𝑛 ≥ 4.

Solution.

As the r.h.s. is 6𝑛, we try the similar form

𝑓𝑛 = 𝐴𝑛 + 𝐵 ,

with constants 𝐴 and 𝐵 to be determined.Hence 𝑓𝑛 be a solution requires

6𝑛 = 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4

=(︀𝐴(𝑛 + 1) + 𝐵

)︀− 2(𝐴𝑛 + 𝐵) + 3

(︀𝐴(𝑛− 4) + 𝐵

)︀= 2𝐴𝑛 + (2𝐵 − 11𝐴)

i.e.2𝐴 = 6

2𝐵 − 11𝐴 = 0⇔ 𝐴 = 3

𝐵 = 33/2

Therefore our particular solution is 𝑓𝑛 = 3𝑛 +33

2.

Ioan Despi – AMTH140 7 of 12

Page 15: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 2

Example

Find a particular solution of 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4 = 6𝑛, 𝑛 ≥ 4.

Solution.

As the r.h.s. is 6𝑛, we try the similar form

𝑓𝑛 = 𝐴𝑛 + 𝐵 ,

with constants 𝐴 and 𝐵 to be determined.

Hence 𝑓𝑛 be a solution requires

6𝑛 = 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4

=(︀𝐴(𝑛 + 1) + 𝐵

)︀− 2(𝐴𝑛 + 𝐵) + 3

(︀𝐴(𝑛− 4) + 𝐵

)︀= 2𝐴𝑛 + (2𝐵 − 11𝐴)

i.e.2𝐴 = 6

2𝐵 − 11𝐴 = 0⇔ 𝐴 = 3

𝐵 = 33/2

Therefore our particular solution is 𝑓𝑛 = 3𝑛 +33

2.

Ioan Despi – AMTH140 7 of 12

Page 16: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 2

Example

Find a particular solution of 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4 = 6𝑛, 𝑛 ≥ 4.

Solution.

As the r.h.s. is 6𝑛, we try the similar form

𝑓𝑛 = 𝐴𝑛 + 𝐵 ,

with constants 𝐴 and 𝐵 to be determined.Hence 𝑓𝑛 be a solution requires

6𝑛 = 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4

=(︀𝐴(𝑛 + 1) + 𝐵

)︀− 2(𝐴𝑛 + 𝐵) + 3

(︀𝐴(𝑛− 4) + 𝐵

)︀= 2𝐴𝑛 + (2𝐵 − 11𝐴)

i.e.2𝐴 = 6

2𝐵 − 11𝐴 = 0⇔ 𝐴 = 3

𝐵 = 33/2

Therefore our particular solution is 𝑓𝑛 = 3𝑛 +33

2.

Ioan Despi – AMTH140 7 of 12

Page 17: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 2

Example

Find a particular solution of 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4 = 6𝑛, 𝑛 ≥ 4.

Solution.

As the r.h.s. is 6𝑛, we try the similar form

𝑓𝑛 = 𝐴𝑛 + 𝐵 ,

with constants 𝐴 and 𝐵 to be determined.Hence 𝑓𝑛 be a solution requires

6𝑛 = 𝑓𝑛+1 − 2𝑓𝑛 + 3𝑓𝑛−4

=(︀𝐴(𝑛 + 1) + 𝐵

)︀− 2(𝐴𝑛 + 𝐵) + 3

(︀𝐴(𝑛− 4) + 𝐵

)︀= 2𝐴𝑛 + (2𝐵 − 11𝐴)

i.e.2𝐴 = 6

2𝐵 − 11𝐴 = 0⇔ 𝐴 = 3

𝐵 = 33/2

Therefore our particular solution is 𝑓𝑛 = 3𝑛 +33

2.

Ioan Despi – AMTH140 7 of 12

Page 18: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

Example

Find the particular solution of 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 4𝑛𝑛 with

𝑎0 = −2 , 𝑎1 = 0 , 𝑎2 = 5 .

Solution.

We first find the general solution 𝑢𝑛 for the corresponding homogeneousproblem.

Then we look for a particular solution 𝑣𝑛 for the nonhomogeneousproblem without concerning ourselves with the initial conditions.

Once these two are done, we obtain the general solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 forthe nonhomogeneous recurrence relation, and we just need to use theinitial conditions to determine the arbitrary constants in the generalsolution 𝑎𝑛 so as to derive the final particular solution.

Ioan Despi – AMTH140 8 of 12

Page 19: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

Example

Find the particular solution of 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 4𝑛𝑛 with

𝑎0 = −2 , 𝑎1 = 0 , 𝑎2 = 5 .

Solution.

We first find the general solution 𝑢𝑛 for the corresponding homogeneousproblem.

Then we look for a particular solution 𝑣𝑛 for the nonhomogeneousproblem without concerning ourselves with the initial conditions.

Once these two are done, we obtain the general solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 forthe nonhomogeneous recurrence relation, and we just need to use theinitial conditions to determine the arbitrary constants in the generalsolution 𝑎𝑛 so as to derive the final particular solution.

Ioan Despi – AMTH140 8 of 12

Page 20: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

Example

Find the particular solution of 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 4𝑛𝑛 with

𝑎0 = −2 , 𝑎1 = 0 , 𝑎2 = 5 .

Solution.

We first find the general solution 𝑢𝑛 for the corresponding homogeneousproblem.

Then we look for a particular solution 𝑣𝑛 for the nonhomogeneousproblem without concerning ourselves with the initial conditions.

Once these two are done, we obtain the general solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 forthe nonhomogeneous recurrence relation, and we just need to use theinitial conditions to determine the arbitrary constants in the generalsolution 𝑎𝑛 so as to derive the final particular solution.

Ioan Despi – AMTH140 8 of 12

Page 21: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

Example

Find the particular solution of 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 4𝑛𝑛 with

𝑎0 = −2 , 𝑎1 = 0 , 𝑎2 = 5 .

Solution.

We first find the general solution 𝑢𝑛 for the corresponding homogeneousproblem.

Then we look for a particular solution 𝑣𝑛 for the nonhomogeneousproblem without concerning ourselves with the initial conditions.

Once these two are done, we obtain the general solution 𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛 forthe nonhomogeneous recurrence relation, and we just need to use theinitial conditions to determine the arbitrary constants in the generalsolution 𝑎𝑛 so as to derive the final particular solution.

Ioan Despi – AMTH140 8 of 12

Page 22: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

(a) The associated characteristic equation 𝜆3 − 7𝜆2 + 16𝜆− 12 = 0 can beshown to admit the following roots 𝜆1 = 3, 𝑚1 = 1, (simple root),𝜆2 = 2, 𝑚2 = 2, (double root):

𝜆3 − 7𝜆2 + 16𝜆− 12 = 𝜆3 − 3𝜆2 − 4𝜆2 + 16𝜆− 12 =

𝜆2(𝜆− 3) − 4(𝜆2 − 4𝜆 + 3) = 𝜆2(𝜆− 3) − 4(𝜆− 3)(𝜆− 1) =

(𝜆− 3)(𝜆2 − 4𝜆 + 4) = (𝜆− 3)(𝜆− 2)2

I The general solutions for the corresponding homogeneous problem thusreads

𝑢𝑛 = 𝐴3𝑛 + (𝐵 + 𝐶𝑛)2𝑛, 𝑛 ≥ 0 .

I That is, 𝑢𝑛 solves 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 0.

Ioan Despi – AMTH140 9 of 12

Page 23: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

(a) The associated characteristic equation 𝜆3 − 7𝜆2 + 16𝜆− 12 = 0 can beshown to admit the following roots 𝜆1 = 3, 𝑚1 = 1, (simple root),𝜆2 = 2, 𝑚2 = 2, (double root):

𝜆3 − 7𝜆2 + 16𝜆− 12 = 𝜆3 − 3𝜆2 − 4𝜆2 + 16𝜆− 12 =

𝜆2(𝜆− 3) − 4(𝜆2 − 4𝜆 + 3) = 𝜆2(𝜆− 3) − 4(𝜆− 3)(𝜆− 1) =

(𝜆− 3)(𝜆2 − 4𝜆 + 4) = (𝜆− 3)(𝜆− 2)2

I The general solutions for the corresponding homogeneous problem thusreads

𝑢𝑛 = 𝐴3𝑛 + (𝐵 + 𝐶𝑛)2𝑛, 𝑛 ≥ 0 .

I That is, 𝑢𝑛 solves 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 0.

Ioan Despi – AMTH140 9 of 12

Page 24: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

(a) The associated characteristic equation 𝜆3 − 7𝜆2 + 16𝜆− 12 = 0 can beshown to admit the following roots 𝜆1 = 3, 𝑚1 = 1, (simple root),𝜆2 = 2, 𝑚2 = 2, (double root):

𝜆3 − 7𝜆2 + 16𝜆− 12 = 𝜆3 − 3𝜆2 − 4𝜆2 + 16𝜆− 12 =

𝜆2(𝜆− 3) − 4(𝜆2 − 4𝜆 + 3) = 𝜆2(𝜆− 3) − 4(𝜆− 3)(𝜆− 1) =

(𝜆− 3)(𝜆2 − 4𝜆 + 4) = (𝜆− 3)(𝜆− 2)2

I The general solutions for the corresponding homogeneous problem thusreads

𝑢𝑛 = 𝐴3𝑛 + (𝐵 + 𝐶𝑛)2𝑛, 𝑛 ≥ 0 .

I That is, 𝑢𝑛 solves 𝑎𝑛+3 − 7𝑎𝑛+2 + 16𝑎𝑛+1 − 12𝑎𝑛 = 0.

Ioan Despi – AMTH140 9 of 12

Page 25: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

(b) Since the r.h.s. of the nonhomogeneous recurrence relation is 4𝑛 · 𝑛 ,

which fits into the description of 4𝑛× (first order polynomial in 𝑛) ,

we’ll try a particular solution in a similar form, i.e.,

𝑣𝑛 = 4𝑛(𝐷𝑛 + 𝐸).

The substitution of 𝑣𝑛 into the original recurrence relation then gives

4𝑛 · 𝑛 = 𝑣𝑛+3 − 7𝑣𝑛+2 + 16𝑣𝑛+1 − 12𝑣𝑛

= 4𝑛+3(𝐷(𝑛 + 3) + 𝐸) − 7 × 4𝑛+2(𝐷(𝑛 + 2) + 𝐸)

+ 16 × 4𝑛+1(𝐷(𝑛 + 1) + 𝐸) − 12 × 4𝑛(𝐷𝑛 + 𝐸), i.e.,

𝑛 = 64(𝐷𝑛+ 3𝐷 + 𝐸)− 112(𝐷𝑛+ 2𝐷 + 𝐸) + 64(𝐷𝑛+𝐷 + 𝐸)− 12(𝐷𝑛+ 𝐸)

= 4𝐷𝑛+ 4𝐸 + 32𝐷 .

Hence we have

4𝐷 = 1 , 4𝐸 + 32𝐷 = 0 ⇔ 𝐷 =1

4, 𝐸 = −2

and consequently 𝑣𝑛 = 4𝑛(𝑛4 − 2) .

Ioan Despi – AMTH140 10 of 12

Page 26: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

(c) The general solution for the nonhomogeneous problem is then given by𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, i.e.

𝑎𝑛 = 4𝑛(︁𝑛

4− 2

)︁+ 𝐴3𝑛 + (𝐵 + 𝐶𝑛)2𝑛 , 𝑛 ≥ 0 .

(d) We now determine 𝐴, 𝐵, 𝐶 by the initial conditions and the use ofthe solution expression in (c)

Initial Conditions Induced Equations Solutions

𝑎0 = −2𝑎1 = 0𝑎2 = 5

𝐴 + 𝐵 − 2 = −23𝐴 + 2𝐵 + 2𝐶 − 7 = 0

9𝐴 + 4𝐵 + 8𝐶 = 29

𝐴 = 1𝐵 = −1𝐶 = 3

Finally the particular solution satisfying both the nonhomogeneousrecurrence relations and the initial conditions is given by

𝑎𝑛 = 4𝑛(︀𝑛4 − 2

)︀+ 3𝑛 + (3𝑛− 1)2𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 11 of 12

Page 27: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Example 3

(c) The general solution for the nonhomogeneous problem is then given by𝑎𝑛 = 𝑢𝑛 + 𝑣𝑛, i.e.

𝑎𝑛 = 4𝑛(︁𝑛

4− 2

)︁+ 𝐴3𝑛 + (𝐵 + 𝐶𝑛)2𝑛 , 𝑛 ≥ 0 .

(d) We now determine 𝐴, 𝐵, 𝐶 by the initial conditions and the use ofthe solution expression in (c)

Initial Conditions Induced Equations Solutions

𝑎0 = −2𝑎1 = 0𝑎2 = 5

𝐴 + 𝐵 − 2 = −23𝐴 + 2𝐵 + 2𝐶 − 7 = 0

9𝐴 + 4𝐵 + 8𝐶 = 29

𝐴 = 1𝐵 = −1𝐶 = 3

Finally the particular solution satisfying both the nonhomogeneousrecurrence relations and the initial conditions is given by

𝑎𝑛 = 4𝑛(︀𝑛4 − 2

)︀+ 3𝑛 + (3𝑛− 1)2𝑛 , 𝑛 ≥ 0 .

Ioan Despi – AMTH140 11 of 12

Page 28: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Notes1 In all the examples in this lecture, it is easy to verify that the 𝑔(𝑛)

function in (*) is in the form of

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

where 𝜇 is not a root of the associated characteristic equation.

I If this were not the case, we would have to use different forms to try forthe particular solutions.

I These will be the topics of the next lecture.2 If 𝑔(𝑛) = 𝜇𝑛

1𝑛 + 𝜇𝑛2 (3𝑛2 + 1), for instance, with 𝜇1 and 𝜇2 neither being a

root of the characteristic equation, then the particular solution

should be tried in the form

𝑣𝑛 = 𝜇𝑛1 (𝐴1𝑛 + 𝐴0) + 𝜇𝑛

2 (𝐵2𝑛2 + 𝐵1𝑛 + 𝐵0) .

3 If 𝑔(𝑛) = cos(𝛼𝑛) · 𝑛, for another instance, then we can treat it as

𝑔(𝑛) =(𝑒𝑖𝛼𝑛 + 𝑒−𝑖𝛼𝑛)

2𝑛 =

𝑛

2× 𝜇𝑛

1 +𝑛

2× 𝜇𝑛

2

in which 𝜇1 = 𝑒𝑖𝛼 and 𝜇2 = 𝑒−𝑖𝛼.Alternatively, we could try the particular solution in the form

𝑣𝑛 = sin(𝛼𝑛)(𝐴1𝑛 + 𝐴0) + cos(𝛼𝑛)(𝐵1𝑛 + 𝐵0) .

Ioan Despi – AMTH140 12 of 12

Page 29: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Notes1 In all the examples in this lecture, it is easy to verify that the 𝑔(𝑛)

function in (*) is in the form of

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

where 𝜇 is not a root of the associated characteristic equation.I If this were not the case, we would have to use different forms to try for

the particular solutions.

I These will be the topics of the next lecture.2 If 𝑔(𝑛) = 𝜇𝑛

1𝑛 + 𝜇𝑛2 (3𝑛2 + 1), for instance, with 𝜇1 and 𝜇2 neither being a

root of the characteristic equation, then the particular solution

should be tried in the form

𝑣𝑛 = 𝜇𝑛1 (𝐴1𝑛 + 𝐴0) + 𝜇𝑛

2 (𝐵2𝑛2 + 𝐵1𝑛 + 𝐵0) .

3 If 𝑔(𝑛) = cos(𝛼𝑛) · 𝑛, for another instance, then we can treat it as

𝑔(𝑛) =(𝑒𝑖𝛼𝑛 + 𝑒−𝑖𝛼𝑛)

2𝑛 =

𝑛

2× 𝜇𝑛

1 +𝑛

2× 𝜇𝑛

2

in which 𝜇1 = 𝑒𝑖𝛼 and 𝜇2 = 𝑒−𝑖𝛼.Alternatively, we could try the particular solution in the form

𝑣𝑛 = sin(𝛼𝑛)(𝐴1𝑛 + 𝐴0) + cos(𝛼𝑛)(𝐵1𝑛 + 𝐵0) .

Ioan Despi – AMTH140 12 of 12

Page 30: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Notes1 In all the examples in this lecture, it is easy to verify that the 𝑔(𝑛)

function in (*) is in the form of

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

where 𝜇 is not a root of the associated characteristic equation.I If this were not the case, we would have to use different forms to try for

the particular solutions.I These will be the topics of the next lecture.

2 If 𝑔(𝑛) = 𝜇𝑛1𝑛 + 𝜇𝑛

2 (3𝑛2 + 1), for instance, with 𝜇1 and 𝜇2 neither being aroot of the characteristic equation, then the particular solution

should be tried in the form

𝑣𝑛 = 𝜇𝑛1 (𝐴1𝑛 + 𝐴0) + 𝜇𝑛

2 (𝐵2𝑛2 + 𝐵1𝑛 + 𝐵0) .

3 If 𝑔(𝑛) = cos(𝛼𝑛) · 𝑛, for another instance, then we can treat it as

𝑔(𝑛) =(𝑒𝑖𝛼𝑛 + 𝑒−𝑖𝛼𝑛)

2𝑛 =

𝑛

2× 𝜇𝑛

1 +𝑛

2× 𝜇𝑛

2

in which 𝜇1 = 𝑒𝑖𝛼 and 𝜇2 = 𝑒−𝑖𝛼.Alternatively, we could try the particular solution in the form

𝑣𝑛 = sin(𝛼𝑛)(𝐴1𝑛 + 𝐴0) + cos(𝛼𝑛)(𝐵1𝑛 + 𝐵0) .

Ioan Despi – AMTH140 12 of 12

Page 31: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Notes1 In all the examples in this lecture, it is easy to verify that the 𝑔(𝑛)

function in (*) is in the form of

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

where 𝜇 is not a root of the associated characteristic equation.I If this were not the case, we would have to use different forms to try for

the particular solutions.I These will be the topics of the next lecture.

2 If 𝑔(𝑛) = 𝜇𝑛1𝑛 + 𝜇𝑛

2 (3𝑛2 + 1), for instance, with 𝜇1 and 𝜇2 neither being aroot of the characteristic equation, then the particular solution

should be tried in the form

𝑣𝑛 = 𝜇𝑛1 (𝐴1𝑛 + 𝐴0) + 𝜇𝑛

2 (𝐵2𝑛2 + 𝐵1𝑛 + 𝐵0) .

3 If 𝑔(𝑛) = cos(𝛼𝑛) · 𝑛, for another instance, then we can treat it as

𝑔(𝑛) =(𝑒𝑖𝛼𝑛 + 𝑒−𝑖𝛼𝑛)

2𝑛 =

𝑛

2× 𝜇𝑛

1 +𝑛

2× 𝜇𝑛

2

in which 𝜇1 = 𝑒𝑖𝛼 and 𝜇2 = 𝑒−𝑖𝛼.Alternatively, we could try the particular solution in the form

𝑣𝑛 = sin(𝛼𝑛)(𝐴1𝑛 + 𝐴0) + cos(𝛼𝑛)(𝐵1𝑛 + 𝐵0) .

Ioan Despi – AMTH140 12 of 12

Page 32: Linear Nonhomogeneous Recurrence Relationsturing.une.edu.au/~amth140/Lectures/Lecture_26/bslides.pdf · The solutions of linear nonhomogeneous recurrence relations are closely related

Notes1 In all the examples in this lecture, it is easy to verify that the 𝑔(𝑛)

function in (*) is in the form of

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

where 𝜇 is not a root of the associated characteristic equation.I If this were not the case, we would have to use different forms to try for

the particular solutions.I These will be the topics of the next lecture.

2 If 𝑔(𝑛) = 𝜇𝑛1𝑛 + 𝜇𝑛

2 (3𝑛2 + 1), for instance, with 𝜇1 and 𝜇2 neither being aroot of the characteristic equation, then the particular solution

should be tried in the form

𝑣𝑛 = 𝜇𝑛1 (𝐴1𝑛 + 𝐴0) + 𝜇𝑛

2 (𝐵2𝑛2 + 𝐵1𝑛 + 𝐵0) .

3 If 𝑔(𝑛) = cos(𝛼𝑛) · 𝑛, for another instance, then we can treat it as

𝑔(𝑛) =(𝑒𝑖𝛼𝑛 + 𝑒−𝑖𝛼𝑛)

2𝑛 =

𝑛

2× 𝜇𝑛

1 +𝑛

2× 𝜇𝑛

2

in which 𝜇1 = 𝑒𝑖𝛼 and 𝜇2 = 𝑒−𝑖𝛼.Alternatively, we could try the particular solution in the form

𝑣𝑛 = sin(𝛼𝑛)(𝐴1𝑛 + 𝐴0) + cos(𝛼𝑛)(𝐵1𝑛 + 𝐵0) .

Ioan Despi – AMTH140 12 of 12