The derivative of $ \tan x$ is $ \sec^2 x$. Why? I understand why the derivative of $\sin x$ is $\cos x$, and why the derivative of $\cos x$ is $-\sin x$ in a geometric way. 
But I can not understand why the derivative of $\tan x$ is $\sec^2 x$. 
Can someone please explain this in a visual, geometric way using the unit circle?

Use the definition of derivative
and the rule
$\tan(a+b)
=\dfrac{\tan(a)+\tan(b)}{1-\tan(a)\tan(b)}
$.
Then
$\begin{array}\\
\tan(x+h)-\tan(x)
&=\dfrac{\tan(x)+\tan(h)}{1-\tan(x)\tan(h)}-\tan(x)\\
&=\dfrac{\tan(x)+\tan(h)-\tan(x)(1-\tan(x)\tan(h))}{1-\tan(x)\tan(h)}\\
&=\dfrac{\tan(h)+\tan^2(x)\tan(h)}{1-\tan(x)\tan(h)}\\
\text{so}\\
\dfrac{\tan(x+h)-\tan(x)}{h}
&=\dfrac{\tan(h)+\tan^2(x)\tan(h)}{h(1-\tan(x)\tan(h))}\\
&=\dfrac{\tan(h)}{h}\dfrac{1+\tan^2(x)}{1-\tan(x)\tan(h)}\\
&\to 1+\tan^2(x)\\
&= 1+\dfrac{\sin^2(x)}{\cos^2(x)}\\
&= 1+\dfrac{\sin^2(x)}{\cos^2(x)}\\
&= \dfrac{1}{\cos^2(x)}\\
&=\sec^2(x)\\
\end{array}
$
since,
as $h \to 0$,
$\dfrac{\tan(h)}{h}
\to 1$
and
$\tan(h) \to 0$.
