Originally Posted by

**zzizi** Hi

Can someone help me with this and provide a step by step response?

Suppose I have the following difference equation:

$\displaystyle u_{n}= -u_{n-1}+6u_{n-2} +7$ with

$\displaystyle u_{0} =1, u_{1} =2$

I have solved the characteristic eqn to be $\displaystyle \lambda = 2,-3$

But how do I go about solving the particular solution?

Many thanks in advance!

Hi zzizi!

Wiki explains it better than I can:

Recurrence relation - Wikipedia, the free encyclopedia

The equation in the above example was [[homogeneous differential equation|homogeneous]], in that there was no constant term. If one starts with the non-homogeneous recurrence

$\displaystyle b_{n}=Ab_{n-1}+Bb_{n-2}+K$

with constant term ''K'', this can be converted into homogeneous form as follows: The [[steady state]] is found by setting $\displaystyle b_n = b_{n-1} =b_{n-2} = b^*$ to obtain

$\displaystyle b^{*} = \frac{K}{1-A-B}$

Then the non-homogeneous recurrence can be rewritten in homogeneous form as

$\displaystyle [b_n - b^{*}]=A[b_{n-1}-b^{*}]+B[b_{n-2}-b^{*}]$

which can be solved as above.