Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have been given this difference equation and asked to solve it:

$$y_{n+2} + 2y_{n+1} -3y_{n} = 5 \cdot 2^n + 12$$

where $y_{0} = 7$ and $y_{1} = -9$

I know it sounds weird but we have never actually been taught difference equations. I've looked on the internet and from what I've read i think it's a second order equation but apart from that I have no idea where to even start. Can anyone help me?

share|cite|improve this question

Follow Wilf's "generatingfunctionology". Define the ordinary generating function: $$ Y(z) = \sum_{n \ge 0} y_n z^n $$ Using the properties of the generating function: $$ \begin{align*} \frac{Y(z) - y_0 - y_1 z}{z^2} + 2 \frac{Y(z) - y_0}{z} - 3 Y(z) &= 5 \cdot \frac{1}{1 - 2 z} + 12 \cdot \frac{1}{1 - z} \\ Y(z) &= \frac{1}{1 - 2 z} - 2 \cdot \frac{1}{1 - z} + 3 \cdot \frac{1}{(1 - z)^2} + 5 \cdot \frac{1}{1 + 3 z} \end{align*} $$ Thoses are mostly geometric series: $$ \begin{align*} y_n &= 2^n - 2 + 3 \binom{-2}{n} + 5 \cdot (-3)^n \\ &= 2^n + 5 \cdot (-3)^n + 3 n + 1 \end{align*} $$

share|cite|improve this answer

Start by solving homogenous equation $y_{n+2}+2y_{n+1}-3y_n=0$. To do so, write the characteristic polynomial (it will also be of order two), and its roots $\lambda_1$ and $\lambda_2$ will give you the idea of the answer, $y_n= c_1(\lambda_1)^n+c_2(\lambda_2)^n +$ something, which can be guessed from the expression on the RHS. The initial conditions are used to identify the coefficients.

share|cite|improve this answer

Your Answer


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.