# Proving that cosine is uniformly continuous

This is what I've already done. Can't think of how to proceed further

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

What should I do next?

-
Use that $|\sin(x)| \leq 1$. – WimC Dec 11 '12 at 19:31
So, instead of writing $\frac{|x+y|}{2}|x-y|$ I could've written $\leq |-2*1*\frac{x-y}{2}|=|x-y|$ and then I can just set delta equal to epsilon? – user1242967 Dec 11 '12 at 19:42
@user1242967 Only drop the $|x+y|/2$ part. Turn that into an answer to your own question and you have my upvote. You have shown it in the best way yet. – WimC Dec 11 '12 at 19:45
@DavidMitra I think you have to be slightly more involved than that, $|x-y| < \delta$ for $\delta < 4\pi$ doesn't necessarily mean that we can we can "shift" both $x$ and $y$ to be in $[-2\pi, 2\pi]$. I may be missing something, but I think you have to be slightly more fiddly, as in my hint below. – Tom Oldfield Dec 11 '12 at 19:53
@TomOldfield You'd of course demand that $\delta$ be less than $\min\{1,\delta_\epsilon\}$, say. I think this would work... Regardless, I deleted my comment as the OP's solution together with WimC's hint provides the best solution, in my opinion. – David Mitra Dec 11 '12 at 20:01

Hint: Any continuous function is uniformly continuous on a closed, bounded interval, so $\cos$ is uniformly continuous on $[-2\pi,0]$ and $[0,2\pi]$.
postscript prompted by Tom Oldfield's comment: A function $f$ is Lipschitz-continuous iff there is some non-negative number $m$ such that for all $x,y$ in the domain of $f$ we have $|f(x)-f(y)|\le m|x-y|$. This is stronger than uniform continuity, in that every Lipschitz-continuous function is uniformly continuous, but not every uniformly continuous function is Lipschitz continuous. An example of a uniformly continuous function that is not Lipschitz-continuous is $x\mapsto\sqrt{1-x^2}$ on the interval $[-1,1]$. It's really easy to prove that Lipschitz continuity entails uniform continuity.