I have and want to solve the following difference equation:
$ x_{n+2} - 4X_n = 27n^2, x_0 = 1, x_1 = 3 $.
First, I find a solution to the homogeneous case (by solving the auxiliary equation $ (\lambda -2)(\lambda + 2) = 0 $), which is:
$ x^c_{n} = A2^n+B(-2)^n $
Then I have to "guess", what's called the particular integral on the ODE world. And as $27n^2$ is a polynomial, I guess with the generic same degree polynomial $ x^p_{n} = Cn^2+Dn+E $.
Now, I substitute $ x^p_{n} $ in the initial equation to find $ C=-9, D=-12 and E=-20 $.
Therefore, as the solution $ x_n = x^c_{n} + x^p_{n} $, we have:
$ x^n = A2^n+B(-2)^n-9n^2-12n-20 $.
We substitute in the initial conditions and get:
$ x_0 = A + B - 20 = 1 $
$ x_1 = 2A - 2B - 9 - 12 - 20 = 3 $
Which means $ A = \frac{43}{2} $ and $ B = -\frac{1}{2} $.
Therefore, the solution to this difference equation should be:
$ x_n = \frac{43*2^n}{2} - \frac{(-2)^n}{2} - 9n^2 - 12n - 20 $
But, when substituting into the initial equation it's clearly not a solution.
Where did I go wrong?