TITLE: Does $\lim \frac {a_n}{b_n}=1$ imply $\lim \frac {f(a_n)}{f(b_n)}=1$?
QUESTION [12 upvotes]: I wanted to prove the seemingly simple statement:

If $\lim \frac {a_n}{b_n}=1$ and $f$ continuous with $f(b_n)\neq0$ then $\lim \frac {f(a_n)}{f(b_n)}=1.$

I started promptly with 
\begin{align} 
\\ \lim \frac {f(a_n)}{f(b_n)} &= \lim \frac { f(b_n \times \frac{a_n}{b_n})}{f(b_n)}
\\  &= \frac { f(b_n \times \lim\frac{a_n}{b_n})}{f(b_n)}
\\  &= \frac { f(b_n \times 1)}{f(b_n)}
\\  &= 1
\end{align}
Yet two seconds later I realized what a nonsense it was and that I fell victim of one of the freshman's dreams.
I would greatly appreciate a hint for a proof or a counterexample if the statement turns out to be false.

REPLY [5 votes]: After all the other examples, let's try $f$ bounded uniformly continuous and $(a_n)$ convergent (and of course $\lim a_n=\lim b_n$):
$$ f(x)=\begin{cases}\arctan x\cdot\sin\frac1{x^2}&\text{if } x\ne 0,\\0&\text{if }x=0.\end{cases}$$
$$ b_n=\frac1{\sqrt{2n\pi+\frac1n}}$$
$$ a_n=\frac1{\sqrt{(2n+\frac12)\pi}}$$
Then $a_n\to 0$, $\frac{a_n}{b_n}=\sqrt{\frac{(2n+\frac12)\pi}{2n\pi+\frac1n}}\to 1$, $\frac{f(a_n)}{f(b_n)}=\frac{\arctan a_n}{\arctan b_n}\frac{\sin((2n+\frac12)\pi)}{\sin(2n\pi+\frac1n)}\sim 1\cdot \frac1{1/n}=n$.