]> Continued Fractions - Cheat Sheet

## Cheat Sheet

$\begin{array}{rlr}\mathrm{coth}\left(1/n\right)& =& \left[n;3n,5n,...\right]\\ \mathrm{tan}\left(1\right)& =& \left[1;1,1,3,1,5,1,7,1,...\right]& \\ \mathrm{tan}\left(1/n\right)& =& \left[0;n-1,1,3n-2,1,5n-2,1,7n-2,1,...\right]& \left(n>1\right)\\ \end{array}$

Invert (insert or remove a 0) to derive expansions for $\mathrm{tanh}$ and $\mathrm{cot}$. We can compute the other trigonometric and hyperbolic trigonometric functions by solving quadratic equations involving continued fractions via the $\mathrm{tan}x/2$ and $\mathrm{tanh}x/2$ identities.

$\begin{array}{rlr}\mathrm{arctan}z& =& \frac{z}{1+\frac{{z}^{2}}{3+\frac{\left(2z{\right)}^{2}}{5+\frac{\left(3z{\right)}^{2}}{...}}}}\\ \mathrm{tanh}z& =& \frac{z}{1+\frac{{z}^{2}}{3+\frac{{z}^{2}}{5+\frac{{z}^{2}}{...}}}}\\ \mathrm{tan}z& =& \frac{z}{1-\frac{{z}^{2}}{3-\frac{{z}^{2}}{5-\frac{{z}^{2}}{...}}}}\end{array}$

The inverse tangent is useful for computing other inverse trigonometric functions. Its expansion also gives an expansion for $\pi$ by setting $z=1$. Also,

$\pi =3+\frac{1}{6+\frac{9}{6+\frac{25}{6+...}}}$

but this converges far too slowly for practical purposes.

$\begin{array}{rlr}\mathrm{log}\left(1+x\right)& =& \frac{x}{1+\frac{{1}^{2}x}{2-x+\frac{{2}^{2}x}{3-2x+...}}}\\ {e}^{x}& =& 1+\frac{x}{1-\frac{x}{x+2-\frac{2x}{x+3-\frac{3x}{x+4-...}}}}\end{array}$

Other well-known expansions [scoured from web searches; I wish I knew how these were derived]:

$\begin{array}{rlrl}e& =& \left[2;1,2,1,1,4,1,1,6,1,...\right]& \\ \mathrm{exp}\left(1/n\right)& =& \left[1;n-1,1,1,3n-1,1,1,5n-1,1,1,...\right]& \left(n>1\right)\\ \mathrm{exp}\left(2m/n\right)& =& 1+\frac{2m}{\left(n-m\right)+\frac{{m}^{2}}{3n+\frac{{m}^{2}}{5n+\frac{{m}^{2}}{7n+...}}}}\\ \mathrm{exp}\left(z\right)& =& 1+\frac{z}{1-\frac{z}{2+\frac{z}{3-\frac{z}{2+\frac{z}{5-\frac{z}{2+...}}}}}}\\ \end{array}$