# Show that $f(x)=\cos x$ is uniformly continuous in $\mathbb{R}$, directly from the definition [duplicate]

Possible Duplicate:
Proving that cosine is uniformly continuous

Show that $f(x)=\cos x$ is uniformly continuous in $\mathbb{R}$. Use the definition.

I don't know how to do this.

-

## marked as duplicate by N. S., Ayman Hourieh, Emily, Alexander Gruber♦, Davide GiraudoDec 20 '12 at 18:28

Hint: It's continuous (you can probably take that for granted) and it's periodic. – andybenji Dec 20 '12 at 16:09
Hint: It's derivative $f'(x)=-\sin x$ is bounded and continuous. – yo' Dec 20 '12 at 16:11
This is a duplicate of this question. EDIT: As user Nameless suggests below, I will add "by definition" to the title of this post so as to differentiate it from the earlier question, where there were no direct proofs given. – Zev Chonoles Dec 20 '12 at 16:14
@ZevChonoles The other question has no answers showing uniform convergence by definition. I suggest adding "by definition" in the title. – Nameless Dec 20 '12 at 16:24
@Nameless: Thanks for your suggestion, I've now implemented it. – Zev Chonoles Dec 20 '12 at 16:45

Let $\epsilon>0$ and $x,y\in \mathbb{R}$. We want $$\left|f(x)-f(y)\right|<\epsilon\implies \left|\cos x-\cos y\right|<\epsilon\implies \left|-2\sin \frac{x+y}2\sin\frac{x-y}2\right| < \epsilon$$ Because $$\left|-2\sin \frac{x+y}2\sin\frac{x-y}2\right|\le 2\left|\sin\frac{x-y}2\right|$$ it suffices $$2\left|\sin\frac{x-y}2\right|<\epsilon$$ when $$\left|x-y\right|<\delta\implies \left|\frac{x-y}2\right|<\delta$$ SInce $\left|\sin x\right|\le \left|x\right|$, $$2\left|\sin\frac{x-y}2\right|\le 2\left|\frac{x-y}2\right|<2\delta$$

Choosing $\delta=\frac{\epsilon}{2}>0$ will do the trick. Because $\delta$ doesn't depend on $x,y$, the continuity is uniform

-
Might be a bit late to ask this , but how do we know abs(sin(x)) is less than or equal to abs(x)? – Alex Apr 23 at 2:27

You want to show that for each $\epsilon>0$ there exists a $\delta>0$ such that for each $x,y$ $$|x-y|<\delta\implies |\cos(x)-\cos(y)|<\epsilon$$

Now recall that the cosine has the sine as it derivative, so that for any $x,y$, there exists a $\mu$ such that

$$|\cos x-\cos y |=|\sin\mu||x-y|$$

But

$$|\sin\mu|\leq 1$$ for any value of $\mu$, so that

$$|\cos x-\cos y |\leq |x-y|$$

for any choice of $x,y$. Thus, given $\epsilon >0$, choose $\delta =\epsilon /2$. This means that, whenever $|x-y|<\delta=\epsilon/2$, we'll have

$$|\cos x-\cos y |\leq |x-y|=\epsilon/2 <\epsilon$$ so that uniform continuity is achieved.

Functions with the property that

$$|f(x)-f(y)|<\alpha |x-y|$$ are called Lipschitz continuous, and in particular, every Lipschitz continuous function is uniformly continuous, but not conversely.

-
So simple, so pure, so zen – Look behind you Mar 6 at 3:26

Hint

$$\left| \cos(x)- \cos(y) \right| =2 \left| \sin( \frac{x-y}{2}) \right| \left| \sin(\frac{x+y}{2}) \right| \leq 2 \left| \sin( \frac{x-y}{2}) \right|$$

-
maybe add ${}\le |x-y|$ on the end? – GEdgar Dec 20 '12 at 16:22
@GEdgar Or use the fact that $\sin(x)$ is continuous at $x=0$... – N. S. Dec 20 '12 at 16:24

Hint The trigonometric identity

$$\cos(x)-\cos(y) = 2 \sin \left(\frac{x+y}{2}\right) \cdot \sin \left( \frac{x-y}{2} \right)$$

holds. Use $|\sin(z)| \leq 1$, $|\sin(z)| \leq |z|$ ($z \in \mathbb{R}$) to find an estimate for $|\cos(x)-\cos(y)|$.

Another possibility: Apply the mean-value theorem to $x \mapsto \cos(x)$.

(In both cases you obtain that $x \mapsto \cos(x)$ is Lipschitz-continuous which makes it pretty easy to prove the uniform continuity using the definition.)

-