Showing a function is a polynomial 
Problem: Let $f,g\colon \mathbb{R} \to \mathbb{R}$ be functions such that $f$ is differentiable and for every $x,h \in \mathbb{R}$ one has $f(x+h)-f(x-h)=2hg(x)$. Prove that $f$ is a polynomial of degree at most $2$.

My Attempt: As $f(x)$ is differentiable with respect to $x$ and $2hg(x)=f(x+h)-f(x-h)$, we know that $g(x)$ is differentiable with respect to $x$. Moreover, we have
$$
\begin{split}
2hg(x) &= f(x+h)-f(x-h) \\
2hg(x) &= f(x+h)-f(x)+f(x)-f(x-h) \\
2g(x) &= \frac{f(x+h)-f(x)}{h} - \frac{f(x-h)-f(x)}{h} 
\end{split}
$$
so that as $h \to 0$
$$
2g(x) =\lim_{h \to 0} \frac{f(x+h)-f(x)}{h} - \frac{f(x-h)-f(x)}{h} = f'(x)-(-f'(x))=2f'(x)
$$
This shows that $g(x)=f'(x)$. As $g(x)$ is differentiable, this shows that $f(x)$ is twice differentiable and that $g'(x)=f''(x)$. All that remains is to show that $f''(x)=g'(x)$ is constant.
However, I've tried many things and have yet to see why $g'(x)$ is constant. Any thoughts on how to do this?
 A: Differentiate $f(x+h)-f(x-h)=2hg(x)$ with respect to $h$ to get
$$
f'(x+h)+f'(x-h)=2g(x).
$$
Now  set $h=0$ to deduce that $f'(x)=g(x)$ for all $x$. Thus the (continuous) function $g=f'$ has the "harmonic function" property
$$
g(x) ={g(x+h)+g(x-h)\over 2},\qquad\forall x,h.
$$
This is enough (by continuity of $g$) to imply that $g$ affine ($g(x) = mx+b$) and so $f$ must be quadratic.
A: For arbitrary $x$ and $h$ we have
$$\eqalign{
g(x-h)+g(x+h)&=\frac1{2h}(f(x+2h)-f(x))+\frac1{2h}(f(x)-f(x-2h))\\
&=\frac2{4h}(f(x+2h)-f(x-2h))\\
&=2g(x)\\
g(x+h)-g(x)&=g(x)-g(x-h)
}$$
By induction, for all integers $n,$
$$g(x+nh)-g(x)=n(g(x+h)-g(x))$$
Now for arbitrary $y,$ apply this identity with $x=0$ and $h=y/n$:
$$g(y)=g(0)+y\frac{g(\frac y n)-g(0)}{\frac yn}$$
and the right hand side converges to $g(0)+yg'(0)$ as $n\to\infty.$ Thus $g$ is a polynomial of degree $1$.
A: You have concluded $f$ is twice differentiable.
Once we have that, we can differentiate the first equation two times with respect to $h$, to get
$$
f''(x+h)-f''(x-h)=0.
$$
Since this holds for every $x$ and $h$ we get that $f''$ is constant.
A: We use your result: Namely, that $f$ is twice differentiable.
Let $x \in \mathbb{R}$ be arbitrary, fixed. Define the function $\xi: \mathbb{R} \rightarrow \mathbb{R}$ as $\xi(h)=f(x+h)$. Then the equality says
$$\xi(h)-\xi(-h)=2hg(x).$$
Differentiating twice, we get
$$\xi''(h)-\xi''(-h)=0$$
By the chain rule, it follows that $f''(x+h)-f''(x-h)=0$ for every $x,h$.
Now, suppose $f''$ is not constant. Then, there exists $\alpha, \beta$ such that $f''(\alpha)\neq f''(\beta) \implies f''(\alpha)-f''(\beta) \neq 0$. Taking $x=\frac{\alpha+\beta}{2}$ and $h=\frac{\alpha-\beta}{2}$ yields a contradiction with the previous conclusion.
