Inverse Tangent

The inverse tangent is the multivalued function tan^(-1)z (Zwillinger 1995, p. 465), also denoted arctanz (Abramowitz and Stegun 1972, p. 79; Harris and Stocker 1998, p. 311; Jeffrey 2000, p. 124) or arctgz (Spanier and Oldham 1987, p. 333; Gradshteyn and Ryzhik 2000, p. 208; Jeffrey 2000, p. 127), that is the inverse function of the tangent. The variants Arctanz (e.g., Bronshtein and Semendyayev, 1997, p. 70) and Tan^(-1)z are sometimes used to refer to explicit principal values of the inverse cotangent, although this distinction is not always made (e.g,. Zwillinger 1995, p. 466).


The inverse tangent function tan^(-1)x is plotted above along the real axis.

Worse yet, the notation arctanz is sometimes used for the principal value, with Arctanz being used for the multivalued function (Abramowitz and Stegun 1972, p. 80). Note that in the notation tan^(-1)z (commonly used in North America and in pocket calculators worldwide), tanz denotes the tangent and -1 the inverse function, not the multiplicative inverse.

The principal value of the inverse tangent is implemented as ArcTan[z] in the Wolfram Language. In the GNU C library, it is implemented as atan(double x).


The inverse tangent is a multivalued function and hence requires a branch cut in the complex plane, which the Wolfram Language's convention places at (-iinfty,-i] and [i,iinfty). This follows from the definition of tan^(-1)z as


In the Wolfram Language (and in this work), this branch cut definition determines the range of tan^(-1)x for real x as (-pi/2,pi/2). Care must be taken, however, as other branch cut definitions can give different ranges (most commonly, (0,pi)).

Min Max
Im Powered by webMathematica

The inverse tangent function tan^(-1)z is plotted above in the complex plane.

tan^(-1)z has the special values


The derivative of tan^(-1)z is


and the indefinite integral is


The complex argument of a complex number z=x+iy is often written as


where theta, sometimes also denoted phi, corresponds to the counterclockwise angle from the positive real axis, i.e., the value of theta such that x=costheta and y=sintheta. Plots of tan^(-1)(y/x) are illustrated above for real values of x and y.

Min Max
Im Powered by webMathematica

