Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

arctan

Inverse tangent function

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

Syntax

arctan(x)
arctan(y, x)

Description

arctan(x) represents the inverse of the tangent function.

arctan(y, x) is an alias for arg(x, y).

The angle returned by this function is measured in radians, not in degrees. For example, the result π represents an angle of 180o.

arctan is defined for complex arguments.

Floating-point values are returned for floating-point arguments. Floating-point intervals are returned for interval arguments. Unevaluated function calls are returned for most exact arguments.

If the argument is a rational multiple of I, the result is expressed in terms of hyperbolic functions. See Example 2.

The inverse tangent function is multivalued. The MuPAD® arctan function returns the value on the main branch. The branch cuts are the intervals (i,i] and [i,i) on the imaginary axis. Thus, arctan returns values, such that y = arctan(x) satisfies π2<(y)<π2 for any finite complex x.

The tan function returns explicit values for arguments that are certain rational multiples of π. For these values, arctan returns an appropriate rational multiple of π on the main branch. See Example 3.

The values jump when the arguments cross a branch cut. See Example 4.

The float attributes are kernel functions. Thus, floating-point evaluation is fast.

If you call arctan with two arguments, y and x, MuPAD calls the arg function that computes the polar angle of a complex number x + I*y. See Example 7 and the arg help page.

Environment Interactions

When called with a floating-point argument, arctan is sensitive to the environment variable DIGITS which determines the numerical working precision.

Examples

Example 1

Call arctan with the following exact and symbolic input arguments:

arctan(-5), arctan(1/sqrt(2)), arctan(5 + I),
arctan(1/3), arctan(0), arctan(1)

arctan(-x), arctan(x + 1), arctan(1/x)

Floating-point values are computed for floating-point arguments:

arctan(0.1234), arctan(5.6 + 7.8*I), arctan(1.0/10^20)

Floating-point intervals are computed for interval arguments:

arctan(-2...2), arctan(0...10)

Example 2

Arguments that are rational multiples of I are rewritten in terms of hyperbolic functions:

arcsin(5*I), arccos(5/4*I), arctan(-3*I)

For other complex arguments unevaluated function calls without simplifications are returned:

arcsin(1/2^(1/2) + I), arccos(1 -3*I)

Example 3

Some special values are implemented:

arctan(1), arctan((5 - 2*5^(1/2))^(1/2)), arctan(3^(1/2) - 2)

Such simplifications occur for arguments that are trigonometric images of rational multiples of π:

tan(9/10*PI), arctan(tan(9/10*PI))

Example 4

The values jump when crossing a branch cut:

arctan(2.0*I + 10^(-10)), arctan(2.0*I - 10^(-10))

On the branch cut, the values of arctan coincide with the limit "from the right" for imaginary arguments x = c*i where c > 1:

limit(arctan(2.0*I - 1/n), n = infinity);
limit(arctan(2.0*I + 1/n), n = infinity);
arctan(2.0*I)

The values coincide with the limit "from the left" for imaginary arguments x = c*i where c < -1:

limit(arctan(-2.0*I - 1/n), n = infinity);
limit(arctan(-2.0*I + 1/n), n = infinity);
arctan(-2.0*I)

Example 5

The inverse tangent function can be rewritten in terms of the logarithm function with complex arguments:

rewrite(arctan(x), ln)

Example 6

diff, float, limit, taylor, and other system functions handle expressions involving the inverse trigonometric functions:

diff(arctan(x), x), float(arccos(3)*arctan(5 + I))

limit(arctan(sin(x)/tan(x)), x = 0)

taylor(arctan(x), x = 0)

Example 7

When you call arctan with two arguments, MuPAD calls the arg function and computes the polar angle of a complex number:

arctan(y, x)

Parameters

x

Arithmetical expression or floating-point interval

y, x

Arithmetical expressions representing real numbers

Return Values

Arithmetical expression or floating-point interval.

Overloaded By

x

See Also

MuPAD Functions

Was this topic helpful?