TOPICS
Search

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 tangent, although this distinction is not always made (e.g., Zwillinger 1995, p. 466).

ArcTan

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).

InverseTangentBranchCut

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

 tan^(-1)z=1/2i[ln(1-iz)-ln(1+iz)].
(1)

In the Wolfram Language (and in this work), this branch cut definition determines the range of tan^(-1)x for a real number x as (-pi/2,pi/2). Other continuous real branches differ by integer multiples of pi (NIST 2026, eq. 4.23.33).

ArcTanReIm
ArcTanContours

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

tan^(-1)z has the special values

tan^(-1)(-infty)=-1/2pi
(2)
tan^(-1)(-i)=-iinfty
(3)
tan^(-1)0=0
(4)
tan^(-1)i=iinfty
(5)
tan^(-1)infty=1/2pi.
(6)

The derivative of tan^(-1)z is

 d/(dz)tan^(-1)z=1/(1+z^2)
(7)

and the indefinite integral is

 inttan^(-1)zdz=ztan^(-1)z-1/2ln(1+z^2)+C.
(8)
InverseTangentYXReIm
InverseTangentYXContours

For a complex number z=x+iy with real numbers x>0 and y, its complex argument is

 theta=tan^(-1)(y/x),
(9)

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=rcostheta and y=rsintheta, where r=|z|. Plots of tan^(-1)(y/x) are illustrated above for real number values of x and y.

InverseTangent2ReIm
InverseTangent2ContourPlot

The two-argument inverse tangent takes into account the quadrant in which z lies. It 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], with 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.
(10)

For |z|<1, the usual tan^(-1)z has the Maclaurin series

tan^(-1)z=sum_(n=0)^(infty)((-1)^nz^(2n+1))/(2n+1)
(11)
=z-1/3z^3+1/5z^5-1/7z^7+...
(12)

(OEIS A033999 and A005408). The series also converges at the real endpoints z=+/-1. A more rapidly converging form due to Euler is given by

 tan^(-1)x=sum_(n=0)^infty(2^(2n)(n!)^2)/((2n+1)!)(x^(2n+1))/((1+x^2)^(n+1))
(13)

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

 tan^(-1)x=y/x(1+2/3y+(2·4)/(3·5)y^2+(2·4·6)/(3·5·7)y^3+...),
(14)

where

 y=(x^2)/(1+x^2),
(15)

and x!=0, with the value at 0 obtained by a limit.

Abrarov and Quine (2018) give the series

 tan^(-1)x=isum_(m=1)^infty1/(2m-1)[1/((1+(2i)/x)^(2m-1))-1/((1-(2i)/x)^(2m-1))]
(16)

for a real number x!=0. Each of the two complex component series is absolutely convergent, with limiting ratio of successive term absolute values x^2/(x^2+4), compared with x^2/(x^2+1) for Euler's series.

The inverse tangent formulas are connected with many interesting approximations to pi. For |x|<sqrt(2),

tan^(-1)(1+x)=pi/4+isum_(n=1)^(infty)((-1-i)^n-(i-1)^n)/(2^(n+1)n)x^n
(17)
=1/4pi+1/2x-1/4x^2+1/(12)x^3-1/(40)x^5+1/(48)x^6-1/(112)x^7+...
(18)

(OEIS A075553 and A075554).

The inverse tangent satisfies

 tan^(-1)z=cot^(-1)(1/z)
(19)

for z!=0,

 tan^(-1)z=-tan^(-1)(-z)
(20)

for all complex number arguments z,

tan^(-1)x=1/2pi-cos^(-1)(x/(sqrt(x^2+1)))
(21)
=sin^(-1)(x/(sqrt(x^2+1)))
(22)
=csc^(-1)((sqrt(x^2+1))/x)
(23)

