with two arguments
When inverting the polar coordinates, one needs the arc tan function (http://planetmath.org/CyclometricFunctions) with two arguments. If , then is defined as the angle makes with the positive -axis.
One usually sees expressions like , which is equal to when is in the first quadrant. However, does not give the correct angle when is in the third quadrant (since ). Also, the quotient involves a division by zero when , which is damaging both numerically and mathematically.
In most mathematical software and programming languages the two-argument is directly implemented.
In Python language the functions atan(x) and atan2(x,y) are the respective one and two argument versions of . The point of having the two argument version is to determine the correct quadrant of the point. For instance, , so atan(x) cannot distinguish between and , but atan2(x,y) can, as the following Python code illustrates:
\PMlinkescapetext{ >>> from math import * >>> print atan(1) 0.785398163397 >>> print atan2(1,1) 0.785398163397 >>> print atan2(-1,-1) -2.3619449019 }
because has argument but has argument .
Analytic properties
In mathematical works, is simply denoted by . The symbol obviously refers to the angle, but it is really the function , where
The function is the polar-to-Cartesian coordinate transformation. By the inverse function theorem, the function (the Cartesian-to-polar coordinate transformation) exists and is smooth wherever it is defined. Note that cannot be defined continuously everywhere, because of the multi-valued nature of — and always map to the same point under . (Similarly, cannot defined when .) This means, if one chases a loop (say a circle) around the origin, would move from to , even though the image point winds back to the starting point.
Technically, a “largest” possible domain of (and ) can only be taken to be some simply connected open subset of . (Note: itself is not simply connected.) For example, such a domain might be , i.e. delete the negative real axis from .
The exterior derivative of is
(found by implicit differentiation), and hence
(which can also be found by differentiating directly and piecing the results for each quadrant).
Of course, the formulas above are only valid wherever is defined, but the analytical expressions do not change no matter which domain of definition is taken for . This allows for the following neat formula to find the total variation of angle of a smooth curve :
(This is related to the formula for the winding number and the argument principle in complex analysis.)
For example, if , for , is the circle that winds around the origin times, then .
Title | with two arguments |
---|---|
Canonical name | operatornamearcTanWithTwoArguments |
Date of creation | 2013-03-22 15:18:19 |
Last modified on | 2013-03-22 15:18:19 |
Owner | matte (1858) |
Last modified by | matte (1858) |
Numerical id | 11 |
Author | matte (1858) |
Entry type | Definition |
Classification | msc 51M04 |
Classification | msc 51-01 |
Synonym | angle function |