Particular solution of a recurrence relation

94 Views Asked by At

I would like to find the particular solution the following recurrence relation.

$$a_{n}-a_{n-1} = 2(n-1), a_0 = 2$$

By inspection, we would try with $a_n^{(p)} = Bn+C$. When substituting this in the recurrence relation we get

$$Bn+C = B(n-1)+C+2(n-1)$$

and this implies $B=B+2$, which is absurd. What's wrong with this?

Sorry, if this question is answered before.

1

There are 1 best solutions below

2
On BEST ANSWER

If you use that method, you’ll need to look for a quadratic solution, not a linear solution. However, there are easier ways. Notice that if you add consecutive differences of the form $a_{k+1}-a_k$, they telescope. For instance,

$$(a_3-a_2)+(a_2-a_1)+(a_1-a_0)=a_3-a_0\;.$$

Thus,

$$\begin{align*} a_n-a_0&=(a_n-a_{n-1})+(a_{n-1}-a_{n-2})+(a_{n-2}-a_{n-3}+\ldots+(a_1-a_0)\\ &=\sum_{k=0}^{n-1}(a_{k+1}-a_k)\\ &=\sum_{k=0}^{n-1}2k\\ &=2\sum_{k=0}^{n-1}k\;, \end{align*}$$

and from there it’s straightforward to get a closed form for $a_n$.