# Use the Mean Value Theorem to show that: $|\cos(x) - \cos(y)| \leq |x-y|$

I don't understand how to prove the following:

Use the Mean Value Theorem to show that
$|\cos(x) - \cos(y)| \leq |x-y|$

Why I'm confused:

(a)This question is from a single variable calculus book, but it seems like a multivariable problem. But I guess there must be implicit differentiation involved somehow.

(b) Mean Value Theorem involves an interval, and the "average rate of change" (ie the slope formula). However there is no interval, and I don't understand how slope can be used to show one multivariable function is less than another. (ex $2x+y+1 \gt 2x+y$, but they have the same slope)

(c) I have no idea how to deal with the absolute value here. Usually in a single variable calculus problem, I would break up an absolute value function into a 2 part piecewise function. Do I have to consider all 4 possible cases (++)(+-)(-+)(--)?

I have some ideas about how to prove it, but none of them involve the Mean Value Theorem.

• Hint: The only function involved in the application of the MVT here is $\cos$. – Henning Makholm Jun 23 '17 at 19:39
• Try applying the MVT to $f(x)=\cos x$ on the interval $[x,y]$, assuming that $x<y$. – user84413 Jun 23 '17 at 19:40
• (a) Your only function is cos(x) (b)You have the slope of the derivative bounded because it is a trigonometric function. (c)You have to apply the theorem which it is equivalent in absolute value, and go on, you don't have to distingish cases. – Skullgreymon Jun 23 '17 at 19:46

The mean value theorem says $$f'(c)(b-a)=f(b)-f(a)$$ If you take $f(x)=\cos(x)$, it becomes $$\cos'(c)(y-x)=\cos(y)-\cos(x)$$ this is equivalent to (this is very important, and I think here is part of your problem, it can help in further problems this basic and direct kind of thinking) $$\mid \cos'(c)\mid \mid y-x\mid=\mid \cos(y)-\cos(x)\mid$$ You know that $\cos'(x)=-\sin(x)$, which it is bounded between -1 and 1. So you can bound $\mid \cos'(c)\mid$ by 1. Finally, you have your statement. $$\mid x-y\mid\ge \mid \cos'(c)\mid \mid y-x\mid=\mid \cos(y)-\cos(x)\mid$$

• Just for future reference, you can type "\cos" or "\sin" instead of "cos" or "sin", and it will make them appear as operators and not simply text. – Dave Jun 23 '17 at 19:47
• Thank you! I got the proof to work! However I do still have one further issue. Absolute Value is not differentiable at the corner, so doesn't that mean the theorem cannot be used? Or we, at least, need to break it into cases? – Michael Maliszesky Jun 23 '17 at 20:19
• Not at all! first you apply the theorem and then take the absolute values to the equality. See my proof, once you have the equation (by applying the theorem) then you take absolute values. I did it in two separate steps for your understanding. – Skullgreymon Jun 23 '17 at 20:21

The function $y\longmapsto\cos y$ is a single variable function.

By the MVT, there exists $c$ between $x$ and $y$ with $$|\cos x-\cos y|=|(-\sin c)\, (x-y)|=|\sin c|\,|x-y|\leq|x-y|.$$

You are thinking too hard. Just look at the statement of the mean value theorem:

and note that $x$ and $y$ in your problem play the role of $a$ and $b$ in the statement.

Let $f(x)=\cos(x)$ and substitute it into the theorem to see what you can get.

$$\cos (x)-\cos (y)=$$ $$2\sin (\frac {x+y}{2})\sin (\frac {x-y}{2})$$ and by MVT, $$\sin (X)=\sin (X)-\sin (0)=X\cos (c)$$ and $|\sin (X)|\le |X|$, thus $$|\sin(\frac {x-y}{2})|\le \frac {|x-y|}{2}$$ Done.

Consider the closed interval $I=[x,y]$, with $x,y \in \mathbb{R}$, $x<y$. Since $f:\mathbb{R} \to \mathbb{R}$, $f(\theta)=\cos(\theta)$ is continuous and derivable in $\mathbb{R}$, it will be continuous in $[x,y]$ and derivable in $(x,y)$. By the Mean Value Theorem, there is a $\alpha \in (x,y)$ such that $$f(y)-f(x)=f'(\alpha)(y-x) \Leftrightarrow \cos(y)-\cos(x)=-\sin(\alpha)(y-x),$$ so by applying absolute value to both sides we get $$|\cos(y)-\cos(x)|=|-\sin(\alpha)|\cdot |y-x| \Leftrightarrow |\cos(x)-\cos(y)|=|\sin(\alpha)|\cdot |x-y|.$$ And since $|\sin(\beta)| \leq 1$ for all $\beta \in \mathbb{R}$ we get that $$|\cos(x)-\cos(y)|\leq 1\cdot |x-y|=|x-y|.$$ We are done.