# To use Mean Value Theorem to prove $f(x)=\tan(x)$ increases over $(-\pi/2,\pi/2)$, don't we need $f(\pm\pi/2)$? Yet these values are undefined.

Prove with the Mean Value Theorem that the function $$\tan(x)$$ increases in the interval $$(\frac{-\pi}{2}, \frac{\pi}{2})$$.

My problem is that to use the Mean Value Theorem you need $$f(\frac{\pi}{2})$$ and $$f(\frac{-\pi}{2})$$ but in those values it's undefined. I asked if I could use a smaller interval but I was told I must to use $$(\frac{-\pi}{2}, \frac{\pi}{2})$$.

We have $$\tan(x) = \frac{\sin(x)}{\cos(x)}$$, hence $$\tan'(x) = \frac{\cos^2(x)+\sin^2(x)}{\cos^2(x)} = \frac 1{\cos^2(x)}$$. Let $$x,y\in (-\pi/2,\pi/2)$$, $$x. Then there is some $$\xi\in (x,y)$$ such that $$\tan(y)-\tan(x) = \tan'(\xi)(y-x) = \frac{y-x}{\cos^2(\xi)}> 0.$$ Hence, $$\tan(x)<\tan(y)$$.
• I have a doubt, does the mean value theorem really apply on this interval? in my book, the hypothesis states that the function has to be continuous on the interval $[a,b]$ and differentiable on $(a,b)$, but $tanx$ is not continuous on $[\frac{-\pi}{2},\frac{\pi}{2}]$ because $\lim_{x\to {-\pi/2}^{+}} tanx = -\infty$ and $\lim_{x\to {\pi/2}^{-}} tanx = \infty$. so i'm not sure whether it's legal to apply the mean value theorem there. – Donlans Donlans Oct 8 '19 at 1:10
• $f(x) = \tan x$ is continuous and differentiable on $(-\frac{\pi}{2},\frac{\pi}{2})$. So if $x,y \in (-\frac{\pi}{2},\frac{\pi}{2})$ and $x<y$, then $f(x) = \tan x$ is continuous on $[x,y]$ and differentiable on $(x,y)$. – JDZ Oct 8 '19 at 2:27