Find all function such that : $f(x+1)=x^{3}-f(x-1)$. Find all function $f : \mathbb{R}\to\mathbb{R}$ such that for any $x$ real number the following functional equation holds: 
$$\begin{cases} f(x+1)=x^{3}-f(x-1)\,,\\ f(0)=2\,,\\f(-1)=0\,.\end{cases}$$
I saw this problem in one of the pdf presented unresolved, but the result is given :
$$f(x)=\frac{x(x^{2}-3)}{2}+\sin \left(\frac{πx}{2}\right)+2\cos \left(\frac{πx}{2}\right)$$
But I don't know how I solve it ?
I have no idea how to start ?
 A: Let $g(x):=f(x)-\dfrac{x(x^2-3)}{2}$ for all $x\in\mathbb{R}$.  Then, we see that
$$g(x+1)+g(x-1)=0$$
for all $x\in\mathbb{R}$.  If $h(x):=(-1)^{\left\lfloor\frac{x}{2}\right\rfloor}\,g(x)$ for each $x\in\mathbb{R}$, then $h$ is periodic with period $2$.  Consequently,
$$f(x)=\dfrac{x(x^2-3)}{2}+(-1)^{\left\lfloor\frac{x}{2}\right\rfloor}\,h(x)\,,$$
where $h:\mathbb{R}\to\mathbb{R}$ is periodic with period $2$.  There are infinitely many such functions $h$ even if you honor the conditions  $f(0)=2$ and $f(-1)=0$.  These extra requirements will only mean that $h(0)=2$ and $h(1)=h(-1)=1$.  
Even if you want $f$ to be analytic, this would mean
$$f(x)=\dfrac{x(x^2-3)}{2}+\sum_{k=1}^\infty\,\Biggl(a_k\,\cos\left(\frac{(2k-1)\pi x}{2}\right)+b_k\,\sin\left(\frac{(2k-1)\pi x}{2}\right)\Biggr)\,,$$
where $(a_k)_{k=1}^\infty$ and $(b_k)_{k=1}^\infty$ are sequences of real numbers that satisfy $$\limsup\limits_{k\to\infty}\,\big(|a_k|+|b_k|\big)^{\frac1k}<1$$ (see here).  With your conditions $f(0)=2$ and $f(-1)=0$, you need
$$\sum_{k=1}^\infty\,a_k=2\text{ and }\sum_{k=1}^\infty\,(-1)^k\,b_k=-1\,.$$  Clearly, there are uncountably many ways to fulfill these conditions.
A: $$f(x+1)+f(x-1}=x^3~~~~(1)$$
$$\implies  $f(x)=Ax^3+Bx^2+Cx+D$$ 
Then from (1), we can write
$$f(x+1)+f(x-1)=2ax^3+2bx^2+x(2c+6a)+2b+2d=x^3$$
comparing the coefficients of various powers od $x$, we gey
$a=1/2m b=0, c--3/2, d-0$, so the particular solution of (1) is
$$f_p(x)=x^3/2-3x/2~~~(2)$$
For the homogeneous part $$f(x+1)+f(x-1)=0$$, take $f(x)=t^x$, then
you get $t=\pm i$, the the general solution is given by
$$f_g(x)=C_1 (i)^x+C_2 (-i)^x=C_1 e^{i\pi x/2}+ C_2 e^{-i\pi x/2}=D_1 \sin (\pi x/2)+ D_2 \cos(\pi x/2).$$ Finally, the total solution is
$$f(x)=D_1 \sin(\pi x/2)+ D_2 \cos(\pi x/2)+x^3/2-3x/2$$
