Problem with non-homogeneous recurrence relation

112 Views Asked by At

I am having trouble solving this recurrence relation: $$a_{n+1}=a_n+3n^2-2 \quad , \quad a_0=3$$ The solution will be $a_n=a_n^h+a_n^p$ where $a_n^h$ is the solution of the homogeneous problem and $a_n^p$ is a particular solution of the non-homogeneous problem.

I know how to solve the homogeneous problem $(a_{n+1}-a_n=0)$; its solution is $a_n^h=A$. But I am having trouble finding the particular solution for the non-homogeneous problem. Could someone help me please?

2

There are 2 best solutions below

0
On

Here, $a_{n+1}=a_n+3n^2-2 , \; a_0 = 3$

$\implies a_{n+1}-a_n=3n^2-2 \\ \implies \sum\limits_{k=0}^{n-1} a_{k+1}-a_k = \sum\limits_{k=0}^{n-1} (3k^2-2) \\ \implies a_n - a_0 = \dfrac{(n-1)n(2n-1)}{2} - 2n\\ \implies a_n = 3 + \dfrac12 n(2n^2-3n-3)$

0
On

To find the general solution of $a_{n+1}=a_n+3n^2-2$ make, as suggested, the Ansatz $a_n= c_0+c_1 n+ c_2 n^2 +c_3 n^3$ and seek the coefficients $c_0,c_1,c_2,c_3$ for this third degree polynomial.

We have

$\begin{array}{rcl} a_{n+1}&=&c_0 +c_1(n+1)+c_2(n+1)^2+c_3(n+1)^3 \\ &=& c_0+ c_1(n+1)+c_2(n^2+2n+1)+ c_3(n^3+3n^2+3n+1); \\ \Rightarrow a_{n+1}-a_n&=& c_1 + c_2(2n+1)+c_3(3n^2+3n+1) \\ &=&(c_1+c_2+c_3)+(3c_3+2c_2)n+3c_3 n^2.\\ \end{array}$

At the other hand we know that $a_{n+1}-a_n=-2+ 3n^2.$

Comparing the coefficients we get the linear system

$\begin{array}{rcl} c_1+c_2+c_3&=& -2 \\ 3c_3+2c_2&=& 0 \\ c_3 &=&1 \end{array} $

and from this $c_3=1, c_2=-3/2, c_1=-3/2.$ There remains at our disposal $c_0.$ Since we wish $a_0=3,$ we find $c_0=3.$

So the particular solution sought is

$ a_n= 3-\frac{3}{2}n-\frac{3}{2}n^2+n^3 = 3+ \frac{1}{2}n(-3-3n+2n^2) $

Addendum: Problems like these and much more complicated ones can also be solved by software for doing mathematics. For example if you use in Mathematica\copyright the command RSolve for solving recurrence relations, here in the form RSolve[{a[n + 1] == a[n] + 3 n^2 - 2 , a[0] == 3 }, a, n] , it will immediately respond with {{a -> Function[{n}, (1/2)(6 - 3n - 3n^2 + 2n^3)]}}

Books or articles on difference equations can be easily found in Wikipedia.