Homework help with Non-homogeneous Recurrence Relations

97 Views Asked by At

I solved this problem but am not super confident with my methods, if someone could take a look at it and tell me if it looks okay, that would be great.

Solve the following non-homogeneous recurrence relation

$a_{n}=2a_{n-1}+(-1)^{n}$

$a_{0}=2$

Homogeneous part

$h_{n}=2h_{n-1}$

$x=2$

$h_{n}=α(2)^{n}$

Find the constant

$a_{n}=c(-1)^{n}$

$a_{n-1}=c(-1)^{n-1}$

$c(-1)^{n}=c(-1)^{n-1}+(-1)^{n}$

$c(-1)^{1}=c(-1)^{0}+(-1)^{1}$

$-c=c-1$

$2c=1$

$c=\frac{1}{2}$

Solve for α using initial condition

$a_{n}=α(2)^{n}+\frac{1}{2}(-1)^{n}$

$2=α(2)^{0}+\frac{1}{2}(-1)^{0}$

$2=2α+\frac{1}{2}$

$\frac{3}{2}=2α$

$α=\frac{3}{4}$

$a_{n}=\frac{3}{4}(2)^{n}+\frac{1}{2}(-1)^{n}$

Thanks in advance for any help!

1

There are 1 best solutions below

4
On BEST ANSWER

Let us look first for a particular solution, of the form $k(-1)^n$. Substituting, we find that $k(-1)^n =2k(-1)^{n-1}+(-1)^n$. Divide by $(-1)^n$. We get $k=-2k+1$, and therefore $k=\frac{1}{3}$.

A solution of the homogeneous equation is $2^n$, so the general solution of the homogeneous equation is $A\cdot 2^n$, and therefore the general solution of the inhomogeneous equation is $$a_n=A\cdot 2^n +\frac{1}{3}(-1)^n.$$ Finally, find $A$ so that the initial condition is satisfied.