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.


Inverse cosine 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.




arccos(x) represents the inverse of the cosine function.

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

arccos 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 cosine function is multivalued. The MuPAD® arccos function returns the value on the main branch. The branch cuts are the real intervals (- ∞, - 1) and (1, ∞). Thus, arccos returns values, such that y = arccos(x) satisfies 0(y)π for any finite complex x.

The cos function returns explicit values for arguments that are certain rational multiples of π. For these values, arccos 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.

Environment Interactions

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


Example 1

Call arccos with the following exact and symbolic input arguments:

arccos(1), arccos(1/sqrt(2)), arccos(5 + I),
arccos(1/3), arccos(I), arccos(sqrt(2))

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

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

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

Floating-point intervals are computed for interval arguments:

arccos(-1/2...1/2), arccos(0...1)

Example 2

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

arccos(2*I), arccos(-I/2), arccos(-3*I)

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

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

Example 3

Some special values are implemented:

arccos(1/sqrt(2)), arccos((5^(1/2) - 1)/4), arccos(1/2)

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

cos(9/10*PI), arccos(cos(9/10*PI))

Example 4

The values jump when crossing a branch cut:

arccos(-2.0 + I/10^10), arccos(-2.0 - I/10^10)

On the branch cut, the values of arccos coincide with the limit “from below” for real arguments x > 1:

limit(arccos(2.0 - I/n), n = infinity);
limit(arccos(2.0 + I/n), n = infinity);

The values coincide with the limit “from above” for real x < - 1:

limit(arccos(-2.0 - I/n), n = infinity);
limit(arccos(-2.0 + I/n), n = infinity);

Example 5

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

rewrite(arccos(x), ln)

Example 6

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

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

limit(arccos(1 + sin(x)/x), x = 0)

taylor(arccos(x), x = 0)

series(arccos(2 + x), x, 3)

Return Values

Arithmetical expression or floating-point interval.

Overloaded By


See Also

MuPAD Functions

Was this topic helpful?