1

please help me solve this recursive relation :

$$a_n-2a_{n-1}+a_{n-2} = n-2,$$ $$ a_0 = 1, a_1 = 2, n\geq 2$$ looks like non homogenous function but I can't reach to answer.

amWhy
  • 209,954
sajjad
  • 523

2 Answers2

1

Two things to recognize: $$ a_n - 2a_{n-1} + a_{n-2} = \Delta^2 a $$ (the second difference operator), and the equation is linear in $a$ so that you can add separate answers for $n$ and $-2$ on the right.

Also, summation behaves like integration, using "rising powers" instead of just powers (see Concrete Mathematics by Knuth et al). Then:

$$ \Delta^2 a = n \Longrightarrow a_n = \frac{n^{\overline 3} }{6} = \frac{n(n+1)(n+2)}{6} $$ $$ \Delta^2 a = -2 \Longrightarrow a_n = -2\frac{n^{\overline 2} }{6} = -n(n+1) $$ Finally, $\Delta^2 (\alpha n + \beta) = 0$.

So the solution will be of the form $$ a_n = \frac{n^3-3n^2-4n}{6} + \alpha n + \beta$$

(The $4n$ term could be absorbed into $\alpha n$.)

Use $a_0 = 1$ to find $\beta = 1$, and then use $a_1 = 2$ to find $\alpha$. The answer is

$$ a_n = \frac{n^3-3n^2+8n+6}{6} $$

Mark Fischler
  • 41,743
0

Let $y_n=a_n-a_{n-1}$, then $y_n-y_{n-1}=n-2$ and $y_1=1$. You can get $$ \sum_{k=2}^n y_k-y_{k-1}=\sum_{k=2}^n (k-2)=\frac{(n-2)(n-3)}{2}=y_n-y_1. $$ Thus, you can solve $y_n$, use the same trick to solve $a_n$.

enigne
  • 813
  • This is exactly what I gave him in my comment! Good job. – Mhenni Benghorbal Dec 28 '14 at 19:49
  • Can You please explain me exactly what happens on particular solution of this example , That's were I'm confused... – sajjad Dec 28 '14 at 19:52
  • $$a_{n}-2a_{n-1}+a_{n-2}=n-2\t^2-2t+1=0\t=1,1\a_{n}=a(1^n)+b(n)(1^n)\$$ apply $$a_{n}=An^2+Bn+C$$ to find particular solution – Khosrotash Dec 28 '14 at 19:57
  • thank you Darya.You are so close to realize what makes me feel confused , your comment is homogenous part of this relation(a(h)). But (as far as I know) if you keep going on there will be a particular solution (a(p)) which looks a little weird... – sajjad Dec 28 '14 at 20:08