# Showing that $\cos(x)$ is a contraction mapping on $[0,\pi]$

How do I show that $\cos(x)$ is a contraction mapping on $[0,\pi]$? I would normally use the mean value theorem and find $\max|-\sin(x)|$ on $(0,\pi)$ but I dont think this will work here.

So I think I need to look at $|\cos(x)-\cos(y)|$ but I can't see what to do to get this of the form $|\cos(x)-\cos(y)|\leq\alpha|x-y|$?

Thanks for any help

-
You won't find a constant $\alpha<1$ which works for all $x,y$. However, if you fix some $0\leq x<y\leq\pi$, the mean value theorem gives you such an $\alpha<1$ specific to $x$ and $y$. – Olivier Bégassat May 5 '12 at 10:50
$\cos$ doesn't define a mapping of $[0, \pi]$ into itself at all. – Chris Eagle May 5 '12 at 10:50
@ChrisEagle Oh ok, that may be causing me a bit of confusion, it is a contraction mapping on $[0,1]$ though right (I can use the mean value theorem for this? should I delete my question now? (the reason I was asking my question was to show that $\cos(x)=x$ has a unique solution in $[0,\pi]$ but I see I have made a mistake- I just need to show that it has a unique solution in $[0,1]$ and then it is obvious that it does not have one in $(1,\pi]$-sorry about that – hmmmm May 5 '12 at 10:54
@Olivier: to be a contraction mapping, by definition there has to be a single constant that works. However, if we restrict to $[0,1]$ then we are far enough away from $\pi/2$ that we can get a single constant to work on $[0,1]$. – Carl Mummert May 5 '12 at 11:46
@hmmmm: you can just edit your question, no need to replace it. – Carl Mummert May 5 '12 at 11:46

To show that $\cos(x)$ is a contraction mapping on $[0,1]$ you just need to show that it is Lipschitz with a Lipschitz constant less than $1$. Because $\cos(x)$ is continuously differentiable, there is a maximum absolute value of the derivative on each closed interval, and the mean value theorem can be used to show that maximum absolute value works as a Lipschitz constant. Since the derivative of $\cos(x)$ is bounded below $1$ in absolute value on $[0,1]$, that will give the desired result.