# Particular solution of nonhomogenous recurrence relations

$$a_n = a_{n-1} +8a_{n-2} -12a_{n-3} +25(-3)^{n-2} + 32n^2 -64$$ with $a_0 = 130, a_1 = 215, a_2 = 260$

I want to find the solution for $a_n$ and i’m not sure how to find it when it comes to finding particular solution , i have $C_1 2^n + C2n2^n + C3(-3)^n$ is solutions for homo part

What is your particular solution form for this nonhomo recurrence relation?

I have $A(-3)^{n} + Bn^2 + Cn + D$ and then tried to solve it all out and got

$a_n = -5(-3)^n + n(-3)^n +8n^2 +60n + 135$

But when i typed the recurrence relation straight into Mathematica and solved it with boundary condition, i’ve seen exponential terms which i did not see along the way solving it by hand. What’s wrong with it? This is just simple code so hope it won't be considered posted wrong place

    RSolve[a[n] ==
a[n - 1] + 8  a[n - 2] - 12 a[n - 3] + 25 (-3)^(n - 2) + 32 n^2  -
64 n, a[0] == 130, a[1] == 215, a[2] == 260, a[n],
n] // FullSimplify


Any help would be appreciated :)

• It would help to have information on the specific problem and the solution which has come as it will help to diagnose the issue - at the moment there is not enough information to see what is going wrong. – Mark Bennet May 2 '18 at 20:43
• @MarkBennet Thanks for your comment. I have edited to make it a little bit more clear. I just tried to find the solution for $a_n$ with provided boundary conditions. That’s it:) – Thy May 2 '18 at 20:51

With $B = (-3)^n,~C = n^2,~ D = n,~ E = 1$ :

$$\begin{array} {rcl} \\ a_{n} - 8 ~ a_{n - 2} + 12 ~ a_{n - 3} & = & 25 ~ B ~ (-3)^{ - 2} + 32 ~ C - 64 ~ E \\ a_{n + 1} - 8 ~ a_{n - 1} + 12 ~ a_{n - 2} & = & 25 ~ B ~ (-3)^{ - 1} + 32 ~ C + 64 ~ D - 32 ~ E \\ a_{n + 2} - 8 ~ a_{n} + 12 ~ a_{n - 1} & = & 25 ~ B ~ (-3)^{+0} + 32 ~ C + 128 ~ D + 64 ~ E \\ a_{n + 3} - 8 ~ a_{n + 1} + 12 ~ a_{n} & = & 25 ~ B ~ (-3)^{ + 1} + 32 ~ C + 192 ~ D + 224 ~ E \\ a_{n + 4} - 8 ~ a_{n + 2} + 12 ~ a_{n + 1} & = & 25 ~ B ~ (-3)^{ + 2} + 32 ~ C + 256 ~ D + 448 ~ E \end{array}$$

Use linear algebra to eliminate $B, C, D, E$ from the above equations, the result will be a linear equation of the form

$$\sum_{k} c_k a_{n + k} = 0$$

Solve that like a normal linear recurrence, note that the roots of $a_{n} - 8 ~ a_{n - 2} + 12 ~ a_{n - 3}$ will also be roots of the above equation.

For more details on how to solve this kind of problem, see https://math.stackexchange.com/a/2515913/97045 .

• This is actually a brand new way of solving nonhomo recurrence relation to me. I like new stuff. Thanks for the link you provided :) . +1 – Thy May 2 '18 at 21:48