## Difference equation.

Find the solution to:

$x_{n+1}-4x_n+3x_{n-1}=36n^2$
There are initial conditions to but once I get the general solution i'll be away!

The auxiliary equation is:

$k^2-4k+3=0$
$(k-3)(k-1)=0$
$k=3 \ \ k=1$

Hence $x_n=A(3^n)+B(1^n)=A(3^n)+B$

This is for the homoegeneous case so now we need to find a part that gives $36n^2$ on the RHS.

Let $x_n=Dn^2+En+F$

Then:

$D(n+1)^2+E(n+1)+F-4Dn^2-4En-4F+3D(n-1)^2+3E(n-1)+3F=36n^2$

Unfortunately this gives:

$n^2(D-4D+3D)+n(2D+E-4E-6D+3E)+D+E+F-4F+3D-3E+3F=36n^2$

$n(-4D)+4D-2E=36n^2$

Everything comes out zero. I can't see what i'm doing wrong here, the fact all the constants are zero suggests that the equation I am trying (ie. $Dn^2+En+C)$ is wrong but i'm not sure what I can change it into.