Proof Verification of $|\cos(a) - \cos(b)| \leq |b-a|$ Prove of $|\cos(a) - \cos(b)| \leq |b-a|$
My Attempt:
Let $g(x) =1$ and $f(x) = \sin(x)$. We know that $|f(x)| \leq|g(x)|$ for all $x \in R$.
Integration theorems tell us that:
$$\int_{a}^{b}|f(x)|dx \leq \int_{a}^{b} |g(x)|dx$$
$$\left|\int_{a}^{b}\sin(x)dx\right| \leq \left|\int_{a}^{b}1\, dx \right|$$
$$|\cos(a)-\cos(b)| \leq |b-a|$$
Does this work?
Update
By theorem: $|\int_{a}^{b} f(x)dx| \leq\int_{a}^{b}|f(x)|dx$ the inequality holds from line one to line 2. Also $|g(x)| = g(x)$.
 A: Integrals: who needs 'em? Without loss of generality, assume $a<b$. By the Mean Value Theorem for derivatives, for some $c\in (a,b)$ we have
$$
\left|\frac{\cos(b)-\cos(a)}{b-a}\right| = |-\sin(c)|\le 1
$$
A: The key inequality you really want to invoke is
$$\left|\int_a^bf(x)\,dx\right|\le\int_a^b|f(x)|\,dx$$
if $a\le b$.  It follows from this that, if $a\le b$, then
$$|\cos a-\cos b|=\left|\int_a^b\sin(x)\,dx\right|\le\int_a^b|\sin(x)|\,dx\le\int_a^b1\,dx=b-a=|b-a|$$
The case $b\le a$ amounts to interchanging $a$ and $b$.
Remark: In a way, you shouldn't need any calculus at all. If you draw a picture of the unit circle with angles $a$ and $b$, then you can see that $|b-a|$ is the length of the arc of the unit circle lying above a horizontal line segment of length $|\cos a-\cos b|$. The trick is, I'm describing a picture with $0\le a,b\le\pi$, so you need to do a bit of finagling to show it holds for all $a$ and $b$.
A: You can't just move the absolute value bars as you did from the first line to the second. If you're allowed to use the integral inequality $\left|\int_{a}^{b}f(x)dx\right|\leq \int_{a}^{b}|f(x)|dx$, then you can rigorously deduce that
$$\left|\int_{a}^{b}-\sin(x)\text{ }dx\right|\leq \int_{a}^{b}|-\sin(x)|\text{ }dx\leq \int_{a}^{b}1\text{ }dx$$
and from there conclude that $|\cos(b)-\cos(a)|\leq |b-a|$.
That being said, I feel like this approach buries a bit of the "circularity" at play here. You see, in order to use the Fundamental Theorem of Calculus like you did, you need to prove that $\cos(x)$ is an antiderivative of $-\sin(x)$, which in turn needs you to prove that the derivative of $\cos(x)$ is $-\sin(x)$. By proving the inequality like you did, you're implicitly assuming all of this, so it's better to simply leverage the derivative and any theorems related to it. To be specific, if you have proven that $\cos(x)$ is differentiable everywhere and its derivative is $-\sin(x)$, you can apply the mean value theorem to the function $f(x)=\cos(x)$ to deduce that for any pair of numbers $(a,b)$ with $a<b$, there exists a number $c$ such that $a<c<b$ and
$$\left|\frac{\cos(b)-\cos(a)}{b-a}\right|=|-\sin(c)|\leq 1$$
and thus arrive at your result: $|\cos(b)-\cos(a)|\leq |b-a|$.
Of course, you could instead opt to prove that $\int_{a}^{b}-\sin(x)dx=\cos(b)-\cos(a)$ directly from the definition of the integral and any of the equivalent definitions of the trigonometric functions, but this is usually extremely difficult to do.
A: No it doesn't. In general, it is not true that $$|f(x) |\leq |g(x) | \Rightarrow  \left| \int_a^b f(x) \, dx \right| \leq \left| \int_a^b g(x)\, dx \right|.$$
E.g. $f(x) = 1, g(x) = \begin{cases} -1 &  x \leq 0 \\ 1 & x \geq 0. \end{cases}$
Then, integration from $ - 1 $ to $1$ gives us $ 2 \leq 0$.

What is true (and you might have to prove it to use it) is that
$$ |f(x) | \leq g(x) \Rightarrow \left|\int_a^b f(x) \, dx \right| \leq \int_a^b g(x) \, dx . $$
This still holds in your case since $g(x) = 1$.
Of course, there could be other integration theorems to use.
