Recursive function guess y <mrow class="MJX-TeXAtom-ORD"> n + 2

Taniyah Estrada

Taniyah Estrada

Answered question

2022-06-17

Recursive function guess
y n + 2 3 y n + 1 + 2 y n = 5
I am having trouble with getting the right guess because the right side of the function is a constant. How do I get the right guess? I need to find the general solution

Answer & Explanation

pyphekam

pyphekam

Beginner2022-06-18Added 27 answers

Step 1
It is worth noting that the method of generating functions does not require a guess. Let f ( z ) = n = 0 y n z n be the ordinary generating function. Then the recurrence implies that
n = 0 ( y n + 2 3 y n + 1 + 2 y n ) z n + 2 = n = 0 5 z n + 2 .
So ( f ( z ) y 0 z 0 y 1 z 1 ) 3 z ( f ( z ) y 0 z 0 ) + 2 z 2 f ( z ) = 5 z 2 1 z .
Solving for f(z) yields
f ( z ) = 5 z 2 1 z + y 0 + y 1 z 3 y 0 z 1 3 z + 2 z 2 = 5 z 2 + ( 1 z ) ( y 0 + y 1 z 3 y 0 z ) ( 1 z ) 2 ( 1 2 z ) = A ( 1 z ) 2 + B 1 z + C 1 2 z = A n = 0 ( n + 1 1 ) z n + B n = 0 z n + C n = 0 ( 2 z ) n ,
which immediately yields general solution
y n = A ( n + 1 ) + B + C 2 n ..
If you prefer, replace the A + B with a constant D:
y n = A n + D + C 2 n ..
Step 2
Solving the linear system
A 0 + D + C 2 0 = y 0 A 1 + D + C 2 1 = y 1 A 2 + D + C 2 2 = y 2 = 5 + 3 y 1 2 y 0
for (A,D,C) in terms of y 0 and y 1 yields
A = 5 D = 2 y 0 y 1 5 C = y 0 + y 1 + 5

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Discrete math

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?