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 < \left({n + \dfrac 1 2}\right) \pi$, $\tan x > 0$.
 * If there exists integer $n$ such that $\left({n + \dfrac 1 2}\right) \pi < x < \left({n + 1}\right) \pi$, $\tan x < 0$.

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

Also see

 * Trigonometric Functions in terms of each other