# Inverse tangent

## Definitions

Symbol: Atan $\operatorname{atan}(z)$ Inverse tangent
Symbol: Atan2 $\operatorname{atan2}\!\left(y, x\right)$ Two-argument inverse tangent

## Illustrations

Image: X-ray of $\operatorname{atan}(z)$ on $z \in \left[-2, 2\right] + \left[-2, 2\right] i$

## Transcendental equations

$\tan\!\left(\operatorname{atan}(z)\right) = z$
$\sin\!\left(\operatorname{atan}(z)\right) = \frac{z}{\sqrt{1 + {z}^{2}}}$
$\cos\!\left(\operatorname{atan}(z)\right) = \frac{1}{\sqrt{1 + {z}^{2}}}$
$\operatorname{atan}\!\left(\tan(\theta)\right) = \theta$
$\mathop{\operatorname{solutions}\,}\limits_{w \in \mathbb{C}} \left[\tan(w) = z\right] = \left\{ \operatorname{atan}(z) + \pi n : n \in \mathbb{Z} \right\}$
$\operatorname{atan2}\!\left(y, x\right) = \mathop{\operatorname{solution*}\,}\limits_{\theta \in \left(-\pi, \pi\right]} \left[\left(x, y\right) = \left(r \cos(\theta), r \sin(\theta)\right)\; \text{ where } r = \sqrt{{x}^{2} + {y}^{2}}\right]$

## Differential equations

$\left(1 + {z}^{2}\right) y''(z) + 2 z y'(z) = 0\; \text{ where } y(z) = {c}_{1} + {c}_{2} \operatorname{atan}(z)$

## Integral representations

$\operatorname{atan}(z) = \int_{0}^{z} \frac{1}{1 + {t}^{2}} \, dt$

## Specific values

$\operatorname{atan}(0) = 0$
$\operatorname{atan}\!\left(+\infty\right) = \frac{\pi}{2}$
$\operatorname{atan}\!\left(-\infty\right) = -\frac{\pi}{2}$
$\operatorname{atan}\!\left(+i\right) = +i \infty$
$\operatorname{atan}\!\left(-i\right) = -i \infty$
$\operatorname{atan}(1) = \frac{\pi}{4}$
$\operatorname{atan}\!\left(\sqrt{3}\right) = \frac{\pi}{3}$
$\operatorname{atan}\!\left(\frac{1}{\sqrt{3}}\right) = \frac{\pi}{6}$
$\operatorname{atan}\!\left(\sqrt{2} - 1\right) = \frac{\pi}{8}$
$\operatorname{atan}\!\left(\sqrt{2} + 1\right) = \frac{3 \pi}{8}$
$\operatorname{atan}\!\left(2 - \sqrt{3}\right) = \frac{\pi}{12}$
$\operatorname{atan}\!\left(2 + \sqrt{3}\right) = \frac{5 \pi}{12}$

## Analytic properties

$\operatorname{atan}(z) \text{ is holomorphic on } z \in \mathbb{C} \setminus \left(\left(-\infty, -1\right] i \cup \left[1, \infty\right) i\right)$
$\operatorname{EssentialSingularities}\!\left(\operatorname{atan}(z), z, \mathbb{C} \cup \left\{{\tilde \infty}\right\}\right) = \left\{\right\}$
$\mathop{\operatorname{poles}\,}\limits_{z \in \mathbb{C} \cup \left\{{\tilde \infty}\right\}} \operatorname{atan}(z) = \left\{\right\}$
$\operatorname{BranchPoints}\!\left(\operatorname{atan}(z), z, \mathbb{C} \cup \left\{{\tilde \infty}\right\}\right) = \left\{-i, i, {\tilde \infty}\right\}$
$\operatorname{BranchCuts}\!\left(\operatorname{atan}(z), z, \mathbb{C}\right) = \left\{\left(-\infty, -1\right] i, \left[1, \infty\right) i\right\}$
$\mathop{\operatorname{zeros}\,}\limits_{z \in \mathbb{C}} \operatorname{atan}(z) = \left\{0\right\}$

## Cases for atan2

$\operatorname{atan2}\!\left(0, x\right) = \begin{cases} 0, & x \ge 0\\\pi, & x < 0\\ \end{cases}$
$\operatorname{atan2}\!\left(y, 0\right) = \frac{\pi}{2} \operatorname{sgn}(y)$
$\operatorname{atan2}\!\left(y, x\right) = \begin{cases} 0, & x = y = 0\\\operatorname{atan}\!\left(\frac{y}{x}\right), & x > 0\\\left(\frac{\pi}{2}\right) \operatorname{sgn}(y) - \operatorname{atan}\!\left(\frac{x}{y}\right), & y \ne 0\\\pi, & y = 0 \;\mathbin{\operatorname{and}}\; x < 0\\ \end{cases}$

