Tangent in terms of Secant

Theorem
Let $x$ be a real number such that $\cos x \ne 0$.

Then:

where $\tan$ denotes the real tangent function and $\sec$ denotes the real secant function.

Proof
Also, from Sign of Tangent:
 * If there exists integer $n$ such that $n \pi < x < \paren {n + \dfrac 1 2} \pi$, $\tan x > 0$.
 * If there exists integer $n$ such that $\paren {n + \dfrac 1 2} \pi < x < \paren {n + 1} \pi$, $\tan x < 0$.

When $\cos x = 0$, $\tan x$ and $\sec x$ is undefined.

Also see

 * Trigonometric Functions in terms of each other