Re: Differential equation

This is in fact the discrete analogue to a differential equation, called a difference equation.

Begin by searching for solutions to the associated homogeneous equation: $\displaystyle x_{n+1}-(3/2)x_n+x_{n-1}=0, n\in \mathbb{N}$

Set $\displaystyle x_n=r^n, n\in \mathbb{N}$ and substitute to obtain the quadratic $\displaystyle r^2-(3/2)r+1=0$, with solutions

$\displaystyle r_{1,2}=\frac{3}{4}\pm{\rm i}\frac{\sqrt{7}}{4}=a\pm {\rm i}b$.

The general solution to the homogeneous equation becomes $\displaystyle x_n=c_1a^n\cos(bn)+c_2a^n\sin(bn), n\in \mathbb{N}$, where the $\displaystyle c_i,i=1,2$ are constants.

Now we seek for a particular solution $\displaystyle x_n^p$ to the original equation. Since the right hand side is a quadratic polynomial in $\displaystyle n$, we can try $\displaystyle x_n^p=n^2+cn+d,$ where $\displaystyle c,d$ are to be determined by substitution.

After this is done, the general solution to the original equation is $\displaystyle x_n=c_1a^n\cos(bn)+c_2a^n\sin(bn)+n^2+cn+d, n\in \mathbb{N}$.