1

Solve

$$x_{n+2} -3x_{n+1} + 2 x_n = n$$

when $x_0 = 1$ and $x_1 = 0$.

I started with the homogen solution: $$r^2 -3r +2 = 0$$

So $$x_n^h = A1^n + B2^n$$

I know that $x_n = x_n^p + x_n^h$

But I fail with the particulair solution $x_n^p$. I thought about guessing the polynom $Dn+E$, however this gives me $D + 2D - 3D = 1$ and that has no solution.

iveqy
  • 1,327
  • @YiyuanLee maybe I do, I study math in a different language than english and does not always get the translations right. The algoritm for solving a differential and a recurrence relation are still the same right? – iveqy Oct 20 '14 at 20:25
  • 1
    Try a second degree polynomial for the inhomogeneous part. – Arthur Oct 20 '14 at 20:32
  • This could be called a "difference equation" or "recurrence relation", the second one being more common perhaps. The term "differential equation" refers to an equation involving derivatives. – Antonio Vargas Oct 20 '14 at 20:48
  • @Arthur I still get the same problem but with the $n^2$ term instead. I tried with $Dn^2+En+F$ – iveqy Oct 21 '14 at 07:56

1 Answers1

0

Consider the generating function $f(t)=\sum_{n=0}^\infty x_n t^n$, which will satisfy: $$ \sum_{n=0}^\infty x_{n+2}t^n - \sum_{n=0}^\infty 3x_{n+1} t^n + \sum_{n=0}^\infty 2x_nt^n = \sum_{n=0}^\infty n t^n $$ The RHS is simply $\frac{t}{(1-t)^2}$. The LHS, however, is $$ t^{-2}(f(t)-x_1t-x_0) - 3t^{-1}(f(t)-x_0)+2f(t) $$

Putting everything together, $$ t^{-2} (f(t)-1)-3t^{-1}(f(t)-1)+2f(t)=\frac{t}{(1-t)^2} $$ $$\implies (2t-1)(t-1)f(t)=\frac{t^3}{(1-t)^2}-(3t-1) $$

Finally, $$ f(t) = - \left[ \frac{3t-1}{(2t-1)(t-1)} + \frac{t^3}{(1-t)^3}\right] = -\left[-\frac{1}{2t-1}+\frac{2}{t-1}+ \frac{t^3}{(1-t)^3}\right]$$

This last expression should easily admit its Taylor series representation by application of the infinite geometric series formula; the coefficients of $t^n$ are then your solutions $x_n$ by construction.

Jason
  • 1,518