Prove that for if for every $n \in \mathbb N$ and $x\in \mathbb R$ and $f'(x) = \frac{f(x+m)-f(x)}{m}$, then $f$ is linear affine. "
Prove that for $f:\mathbb R \to \mathbb R$ differenciable. If for every $m \in \mathbb N$ and $x\in \mathbb R$, and $f'(x) = \frac{f(x+m)-f(x)}{m}$. Then $f$ is linear affine."
This question appeared in one of my exams. I wasn't able to solve it back then. Now, I'm trying to solve it again, but I have been able to prove only for every $x \in \mathbb Z$.
Here is what I've done so far. For $n \in \mathbb N$,
$$
f'(0) = \frac{f(n) - f(0)}{n} \implies f'(0) n + f(0) = f(n).
$$
Hence, $\forall x \in \mathbb N, f(x) = f'(0) \cdot x + f(0)$ is linear affine.
Now, for a negative integer, we have
$$
f'(-n) = \frac{f(0) - f(-n)}{n}\implies f(-n) = -f'(-n)n + f(0)
$$
$$
f'(-n) = \frac{f(n)-f(-n)}{2n}\implies f(-n) = f(n) -2n f'(-n) = f'(0)n+f(0)-2nf'(-n)
$$
Therefore, $f'(0) n = f'(-n)n \implies f'(0) = f'(-n)$, which give us that $f$ is linear affine for every integer.
This is how far I went.
 A: Let $x$ be an arbitrary real number.
We see that $f(x + 1) - f(x) = \frac{f(x + 1) - f(x)}{1} = f'(x) = \frac{f(x + 2) - f(x)}{2}$.
Thus, we have $2(f(x + 1) - f(x)) = f(x + 2) - f(x)$. Then $f(x + 2) - f(x + 1) = f(x + 1) - f(x)$.
In particular, this means that $f'(x + 1) = f(x + 2) - f(x + 1) = f(x + 1) - f(x) = f'(x)$.
Now note that $f''(x) = \frac{f'(x + 1) - f'(x)}{1} = 0$.
So for all $x$, $f''(x) = 0$.
Therefore, $f$ is affine linear.
A: Let me write it as an expanded hint, hopefully useful for anyone interested in the problem.

*

*$f$ is linear affine on $\mathbb{Z}$ (this is what you already have)

*$f$ is linear affine on any set of the form $x+\mathbb{Z}$ (your proof shows that as well)

*$f'$ is bounded on $[0,1]$, and hence also bounded globally

*if $f$ had different slopes when restricted to $\mathbb{Z}$ and $x+\mathbb{Z}$, $f'(x)$ would have to be very large for some large $x$ (contradicting the previous point)

If you have trouble with any of these steps, please let me know in a comment.
