Computer Science, asked by swethakrishna433, 4 months ago

Solve the following recurrence relation an=2an-1+an-2-2an-3 with initial conditions a0=3 a1=6 a2=0.

Answers

Answered by Anonymous
0

Answer:

The best regards and thanks for your time and consideration and I

Answered by DeenaMathew
0

The value of C1 is -1 and the value of C2 is 3

Given:

The recurrence relation of an=2an-1+an-2-2an-3 with initial conditions a0=3 a1=6 a2=0

To Find:

To get the value of C1 and C2 using the recurrence relation

Solution:

Let us find the solution of the recurrence relation,

an=2an-1+an-2-2an-3

Let us solve the characteristic equation

k^2=k+2

=k+2 which is equivalent to

k^2-k-2=0

and hence by Vieta's formulas has the solutions

k1=-1

and k2=2.k

follows that the solution of the equation is ,

an = C1(-1)^{n} + C2 .2^n

Since ,

a0 = 2

and a1 = 7

we have that ,

2 = a_{0}=C1 +C2  and

7 = -C1 +2C2

Therefore,

C2 =3 and C1 = -1

We could conclude that,

an = (-1)^ n+1 + 3.2^n

Hence, we get the equation as an = (-1)^ n+1 + 3.2^n

#SPJ2

 

Similar questions