# Thread: Methods for Inhomogeneous Difference Equations

1. ## Methods for Inhomogeneous Difference Equations

I believe that the term "inhomogeneous difference equation" describes the following problem:
$a_{n + 2} - 2a_{n + 1} + a_n = 4$ with the conditions $a_0 = 1$ and $a_1 = 2$. (This problem has no relevance to anything, I just made it up.)
====================================
TPH gave a method of solution for this.
The homogeneous version of this difference equation is
$a_{n + 2} - 2a_{n + 1} + a_n = 0$
and has the characteristic equation
$m^2 - 2m + 1 = 0$

$(m - 1)^2 = 0$

So m = 1 is a double root. Thus
$a_n = A(1)^2 + Bn(1)^2 = Bn + A$
as the homogeneous solution.

We need a particular solution. So let $a_n = C$. Then $a_{n + 2} = C$, $a_{n + 1} = C$ and substitution into the original equation gives:
$C - 2C + C = 4$
which is impossible.
====================================

Soroban also gave a method. Consider the related difference equation:
$a_{n + 3} - 2a_{n + 2} + a_{n + 1} = 4$

When we subtract the original equation
$a_{n + 2} - 2a_{n + 1} + a_n = 4$
from this we get the homogeneous difference equation:
$a_{n + 3} - 3a_{n + 2} + 3a_{n + 1} - a_n = 0$

The characteristic equation here is
$m^3 - 3m^3 + 3m - 1 = 0$

$(m - 1)^3 = 0$
and has m = 1 as a triple root. So the solution of the homogeneous equation is
$a_n = A(1)^n + Bn(1)^n + Cn^2(1)^n = Cn^2 + Bn + A$

Now we substitute this solution into the original equation:
$a_{n + 2} - 2a_{n + 1} + a_n = 4$

$[C(n + 2)^2 + B(n + 2) + A] - 2[C(n + 1)^2 + B(n + 1) + A] + [Cn^2 + Bn + A] = 4$

After a number of cancellations:
$2C = 4$

So $C = 2$.

Thus
$a_n = 2n^2 + Bn + A$

Application of the conditions $a_0 = 1$ and $a_1 = 2$ gives (respectively)
$a_0 = A = 1$ ==> $a_n = 2n^2 + Bn + 1$
and
$a_1 = 2(1)^2 + B(1) + 1 = 2$

$2 + B + 1 = 2$

$B + 3 = 2$

$B = -1$

Which implies
$a_n = 2n^2 - n + 1$ <-- This correctly defines the solution.
====================================

My question (long in coming) is why don't both of these methods work? Is there an assumption in TPH's method that makes it unviable for this specific problem? And, if so, is Soroban's the most general method?

-Dan

2. Oooh! Wait a minute!

In TPH's method we have that $a_n = Bn + A$ as a solution to the homogeneous equation. Does that mean when I want to pick a particular solution, since constant and linear terms are already part of the homogeneous solution that I need to pick $a_n = Cn^2$ as the particular solution? That would make sense with Soroban's solution...

-Dan