Is my proof correct (limits)? What I'm trying to prove is probably simple, but I want to know if this method specifically is valid. the goal is to show that $$\lim_{x \rightarrow \infty} f(x)=0 \ \ \ \rightarrow \ \ \ \lim_{x \rightarrow \infty} f'(x)=0$$ Assuming f is differentiable. Now $\lim_{x \rightarrow \infty} f(x)=0$ implies that for any real $h$ we have $$\lim_{x \rightarrow \infty} f(x+h)-f(x) =0$$ Now if we restrict $h$ to be non-zero, we get this by dividing both sides by $h$ $$\lim_{x \rightarrow \infty} \frac{f(x+h)-f(x)}{h}=0$$ Now define $g(h)$ as the above then $$\lim_{h \rightarrow 0} \ g(h)=0$$But $$\lim_{h \rightarrow 0} \ g(h)=\lim_{x \rightarrow \infty} f'(x)$$ and therefore $$\lim_{x \rightarrow \infty} f'(x)=0$$
 A: Consider something like $f(x)=\min\{\sin x,1/x\}$ where $\sin x\geq0$ and $\max\{\sin x,-1/x\}$ where $\sin x<0$.  That function won't be differentiable everywhere, in particular it won't be differentiable where the two curves $\sin x$ and $1/x$ meet.  But you can imagine smoothing out those corners so that it is differentiable everywhere, since those are just a countable discrete set of points.  Let $g$ be $f$ smoothed at those points.
Then the function $g$ would have limit zero as $x\to\infty$, but the derivative would equal one at every multiple of $2\pi$ so the derivative will not converge to anywhere as $x\to\infty$.
The problem with your proof is that you reverse the order of the two limits, you cannot always do that.
A: I liked The idea, but the derivate is when h goes to zero, not to infinity.
I'd try to proof through formal definition, as real analysis tells us to do. Your question is if what you did is right, so I won't proof to you right now, but if you prefer I proof, just tell me.
The way I'd take is:
Get the definition of the derivate and the limit of f(x) to 0. So manipulate expressions to rewrite the initial limit into the derivate. (Using epsilons and deltas...)
