Linear non-homogeneous recurrence relation $a_n-3a_{n-1}+2a_{n-2}=3^n-2$

416 Views Asked by At

For solving $$a_n-3a_{n-1}+2a_{n-2}=3^n-2,$$ I tried as follows:

For the homogeneous part the characteristics equation is : $r^2-3r+2=0\implies r=1,2$. So, $$ a_n^h=A(1)^n+B(2)^n=A+B2^n $$ Now how will I guess the particular solution?

For that also, I tried with $a_n=C3^n+D$ but did not get anything. Please help me.

2

There are 2 best solutions below

0
On BEST ANSWER

You are in the right direction:

  • For the $3^n$ with $a_n=C 3^n$ you obtain: $$a_n-3a_{n-1}+2a_{n-2}=C(3^n-3 3^n+23^{n-2})=\frac{2 C}{9} 3^n$$ so with $C=\frac{9}{2}$ you obtain $3^n$.
  • For the $-2 \times (-1)^n$ the problem is the following: $1^n$ is already a solution of the homogeneous equation.

Similarly to the method for finding particular solution for ODE, you can search a particular solution as $a_n=D \times n \times 1^n$: $$a_n-3a_{n-1}+2a_{n-2}=D(n-3(n-1)+2(n-2)) =-D$$ so $D=2$.

Finally by linearity: $$a_n=\frac{9}{2} 3^n+2 n$$ is a particular solution.

0
On

Solve:$$u_n=3u_{n-1}-2u_{n-2}+3^n-2$$

The homogenous solution is given by$$u_{n}^{(h)}=3u_{n-1}-2u_{n-2}$$Its characteristic equation is then equal to$$r^2-3r+2=0\qquad\qquad r=1,2$$Hence, the solution for the homogenous portion is$$u_{n}^{(h)}=C_1+C_22^n$$The particular solution is found by taking the general form of the second half of our recurrence. However, note that since we already have a constant, namely $C_1$ in our homogeneous solution, we have to multiply every term by $n$ to get$$u_{n}^{(p)}=C_3n3^n+C_4n$$Substitute that back into the original recurrence to get$$C_3n3^n+C_4n=C_3(n-1)3^n+3C_4(n-1)-2C_3(n-2)3^{n-2}-2C_4(n-2)+3^n-2$$Substitute any value of $n$, preferably $n=0$ and $n=1$ into the equation to solve for $C_3$ and $C_4$. The complete solution is found by adding the homogeneous and particular solutions together$$u_n=u_{n}^{(h)}+u_{n}^{(p)}$$