I'm struggling to solve this one rigurously. I'm given a function $ f(x) $ defined as follows: $$ f(x)= \begin{cases} \cos(x)\sin(\tan(x)),& \text{if } x\neq \frac{\pi}{2}\\ 0, & \text{if } x = \frac{\pi}{2} \end{cases} $$ And am asked to prove that $ f$ is continuous in the interval $[0,\pi]$ using the squeeze theorem. Now I've graphically identified the functions $ g(x) = -|x-\frac{\pi}{2}| \text{ and } h(x)=|x-\frac{\pi}{2}|$ as lower and upper bounds for $ f $, however I don't know how to prove this rigurously, or if am expected to do this in an introductory calculus class? What I've done so far is show that we have $ \cos(x)\sin(\tan(x)) \leq |x-\frac{\pi}{2}| $. However I'm not sure how to get the lower bound, or even if my proof of this inequality is even correct. I used the fact that both $\cos(x)$ and $|x-\frac{\pi}{2}|$ are strictly decreasing in the interval $[0,\frac{\pi}{2}]$ and that $\cos(0) \leq |0-\frac{\pi}{2}|$, $\cos(x) \leq 1 \text{ and } \sin(\tan(x)) \leq 1 \implies \cos(x)\sin(\tan(x)) \leq \cos(x) \leq |x-\frac{\pi}{2}| $. Is this proof valid? And how would I go on to prove that $f$ is always bigger than the lowe bound?
$\endgroup$3 Answers
$\begingroup$The inequality you want to prove is correct but the proof you give isn't. It is not true that if $f,g$ are both continuous and decreasing, with $f(0)\le g(0)$, then $f(x)\le g(x)$. To see this, pick $f(x)=0$ and $g(x)=-x$. Moreover, the inequality you are trying to prove is actually the inequality one needs to prove the continuity of $\cos x$ in $x=\frac{\pi}{2}$, and this is all you need to solve the excercise.
Solution: all functions involved ($\sin x,\cos x$ and $\tan x$) are continuous on $[0,\frac{\pi}{2})\cup(\frac{\pi}{2},\pi]$, and since on this set $f$ is defined as a product or composition of these functions must be continuous on this set. So we need to prove continuity only in $\frac{\pi}{2}$, and we need to show that $$ \lim_{x\to\frac{\pi}{2}} f(x) = 0, $$ and we can prove this with the squeeze theorem.
Indeed, from $|\sin x|\le1\,\forall x\in\mathbb{R}$ we get $$ 0\le |\cos x \cdot \sin(\tan x)| \le |\cos x|, $$ and since $$ \lim_{x\to\frac{\pi}{2}} \cos x = 0 $$ the conclusion follows.
Comments: note that from $$ |\sin x|\le |x| $$ you get $$ |\cos x|\le |x-\frac{\pi}{2}|, $$ which is the inequality you wanted to prove. Moreover, if you are able to prove that $$ f(x)\le |x-\frac{\pi}{2}| $$ then, since $f$ is odd you get also the lower bound.
$\endgroup$$\begingroup$You have $$0 \leq \left| \cos(x) \sin(\tan(x))\right| \leq |\cos(x)|$$
so when $x$ tends to $\pi/2$, by the squeeze theorem, $f(x)$ tends to $0$.
$\endgroup$2$\begingroup$Hint: for $\;x>\frac\pi2\;$ but very close to it, say $\;x\in\left[\frac\pi2-0.01\,,\,\,\frac\pi2\right]\;$
$$-\cos x\le\cos x\sin\tan x\le \cos x$$
You do for a similar interval above $\;\frac\pi2\;$ , and for the rest of the points remember continuity of product and composition of continuous functions.
$\endgroup$