TITLE: Is $f(x)= \cos(e^x)$ uniformly continuous?
QUESTION [12 upvotes]: As in the topic, my quest is to check (and prove) whether the given function $$f(x)= \cos(e^x)$$is uniformly continuous  on $\left\{\begin{matrix}x \in (-\infty;0]
\\ 
x \in [0; +\infty)
\end{matrix}\right.$ . 
My problem is that I have absolutely no idea how to do it. Any hints will be appreciated and do not feel offended if I ask you a question which you consider stupid, but such are the beginnings. Thank you in advance.

REPLY [4 votes]: The derivative is not needed, you can replace $\cos$ with any nonconstant periodic continuous function $g$:
Let $g\colon \mathbb R\to\mathbb R$ be 

continuous
non-constant
periodic.

Then for any $a\in \mathbb R$, the function $f(x):=g(e^x)$ is 

uniformly continuos on $(-\infty,a]$
not uniformly continuous on $[a,\infty)$

Proof:
Every continuous function is continous on compact intervals, therefore every periodic continous function is uniformly continuous
Let $\epsilon>0$ be given.
Then there exists $\delta>0$ such that $|g(x)-g(y)|<\epsilon$ if  $|x-y|<\delta$.
Wlog. $\delta<e^a$. Then $0<1-\delta e^{-a}<1$ ad hence $\delta':=-\ln(1-\delta e^{-a})>0$.
Now consider $x,y<a$ with $|x-y|<\delta'$. Wlog. $x\le y$.
Then $$e^y-e^x=e^y(1-e^{x-y})<e^a(1-e^{-\delta'})=\delta$$
and hence $$ |f(x)-f(y)|=|g(e^x)-g(e^y)|<\epsilon.$$
Thus $f$ is uniformly continuous on $(-\infty,a]$.
As $g$ is not constant, there exist $x_1, x_2$ with $g(x_1)\ne g(x_2)$.
Let $\epsilon=|g(x_1)-g(x_2)|>0$.
Let $p>0$ be a period of $g$.
No matter how small we choose $\delta>0$, for sufficiently big $k\in\mathbb Z$ (especially with $x_i+kp>e^a>0$), we have $|\ln(x_1+kp)-\ln(x_2+kp)|<\delta$ because $$\ln(x_1+kp)-\ln(x_2+kp)=\ln\frac{x_1/k+p}{x_2/k+p}\to\ln1=0$$ as $k\to+\infty.$
But then $$|f(\ln(x_1+kp))-f(\ln(x_2+kp))|=|g(x_1+kp)-g(x_2+kp)|=|g(x_1)-g(x_2)|=\epsilon $$
so we se ethat $f$ is not uniformly continuous on $[a,\infty)$. $_\square$