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})$. 
Thanks for reading. 

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<y$. 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)$.
