Solving the functional equation $f(x+1) - f(x-1) = g(x)$

Given a function $g(x)$, is it possible to find a function $f(x)$ that satisfies

$$ f(x+1) - f(x-1) = g(x) $$


Pick any choice of $f$ on the interval $[-1,1)$. By using the property $f(x) = g(x-1) + f(x-2)$, you can extend this definition to $[1,3)$, and so on to the rest of the positive real line. Similarly, you can extend $f$ to the negative real line using $f(x) = f(x+2) - g(x+1)$. This is one solution to your equation.

Of course, a different choice of $f$ on $[-1,1)$ will give you a different result. This corresponds to the fact that adding any periodic function $h$ with period 2 to $f$ still satisfies the original equation. In other words, there are infinitely many solutions.

For particular restricted classes of functions, as Qiaochu alludes to, there may be a single canonical solution. For example, if $g$ is a polynomial of degree $n$, there is a unique polynomial solution for $f$. This is a polynomial of degree $n+1$, and you can find it by expanding out the original equation and comparing powers starting with the highest. A similar fact holds for exponentials and trigonometric functions (except of course when the trigonometric functions have period 2, in which case you would have to include multiples of $x \sin \pi x$ and $x \cos \pi x$ in $f$ to get a solution).


Let $f(x)=\frac{1}{2}x g(0)$ for $-1\le x \le 1$, $f(x)=g(x-1) + f(x-2)$ for $x>1$, and $f(x)=f(x+2)-g(x+1)$ for $x<-1$.


There might be something to gain by interpreting $g(x)$ as being an approximation to the derivative of $f(x)$, (barring a factor of 2). It's not really the derivative, but the centered finite-difference.