Technique
The basic technique is to multiply the equation with zN, sum over all N, recast in terms of the generating function (or derivative, etc). Then solve for the generating function, and expand to get the coefficient of zN. That will be your solution.
One very important caveat is that one must account for the initial conditions! You cannot solve for it in the end - they are part of your equation from the start!
Example
becomes:
How did I get these? Assume that if the index is negative, the value is 0. Then plug in n=1 and figure out what term to add to make the equation valid for a1, and so on.
Now multiply by zn and sum:
Solve for A(z), decompose into partial fractions, and get the solution.
Notes
- When you have constant coefficient linear equation, if your root is complex, there will be some kind of periodicity!
- If a root is -1, you’ll get some periodicity.