## Argument transformations

### Symmetries

$\operatorname{atan}\!\left(-z\right) = -\operatorname{atan}(z)$
$\operatorname{atan}\!\left(\overline{z}\right) = \overline{\operatorname{atan}(z)}$
$\operatorname{atan}\!\left(\frac{1}{z}\right) = \frac{\pi}{2} - \operatorname{atan}(z)$
$\operatorname{atan}\!\left(\frac{1}{z}\right) = -\frac{\pi}{2} - \operatorname{atan}(z)$
$\operatorname{atan}\!\left(\frac{1}{z}\right) = \frac{\pi}{2} \operatorname{csgn}\!\left(\frac{1}{z}\right) - \operatorname{atan}(z)$

### Addition and multiplication formulas

$\operatorname{atan}\!\left(i z\right) = i \operatorname{atanh}(z)$
$\operatorname{atan}\!\left(x + y\right) = \operatorname{atan}(x) + \operatorname{atan}\!\left(\frac{y}{1 + x \left(x + y\right)}\right)$
$\operatorname{atan}\!\left(2 z\right) = \operatorname{atan}(z) + \operatorname{atan}\!\left(\frac{z}{1 + 2 {z}^{2}}\right)$

### Algebraic transformations

$\operatorname{atan}(z) = 2 \operatorname{atan}\!\left(\frac{z}{1 + \sqrt{1 + {z}^{2}}}\right)$

## Sums and products

$\operatorname{atan}(x) + \operatorname{atan}(y) = \operatorname{atan2}\!\left(x + y, 1 - x y\right)$
$\operatorname{atan}(x) - \operatorname{atan}(y) = \operatorname{atan2}\!\left(x - y, 1 + x y\right)$
$\operatorname{atan}(x) + \operatorname{atan}(y) = \operatorname{atan}\!\left(\frac{x + y}{1 - x y}\right)$
$\operatorname{atan}(x) - \operatorname{atan}(y) = \operatorname{atan}\!\left(\frac{x - y}{1 + x y}\right)$
$\operatorname{atan2}\!\left({y}_{1}, {x}_{1}\right) + \operatorname{atan2}\!\left({y}_{2}, {x}_{2}\right) = \operatorname{atan2}\!\left({y}_{1} {x}_{2} + {y}_{2} {x}_{1}, {x}_{1} {x}_{2} - {y}_{1} {y}_{2}\right)$
$\operatorname{atan2}\!\left({y}_{1}, {x}_{1}\right) - \operatorname{atan2}\!\left({y}_{2}, {x}_{2}\right) = \operatorname{atan2}\!\left({y}_{1} {x}_{2} - {y}_{2} {x}_{1}, {x}_{1} {x}_{2} + {y}_{1} {y}_{2}\right)$

## Representations through other functions

### Logarithms

$\operatorname{atan}(z) = \frac{i}{2} \left(\log\!\left(1 - i z\right) - \log\!\left(1 + i z\right)\right)$
$\operatorname{atan}(z) = \frac{i}{2} \log\!\left(\frac{1 - i z}{1 + i z}\right)$
$\operatorname{atan}(z) = -\frac{i}{2} \log\!\left(\frac{1 + i z}{1 - i z}\right)$
$\operatorname{atan2}\!\left(y, x\right) = -i \log\!\left(\operatorname{sgn}\!\left(x + y i\right)\right)$
$\operatorname{atan2}\!\left(y, x\right) = \operatorname{Im}\!\left(\log\!\left(x + y i\right)\right)$

### Inverse trigonometric functions

$\operatorname{atan}(z) = \operatorname{acot}\!\left(\frac{1}{z}\right)$
$\operatorname{atan}(z) = \operatorname{asin}\!\left(\frac{z}{\sqrt{1 + {z}^{2}}}\right)$
$\operatorname{atan}(z) = \operatorname{csgn}(z) \operatorname{acos}\!\left(\frac{1}{\sqrt{1 + {z}^{2}}}\right)$

### Hypergeometric functions

$\operatorname{atan}(z) = z \,{}_2F_1\!\left(1, \frac{1}{2}, \frac{3}{2}, -{z}^{2}\right)$

