I've read in some places that the following proof from Cours d'Analyse of Cauchy is not correct, but I can't find the mistake.
Theorem: if the difference $f(x+1)-f(x)$ converges towards a certain limit $k$, for increasing values of $x$, then the fraction $$\frac{f(x)}{x}$$ converges at the same time towards the same limit.
Proof:
First suppose that the quantity $k$ has a finite value, and denote by ε a
number as small as we wish. Because the increasing values of $x$ make the difference $$f(x+1)-f(x)$$converge towards the limit $k$, we can give the number $h$ a value large enough that,
when $x$ is equal to or greater than $h$, the difference in question is always contained between the limits $k-ε$ and $k+ε$.
Given this, if we denote by n any integer number, $$f(h+1)-f(h)$$
$$f(h+2)-f(h+1)$$
$$f(h+n)-f(h+n-1)$$
Consquently their arithmetic mean $$\frac{f(h+n)-f(h)}{n}$$
is contained between $k-ε$ and $k+ε$. Thus we have: $$\frac{f(h+n)-f(h)}{n}=k+α$$where α is a quantity contained between the limits −ε and +ε. Now let $h+n=x$. Therefore $$\frac{f(x)-f(h)}{x-h}=k+α$$ and thus we conclude $$f(x) = f (h) + (x−h) (k+α)$$$$\frac{f(x)}{x}=\frac{f(h)}{x}+(1-\frac{h}{x})(k+α)$$ Moreover, to make the value of $x$ increase indefinitely, it suffices to make the integer
number $n$ increase indefinitely without changing the value of $h$. Consequently,
let us suppose that in equation we consider $h$ as a constant quantity and $x$ as a
variable quantity which converges towards the limit ∞.
The quantities $\frac{f(h)}{x}$ and $\frac{h}{x}$ contained in the right-hand side, converge towards the limit zero, and the righthand
side itself converges towards a limit of the form $k+α$ where α is always contained between −ε and +ε.
Thus the ratio $\frac{f(x)}{x}$ has for its limit a quantity contained between $k − ε$ and $k + ε$. This conclusion remains
true however small the number ε may be, and as a result the limit in question
is precisely the quantity $k$.
In other words: $lim \frac{f(x)}{x}
= k = lim[ f (x+1)− f (x)]$.
Q.E.D.
This is NOT a valid proof. For $y\in (0,1]$ and $n\in \Bbb N$ let $f_n(y)=\frac {f(y+n)}{y+n}.$ The proof only shows that $\lim_{n\to \infty}f_n(y)=k$ for each $y\in (0,1].$
But the assertion that $\lim_{x\to \infty}\frac {f(x)}{x}=k$ is equivalent to the statement that $f_n(y)\to k$ uniformly on $(0,1].$
The counter-example $f(x)=\frac {1}{1-x+[x]}$ you cite in a comment is good. We have $f(x+1)-f(x)=0$ for all $x.$ We have $\lim_{n\to \infty} f_n(y)=0$ for each $y\in (0,1].$
But $f_n(1-\frac {1}{n})=$ $\frac {n}{n+1-\frac {1}{n}}>$ $\frac {n}{n+1}\geq \frac {1}{2}$ so the convergence of $f_n$ to $0$ on $(0,1]$ is not uniform.