A special kind of inverse tangent that takes into account the quadrant in which z lies and is returned by the FORTRAN command ATAN2(y, x), the GNU C library command atan2(double y, double x), and the Wolfram Language command ArcTan[x, y], and is often restricted to the range -pi<theta<=pi. In the degenerate case when x=0,

 phi={-1/2pi   if y<0; undefined   if y=0; 1/2pi   if y>0.

The usual tan^(-1)z has the Maclaurin series of


(OEIS A033999 and A005408). A more rapidly converging form due to Euler is given by


for real x (Castellanos 1988). This is related to the formula of Euler given by




The inverse tangent formulas are connected with many interesting approximations to pi


(OEIS A075553 and A075554).

The inverse tangent satisfies


for z!=0,


for all complex z,


for all real x, where equality for the last equation is understood to be in the limit as x->0, and

tan^(-1)x={-1/2pi-tan^(-1)(1/x) for x<0; 1/2pi-tan^(-1)(1/x) for x>0
={-1/2pi+cot^(-1)(-x) for x<0; 1/2pi+cot^(-1)(-x) for x>0
={-1/2pi-cot^(-1)x for x<0; 1/2pi-cot^(-1)x for x>0
={-cos^(-1)(1/(sqrt(x^2+1))) for x<0; cos^(-1)(1/(sqrt(x^2+1))) for x>0
={-sec^(-1)(sqrt(x^2+1)) for x<0; sec^(-1)(sqrt(x^2+1)) for x>0.

In terms of the hypergeometric function,


for complex z, and


for real x (Castellanos 1988).

Castellanos (1986, 1988) also gives some curious formulas in terms of the Fibonacci numbers,




and v is the largest positive root of


The inverse tangent satisfies the addition formula


for -1<x,y<1, as well as the more complicated formula


valid for all complex a. An additional identity known to Euler is given by


for (a>b ^ a>0) or (a<b ^ a<0). Another interesting inverse tangent identity attributed to Charles Dodgson (Lewis Carroll) by Lehmer (1938b; Bromwich 1991, Castellanos 1988) is




and p,q,r>0.

The inverse tangent has continued fraction representations


(Lambert 1770; Lagrange 1776; Wall 1948, p. 343; Olds 1963, p. 138) and


due to Euler and sometimes known as Euler's continued fraction (Borwein et al. 2004, p. 30).

To find tan^(-1)x numerically, the following arithmetic-geometric mean-like algorithm can be used. Let


Then compute


and the inverse tangent is given by


(Acton 1990).

An inverse tangent tan^(-1)n with integral n is called reducible if it is expressible as a finite sum of the form


where f_k are positive or negative integers and n_i are integers <n. tan^(-1)m is reducible iff all the prime factors of 1+m^2 occur among the prime factors of 1+n^2 for n=1, ..., m-1. A second necessary and sufficient condition is that the largest prime factor of 1+m^2 is less than 2m. Equivalent to the second condition is the statement that every Gregory number t_x=cot^(-1)x can be uniquely expressed as a sum in terms of t_ms for which m is a Størmer number (Conway and Guy 1996). To find this decomposition, write


so the ratio


is a rational number. Equation (50) can also be written


Writing (◇) in the form


allows a direct conversion to a corresponding inverse cotangent formula




Todd (1949) gives a table of decompositions of tan^(-1)n for n<=342. Conway and Guy (1996) give a similar table in terms of Størmer numbers.

Arndt and Gosper give the remarkable inverse tangent identity


There is an amazing set of BBP-type formulas for tan^(-1)(4/5):


the finding one of which is a given as a problem by Bailey et al. (2006, p. 225).

See also

Euler's Machin-Like Formula, Gauss's Machin-Like Formula, Inverse Cotangent, Inverse Trigonometric Functions, Machin's Formula, Machin-Like Formulas, Tangent

Related Wolfram sites

Explore with Wolfram|Alpha


Abramowitz, M. and Stegun, I. A.(Eds.). "Inverse Circular Functions." §4.4 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 79-83, 1972.Acton, F. S. "The Arctangent." In Numerical Methods that Work, upd. and rev. Washington, DC: Math. Assoc. Amer., pp. 6-10, 1990.Apostol, T. M. Calculus, 2nd ed., Vol. 1: One-Variable Calculus, with an Introduction to Linear Algebra. Waltham, MA: Blaisdell, pp. 255-256, 1967.Arndt, J. "Completely Useless Formulas.", D. H.; Borwein, J. M.; Calkin, N. J.; Girgensohn, R.; Luke, D. R.; and Moll, V. H. Experimental Mathematics in Action. Wellesley, MA: A K Peters, 2007.Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, pp. 142-143 and 220, 1987.Borwein, J.; Bailey, D.; and Girgensohn, R. "Euler's Continued Fraction." §1.8.2 in Experimentation in Mathematics: Computational Paths to Discovery. Wellesley, MA: A K Peters, p. 30, 2004.Bronshtein, I. N. and Semendyayev, K. A. Handbook of Mathematics, 3rd ed. New York: Springer-Verlag, p. 70, 1997.Bromwich, T. J. I. and MacRobert, T. M. An Introduction to the Theory of Infinite Series, 3rd ed. New York: Chelsea, 1991.Castellanos, D. "Rapidly Converging Expansions with Fibonacci Coefficients." Fib. Quart. 24, 70-82, 1986.Castellanos, D. "The Ubiquitous Pi. Part I." Math. Mag. 61, 67-98, 1988.Conway, J. H. and Guy, R. K. "Størmer's Numbers." The Book of Numbers. New York: Springer-Verlag, pp. 245-248, 1996.GNU C Library. "Mathematics: Inverse Trigonometric Functions.", R. W. "Joerg Arndt kindly forwarded me." posting, Jan.14, 1997.Gradshteyn, I. S. and Ryzhik, I. M. Tables of Integrals, Series, and Products, 6th ed. San Diego, CA: Academic Press, 2000.Harris, J. W. and Stocker, H. Handbook of Mathematics and Computational Science. New York: Springer-Verlag, p. 311, 1998.Hildebrand, J. D. "Arctan() Appreciation Home Page!", A. "Inverse Trigonometric and Hyperbolic Functions." §2.7 in Handbook of Mathematical Formulas and Integrals, 2nd ed. Orlando, FL: Academic Press, pp. 124-128, 2000.Lagrange, J.-L. "Sur l'usage des fractions continues dans le calcul intégral." Nouv. mém. de l'académie royale des sciences et belles-lettres Berlin, 236-264, 1776. Reprinted in Oeuvres, Vol. 4, pp. 301-302.Lambert, J. L. Beiträge zum Gebrauch der Mathematik und deren Anwendung. Theil 2. Berlin, 1770.Lehmer, D. H. "On Arccotangent Relations for pi." Amer. Math. Monthly 45, 657-664, 1938.Olds, C. D. Continued Fractions. New York: Random House, 1963.Salamin, G. Item 137 in Beeler, M.; Gosper, R. W.; and Schroeppel, R. HAKMEM. Cambridge, MA: MIT Artificial Intelligence Laboratory, Memo AIM-239, pp. 67-68, Feb.1972., N. J. A. Sequences A005408/M2400, A033999, A075553, and A075554 in "The On-Line Encyclopedia of Integer Sequences."Spanier, J. and Oldham, K. B. "Inverse Trigonometric Functions." Ch. 35 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 331-341, 1987.Todd, J. "A Problem on Arc Tangent Relations." Amer. Math. Monthly 56, 517-528, 1949.Wall, H. S. Analytic Theory of Continued Fractions. New York: Chelsea, 1948.Zwillinger, D.(Ed.). "Inverse Circular Functions." §6.3 in CRC Standard Mathematical Tables and Formulae. Boca Raton, FL: CRC Press, pp. 465-467, 1995.

Referenced on Wolfram|Alpha

Inverse Tangent

Cite this as:

Weisstein, Eric W. "Inverse Tangent." From MathWorld--A Wolfram Web Resource.

Subject classifications