We're asked to proof the above inequality $\forall{}x\in(\frac{-\pi}{2},\frac{\pi}{4}]$. Although am a bit confused with the fact that $\tan(\frac{-\pi}{2})$ is undefined. And thus am stuck when applying the mean value theorem to proof the statement. What interval should I be taking in order to apply the theorem? Thanks in advance.
My attempt:
Let $f(t)=\tan(t)$ such that $t\in(\frac{-\pi}{2},x]$ whereas $x\leq{}\frac{\pi}{4}$ then, because $f$ is continuous on the closed interval and differentiable on the open interval, $\exists{}c\in(-\frac{\pi}{2},x)$ such that the difference of the quotient is equal to $f'(c)$ but then again, I can't take $f(-\frac{\pi}{2})$
If $x=\frac\pi4$, then $\tan(x)=x-\frac\pi4+\tan\left(\frac\pi4\right)$. On the other and, if $x\in\left(-\frac\pi2,\frac\pi4\right)$, then$$\frac{\tan(x)-x-\left(\tan\left(\frac\pi4\right)-\frac\pi4\right)}{x-\frac\pi4}=\tan'(c)-1,$$for some $c$ between $x$ and $\frac\pi4$. But $\tan'(c)-1+=\tan^2(c)>0$. Since $x-\frac\pi4<0$, you deduce that $\tan(x)-x-\left(\tan\left(\frac\pi4\right)-\frac\pi4\right)<0$. In other words, $ \tan(x)<x-\frac\pi4+\tan\left(\frac\pi4\right)$.