For the recurrence :
$$ a_{n} = 3a_{n-1} - 2a_{n-2} + F(n) $$
find the particular solution when F(n) is
a) $ 2^{n} $
b) $ 2^{n}(n+1) $
c) $ 2^{n} + n+1 $
Try:
I have just finished homogeneous system and tried to cover non-homogeneous of my own.
I have found the roots of the equation and got as 1 and 2.
For part a): I have found that every relation like this will have a solution of the form
$a_{n} = a_{n}^{h} + a_{n}^{p} $ where the term with h is the solution of the homogeneous relation.
I have found $a_{n}^{h}$ . Can someone help me with the $a_{n}^{p}$ and the other 2 parts.
When $F(n)$ is an expression containing $r^n$ and $r$ is a root of the characteristic equation, a particular solution like $r^n$ will not do as it belongs to the set of homogeneous solutions. Instead, you have to make an ansatz like $nr^n$.
Let's try this for part a). We do $a_n^p = An2^n$, for some constant $A$. Substituting into the recurrence relation, we get $$An2^n = 3A(n-1)2^{n-1}-2A(n-2)2^{n-2}+2^n.$$ Dividing through by $2^{n-2}$, we get $$4An=6An-6A-2An+4A+4$$ which simplifies to $A=2$. Thus $a_n^p = n2^{n+1}$ is a particular solution. The full solution is $a_n = a_n^h+a_n^p$. Just plug in your initial conidtions (if you have any) into this expressions, to get your final solution.
In part b), try the ansatz $a_n^p = (An^2+Bn)2^n$
You should get $A=B=1$.