I would appreciate if somebody could help me with the following problem:
Find $f(x)$ ($f(x)$ is not Polynomial function), given that:
$f \colon \mathbb{R} \rightarrow \mathbb{R}$, $f$ is continuous, and $f(x+1)+f(x)=x^2$
I tried but couldn't get it that way.
It might be helpful to first find $f:\Bbb N \to \Bbb R$, then extend the result.
We can solve the recurrence relation $f(n) + f(n+1) = n^2$ via generating functions: define $F(x) = \sum_{n=0}^\infty f(n) x^n$. Then $$ f(n) + f(n+1) = n^2\\ \sum_{n=0}^\infty [f(n) + f(n+1)]x^n = \sum_{n=0}^\infty n^2 x^n \\ \sum_{n=0}^\infty f(n)x^n + \sum_{n=0}^\infty f(n+1)x^n = \sum_{n=0}^\infty n^2 x^n\\ \sum_{n=0}^\infty f(n)x^n + \sum_{n=1}^\infty f(n)x^{n-1} = \sum_{n=0}^\infty n^2 x^n\\ F(x) + \frac 1x \left(F(x) - f(0)\right) = \frac{x(x+1)}{(x-1)^3}\\ xF(x) + F(x) - f(0) = \frac{x^2(x+1)}{(x-1)^3}\\ (x+1)F(x) = \frac{x^2(x+1)}{(x-1)^3} + f(0)\\ F(x) = \frac{x^2}{(x-1)^3} + \frac{f(0)}{x+1}\\ \sum_{n=0}^\infty f(n) x^n = \sum_{n=0}^\infty \frac{n(n+1)}{2} x^n + f(0)\sum_{n=0}^\infty (-1)^n x^n $$ So setting $f(0) = a$ for any $a$, we find $$ f(n) = \frac{n(n+1)}{2} + a(-1)^n = \frac{n(n+1)}{2} + a\cos(\pi n) $$ if a solution to the problem over $\Bbb R$ exists, it must be an extension of this function for some value of $a$.
In fact, $f(x) = \frac{x(x+1)}{2} + a\cos(\pi x)$ seems to work for any $a \in \Bbb R$.
A more general solution (taken from Salomo's work) is $$ f(x) = \frac{x(x+1)}{2} + g(x) $$ where $g(x)$ satisfies $g(x+1) + g(x) = 0$.