Find the solution of the recurrence relation $a_n=4a_{n-1}-3a_{n-2}+2^n+n+3$?

514 Views Asked by At

Using the characteristic equation $r^2=4r-3 \to r^2-4r+3=(r-3)(r-1)$ results in roots $1,3$. I show that $a_n^{(h)}=\alpha_1+\alpha_23^n$

I'm having a hard time understanding how to handle the non-homogenous part of this relation, I thought maybe I could break it into 2 parts as follows, but I'm not sure if this is correct: $$a_n^{(p1)}=c\cdot2^n=4c\cdot2^{n-1}-3c\cdot2^{n-2}+2^n$$ $$c\cdot2^2=4c\cdot2^1-3c+2^2$$ $$c=-4$$ $$a_n^{(p1)}=(-4)\cdot2^n$$ Since $1$ is a root, $F(n)=(n+3)1^n=n(np_1+p_0)$ $$a_n^{(p2)}=n^2p_1+np_0=4((n-1)^2p_1+(n-1)p_0)-3((n-2)^2p_1+(n-2)p_0)+n+3$$ $$n^2p_1+np_0=4(n^2p_1-2np_1+p_1+np_0-p_0)-3(n^2p_1-4np_1+4p_1+np_0+-2p_0)+n+3$$ $$0=-8np_1+12np_1+n+4p_1-12p_1-4p_0+6p_0+3$$ $$n(4p_1+1)+(3-8p_1+2p_0)$$ Solving for $p_1=-\frac{1}{4}$, $p_0=-\frac{5}{2}$

Therefore $a_n=a_n^{(h)}+a_n^{(p1)}+a_n^{(p2)}$? $$a_n=\alpha+\alpha_23^n-4\cdot2^n-n(\frac{n}{4}+\frac{5}{2})$$

1

There are 1 best solutions below

5
On

At first solve the homogeneous equation $$a_n=4a_{n-1}-3a_{n-2}$$ by the ansatz $$a_n=q^n$$