[Math] Solve the following non-homogeneous recurrence relation:

recurrence-relations

Find the solution to the following non-homogenous recurrence relation:
$a_{n+2} – 4a_{n+1} + 4a_{n} = 2^n$ for $a_0=1, a_1 = 2$.

I have found from the characteristic polynomial the general homogenous solution is:
$a_{n} = c_{1}2^n + c_{2}n2^n$ where $c_1, c_2$ are constants.

For the particular solution I think I should substitute $a_{n} = c_3n^22^n$ where $c_3$ is also a constant. However when I make that substitution I can't seem to solve the equation for $c_3$, can someone help please? Thanks

Best Answer

Don’t try to find a separate particular solution; just try the general solution

$$a_n=c_12^n+c_2n2^n+c_3n^22^n=(c_1+c_2n+c_3n^2)2^n\;.\tag{1}$$

You’ll need three data points in order to solve for all three constants, so calculate $a_2$ and then use $(1)$ and the known values of $a_0,a_1$, and $a_2$ to generate a system of three equations in the unknowns $c_1,c_2$, and $c_3$.

Related Question