Solve the recurrence relation $a_n = -a_{n-1} + n^2,\ n \geq 1$, $a_{0}$ = 3

991 Views Asked by At

I am trying to solve the recurrence relation $a_n = -a_{n-1} + n^2$ where $n \geq 1$, $a_{0} = 3$.

I have the first few terms of the sequence

$a_1= -2,\quad a_2=6,\quad a_3=3,\quad a_4=13,\quad \dots$

however after this point I am a little lost as to what I should do next, as I cant find a pattern in this sequence and am unsure what the characteristic equation would look like. Would anyone care to give me any hints as to what the next step would be? Thanks in advance.

1

There are 1 best solutions below

6
On

The alternating character of this sequence suggests dealing with two steps at a time. So let's consider \begin{align*}a_{n+1}&=-a_{n}+(n+1)^2\\&=-(-a_{n-1}+n^2)+(n+1)^2\\&=a_{n-1}+(n+1)^2-n^2\\&=a_{n-1}+2n+1.\end{align*}

Can you take it from here?


To finish things up: let's consider even terms first:

\begin{align*}a_{2n}&=a_{2(n-1)}+2(2n)-1\\ &=a_{2(n-2)}+2(2(n-1))-1+2(2n)-1\\ &=\dots\\ &=a_0+4\sum_{k=1}^{n}k-\sum_{k=1}^{n}1\\ &=a_0+4\cdot \frac{n\cdot (n+1)}{2}-n\\ &= 2n^2+n+a_0 \end{align*} and lastly $$a_{2n+1}=-a_{2n}+(2n+1)^2=-(2n^2+n+a_0)+(2n+1)^2=2n^2+3n+1-a_0$$