Recursive sequences general term

245 Views Asked by At

Find general term for nth term of the sequence $$a_{n+2}=a_{n+1}+a_n+n^2, a_1=1, a_2=2$$ How to approach this type of questions? I am looking for a specific answer but also more general insight about solving such questions would be appreciated.

2

There are 2 best solutions below

0
On

I probably made some error computing this but the general approach can help $$a_{n+2}=a_{n+1}+a_n+n^2\\a_{n+1}=a_n+a_{n-1}+(n-1)^2\\a_{n+2}-a_{n+1}=a_{n+1}-a_{n-1}+2n-1\\a_{n+2}=2a_{n+1}-a_{n-1}+2n-1\\a_{n+1}=2a_n-a_{n-2}+2n-3\\a_{n+2}-a_{n+1}=2a_{n+1}-2a_n-a_{n-1}+a_{n-2}+2\\a_{n+2}=3a_{n+1}-2a_n-a_{n-1}+a_{n-2}+2\\a_{n+1}=3a_n-2a_{n-1}-a_{n-2}+a_{n-3}+2\\a_{n+2}-a_{n+1}=3a_{n+1}-5a_n+a_{n-1}+2a_{n-2}-a_{n-3}\\a_{n+2}=4a_{n+1}-5a_n+a_{n-1}+2a_{n-2}-a_{n-3}$$ Hence you can do the characteristic equation now

2
On

Hint: The general solution is the sum of the solution of the corresponding homogeneous equation $a_{n+2}=a_{n+1}+a_n$ and a partial solution which you may looking in the form of a polynomial of degree $2$ with uncnown coefficients.

The situation is very close to solution of the linear differental equations.