Differentiable function with conditions. Let $f:\mathbb{R}\rightarrow \mathbb{R}$ a differentiable function, with: 


*

*$f(x+1)-f(x)=f'(x)$; 

*exist $\lim_{x\rightarrow \infty }f'(x)=a\in \mathbb{R}$. 


Prove that $f(x)=ax+b$
I used Lagrange
 A: First, we can reduce the problem to the case $a=0$: Let $g(x)=f(x)-a\,x$. Then,
$$
g'(x)=f'(x)-a=f(x+1)-f(x)-a=g(x+1)+a(x+1)-(g(x)+a\,x)-a=g(x+1)-g(x),
$$
and $g'(x)\rightarrow 0$ for $x\rightarrow\infty$.
Now $g$ is differentiable and thus continuous, and so is $g'$, because of $g'(x)=g(x+1)-g(x)$. That, together with convergence to zero at infinity, means $g'$ is bounded in every interval $[x,\infty)$.
Let $c(x)=\sup_{t\in[x,\infty)}|g'(t)|$, we know that $c(x)\rightarrow 0$ for $x\rightarrow\infty$. Now let's rewrite the condition:
$$
g'(x)=g(x+1)-g(x)=\int^1_0 g'(x+t)\,dt.
$$
$g'(x)$ is the arithmetical mean of values in the interval $[x,x+1]$, so iterating that, we can hope to get to the region where $g'(t)$ is small in absolute value.
Interestingly, that's done easiest in the language of probability: $g'(x)=Eg'(x+T)$, where $T$ is a random variable uniformly distributed on $[0,1]$. Iterating this $n$ times, we get $g'(x)=Eg'(x+S_n)$, where $S_n=T_1+\cdots+T_n$ is the sum of $n$ independent random variables with the same uniform distribution on $[0,1]$ (the justification for exchanging the order of integration comes from the Theorem of Fubini).
It is well known that $S_n$ has expectation $\mu_n=n/2$ and variance $\sigma^2_n=n/12$, so Chebyshev's inequality lets us estimate the probability of large deviations from $\mu_n$:
$$
P(S_n<\mu_n-k\,\sigma_n)\le P(|S_n-\mu_n|>k\,\sigma_n)\le\frac{1}{k^2}.
$$
With $k=\sqrt{3\,n/4}$, this becomes $P(S_n<n/4)\le\frac{4}{3\,n}$. So, splitting our probability space into two complementary sets $\{S_n<n/4\}$ and $\{S_n\ge n/4\}$, we have
$$
|g'(x)|=|Eg'(x+S_n)|\le P(S_n<n/4)\,c(x)+c(x+n/4)\le \frac{4\,c(x)}{3\,n}+c(x+n/4), 
$$
for every $n\ge 1$. Letting $n\rightarrow\infty$, we see $g'(x)=0$, so $g$ must be constant $b$, and thus, $f(x)=a\,x+b$.