## Complex parts

$\operatorname{Re}\!\left(\operatorname{atan}\!\left(x + y i\right)\right) = \frac{1}{2} \operatorname{atan2}\!\left(2 x, 1 - {x}^{2} - {y}^{2}\right)$
$\operatorname{Im}\!\left(\operatorname{atan}\!\left(x + y i\right)\right) = \frac{1}{4} \log\!\left(\frac{{x}^{2} + {\left(1 + y\right)}^{2}}{{x}^{2} + {\left(1 - y\right)}^{2}}\right)$

## Derivatives and integrals

$\operatorname{atan}'(z) = \frac{1}{1 + {z}^{2}}$
$\operatorname{atan}''(z) = -\frac{2 z}{{\left(1 + {z}^{2}\right)}^{2}}$
${\operatorname{atan}}^{(n)}(z) = \frac{\left(n - 1\right)!}{{\left(1 + {z}^{2}\right)}^{\left( n + 1 \right) / 2}} U_{n - 1}\!\left(-\frac{z}{\sqrt{1 + {z}^{2}}}\right)$
${\operatorname{atan}}^{(n)}(z) = \frac{{\left(-1\right)}^{n} \left(n - 1\right)!}{2 i} \left(\frac{1}{{\left(z + i\right)}^{n}} - \frac{1}{{\left(z - i\right)}^{n}}\right)$
$\frac{d}{d x}\, \operatorname{atan2}\!\left(y, x\right) = -\frac{y}{{x}^{2} + {y}^{2}}$
$\frac{d}{d y}\, \operatorname{atan2}\!\left(y, x\right) = \frac{x}{{x}^{2} + {y}^{2}}$

## Series expansions

$\operatorname{atan}(z) = \sum_{k=0}^{\infty} \frac{{\left(-1\right)}^{k} {z}^{2 k + 1}}{2 k + 1}$

## Bounds and inequalities

### Real arguments

$\left|\operatorname{atan2}\!\left(y, x\right)\right| \le \pi$
$\left|\operatorname{atan}(x)\right| < \frac{\pi}{2}$
$\left|\operatorname{atan}(x)\right| \le \frac{\pi}{2}$
$\left|\operatorname{atan}(x)\right| \le \left|x\right|$
$\operatorname{atan}(x) \le \sum_{k=0}^{2 N} \frac{{\left(-1\right)}^{k} {x}^{2 k + 1}}{2 k + 1}$
$\operatorname{atan}(x) \ge \sum_{k=0}^{2 N + 1} \frac{{\left(-1\right)}^{k} {x}^{2 k + 1}}{2 k + 1}$
$\operatorname{atan}(x) \le {\left(\frac{\pi}{2}\right)}^{2} \frac{x}{1 + \frac{\pi}{2} x}$
$\operatorname{atan}(x) \ge \frac{x}{1 + x}$
$\operatorname{atan}(x) \ge \frac{\pi x}{\pi + 2 x}$
$\operatorname{atan}(x) \le \frac{\pi}{2} \frac{x}{\sqrt{1 + {x}^{2}}}$
$\operatorname{atan}(x) \ge \frac{x}{\sqrt{1 + {x}^{2}}}$
$\operatorname{atan}(x) \le \frac{\pi}{2} \tanh(x)$
$\operatorname{atan}(x) \ge \tanh(x)$

### Complex arguments

$\left|\operatorname{atan}(z)\right| \le \left|\operatorname{atanh}\!\left(\left|z\right|\right)\right|$
$\left|\operatorname{atan}(z)\right| \le -\log\!\left(1 - \left|z\right|\right)$

### Perturbations

$\left|\operatorname{atan}\!\left(x + y\right) - \operatorname{atan}(x)\right| = \operatorname{atan2}\!\left(\left|y\right|, 1 + x \left(x + y\right)\right)$
$\left|\operatorname{atan}\!\left(x + y\right) - \operatorname{atan}(x)\right| \le \left|y\right|$
$\left|\operatorname{atan}\!\left(x + y\right) - \operatorname{atan}(x)\right| \le \frac{\left|y\right|}{1 + {\left(\max\!\left(0, \left|x\right| - \left|y\right|\right)\right)}^{2}}$
$\left|\operatorname{atan}\!\left(x + y\right) - \operatorname{atan}(x)\right| < \pi$

Copyright (C) Fredrik Johansson and contributors. Fungrim is provided under the MIT license. The source code is on GitHub.

2021-03-15 19:12:00.328586 UTC