Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I am trying to help a friend of mine solve

$$ a_n + 5 a_{n-1} + 6 a_{n-2} = 12n - 2(-1)^n$$

Now the homogenous solution is easy to find, and one just needs to solve the equation $r^2 + 5r + 6 = 0$ Which has roots $r=-2$ and $r-3$, so the homogenous solution is

$$A (-2)^n + B (-3)^n$$

Which can be confirmed by putting it into the equation. Now usually I would guess that the particular solution was on the form

$$h_p = (An + B) + C(-1)^n$$

but this is clearly wrong, is there any other way to find the solution of the equation ?

share|improve this question
    
In fact it is not so simple to guess the form of the particular solution for the inhomogenous term $(-1)^n$ : wolframalpha.com/input/… –  doraemonpaul Oct 1 '12 at 18:28
2  
What's clearly wrong about it? It seems to work for $A=1$, $B=17/12$, and $C=-1$. –  mjqxxxx Oct 1 '12 at 19:06
    
And in what whay is that equal to $12n - 2(-1)^n$ ? –  N3buchadnezzar Oct 1 '12 at 19:16
add comment

1 Answer

up vote 3 down vote accepted

What you assumed for the particular solution is correct. However, if you do not want to deal with inhomogeneous difference equations and guessing your particular solution, then you can use the following technique to transform it to a homogeneous difference equation. Another efficient technique is the Z-transform technique.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.