for all real number arguments 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
(24)
={-1/2pi+cot^(-1)(-x) for x<0; 1/2pi+cot^(-1)(-x) for x>0
(25)
={-1/2pi-cot^(-1)x for x<0; 1/2pi-cot^(-1)x for x>0
(26)
={-cos^(-1)(1/(sqrt(x^2+1))) for x<0; cos^(-1)(1/(sqrt(x^2+1))) for x>0
(27)
={-sec^(-1)(sqrt(x^2+1)) for x<0; sec^(-1)(sqrt(x^2+1)) for x>0.
(28)

In terms of the hypergeometric function,

 tan^(-1)z=z_2F_1(1,1/2;3/2;-z^2)
(29)

for complex number arguments z, and

 tan^(-1)x=x/(1+x^2)_2F_1(1,1;3/2;(x^2)/(1+x^2))
(30)

for a real number x (Castellanos 1988).

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

tan^(-1)x=sum_(n=0)^(infty)((-1)^nF_(2n+1)t^(2n+1))/(5^n(2n+1))
(31)
=5sum_(n=0)^(infty)((-1)^nF_(2n+1)^2)/((2n+1)(u+sqrt(u^2+1))^(2n+1))
(32)
=sum_(n=0)^(infty)((-1)^n5^(n+2)F_(2n+1)^3)/((2n+1)(v+sqrt(v^2+5))^(2n+1)),
(33)

where t=2x/(1+sqrt(1+4x^2/5)), u=5(1+sqrt(1+24x^2/25))/(4x), and v is the largest positive root of

 8xv^4-100v^3-450xv^2+875v+625x=0.
(34)

The first series is valid for a real number x with |x|<=sqrt(5). The second and third series are valid for x>0.

The inverse tangent satisfies the addition formula

 tan^(-1)x+tan^(-1)y=tan^(-1)((x+y)/(1-xy))
(35)

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

 tan^(-1)(1/a)=2tan^(-1)(1/(2a))-tan^(-1)(1/(4a^3+3a))
(36)

valid for a real number a!=0. For general complex number arguments, a multiple of pi may be required to account for the branches. An additional identity known to Euler is given by

 tan^(-1)(1/(a-b))=tan^(-1)(1/a)+tan^(-1)(b/(a^2-ab+1))
(37)

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

 tan^(-1)(p+r)+tan^(-1)(p+q)-tan^(-1)p=1/2pi,
(38)

where

 1+p^2=qr
(39)

and p,q,r>0.

The inverse tangent has continued fraction representations

 tan^(-1)x=x/(1+(x^2)/(3+(4x^2)/(5+(9x^2)/(7+(16x^2)/(9+...)))))
(40)

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

 tan^(-1)x=x/(1+(x^2)/(3-x^2+(9x^2)/(5-3x^2+(25x^2)/(7-5x^2+...))))
(41)

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

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

a_0=(1+x^2)^(-1/2)
(42)
b_0=1.
(43)

Then compute

a_(i+1)=1/2(a_i+b_i)
(44)
b_(i+1)=sqrt(a_(i+1)b_i),
(45)

and the inverse tangent is given by

 tan^(-1)x=lim_(n->infty)x/(sqrt(1+x^2)a_n)
(46)

(Acton 1990).

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

 tan^(-1)n=sum_(k=1)^Nf_ktan^(-1)n_k,
(47)

where f_k are positive or negative integers and n_k are positive 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

 arg(1+in)=argproduct_(k=1)^N(1+n_ki)^(f_k),
(48)

so the ratio

 r=(product_(k=1)^(N)(1+n_ki)^(f_k))/(1+in)
(49)

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

 r^2(1+n^2)=product_(k=1)^N(1+n_k^2)^(f_k).
(50)

Writing (47) in the form

 tan^(-1)n=sum_(k=1)^Nf_ktan^(-1)n_k+ftan^(-1)1
(51)

allows a direct conversion to a corresponding inverse cotangent formula

 cot^(-1)n=sum_(k=1)^Nf_kcot^(-1)n_k+ccot^(-1)1,
(52)

where

 c=2-f-2sum_(k=1)^Nf_k.
(53)

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 inverse tangent identity (Gosper 1997), valid for real numbers a_k and a nonnegative integer n,

 sin(sum_(k=1)^(2n+1)tan^(-1)a_k)=((-1)^n)/(2n+1)(sum_(k=1)^(2n+1)product_(j=1)^(2n+1)[a_j-tan((pi(j-k))/(2n+1))])/(sqrt(product_(j=1)^(2n+1)(a_j^2+1))).
(54)

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

tan^(-1)(4/5)=1/(131072)sum_(k=0)^(infty)1/(1048576^k)[(262144)/(40k+2)-(163840)/(40k+5)-(65536)/(40k+6)+(16384)/(40k+10)-(4096)/(40k+14)-(5120)/(40k+15)+(1024)/(40k+18)-(256)/(40k+22)+(160)/(40k+25)+(64)/(40k+26)-(16)/(40k+30)+4/(40k+34)+5/(40k+35)-1/(40k+38)]
(55)
=1/(131072)sum_(k=0)^(infty)1/(1048576^k)[(393216)/(40k+4)+(163840)/(40k+5)-(131072)/(40k+6)-(163840)/(40k+8)+(24576)/(40k+12)-(8192)/(40k+14)-(15360)/(40k+15)-(10240)/(40k+16)-(1024)/(40k+20)-(512)/(40k+22)-(640)/(40k+24)-(160)/(40k+25)+(96)/(40k+28)-(32)/(40k+30)-(40)/(40k+32)+(15)/(40k+35)+6/(40k+36)-2/(40k+38)]
(56)
=1/(131072)sum_(k=0)^(infty)1/(1048576^k)[(262144)/(40k+1)-(262144)/(40k+3)-(65536)/(40k+5)-(327680)/(40k+6)+(65536)/(40k+7)-(163840)/(40k+8)+(16384)/(40k+9)-(40960)/(40k+10)-(16384)/(40k+11)-(4096)/(40k+13)-(20480)/(40k+14)-(16384)/(40k+15)-(10240)/(40k+16)+(1024)/(40k+17)-(1024)/(40k+19)-(2560)/(40k+20)-(256)/(40k+21)-(1280)/(40k+22)+(256)/(40k+23)-(640)/(40k+24)+(64)/(40k+25)-(64)/(40k+27)-(16)/(40k+29)-(40)/(40k+30)+(16)/(40k+31)-(40)/(40k+32)+4/(40k+33)+(16)/(40k+35)-1/(40k+37)-5/(40k+38)+1/(40k+39)]
(57)
=1/(262144)sum_(k=0)^(infty)1/(1048576^k)[(262144)/(40k+3)+(262144)/(40k+4)+(131072)/(40k+6)-(65536)/(40k+7)+(81920)/(40k+10)+(16384)/(40k+11)+(16384)/(40k+12)+(8192)/(40k+14)-(4096)/(40k+15)+(1024)/(40k+19)+(1024)/(40k+20)+(512)/(40k+22)-(256)/(40k+23)+(64)/(40k+27)+(64)/(40k+28)-(48)/(40k+30)-(16)/(40k+31)+4/(40k+35)+4/(40k+36)+2/(40k+38)-1/(40k+39)],
(58)

One of these formulas is requested as a problem by Bailey et al. (2007, p. 225).


See also

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

Related Wolfram sites

https://functions.wolfram.com/ElementaryFunctions/ArcTan/

Explore with Wolfram|Alpha

References

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.Abrarov, S. M. and Quine, B. M. "A Formula for Pi Involving Nested Radicals." Ramanujan J. 46, 657-665, 2018. https://doi.org/10.1007/s11139-018-9996-8.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." https://www.jjj.de/hfloat/hfloatpage.html#formulas.Bailey, 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.Bromwich, T. J. I. and MacRobert, T. M. An Introduction to the Theory of Infinite Series, 3rd ed. New York: Chelsea, 1991.Bronshtein, I. N. and Semendyayev, K. A. Handbook of Mathematics, 3rd ed. New York: Springer-Verlag, p. 70, 1997.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." https://sourceware.org/glibc/manual/latest/html_node/Inverse-Trig-Functions.html.Gosper, R. W. "Joerg Arndt kindly forwarded me." math-fun@cs.arizona.edu 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!" https://www.opensky.ca/~jdhildeb/arctan/.Jeffrey, 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, Germany, 1770.Lehmer, D. H. "On Arccotangent Relations for pi." Amer. Math. Monthly 45, 657-664, 1938.NIST. "Inverse Trigonometric Functions." §4.23 in Digital Library of Mathematical Functions. 2026. https://dlmf.nist.gov/4.23.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. https://www.inwap.com/pdp10/hbaker/hakmem/pi.html#item137.Sloane, 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 Resource. https://mathworld.wolfram.com/InverseTangent.html

Subject classifications