Documentation

cot

Cotangent function

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

cot(x)

Description

cot(x) represents the cotangent function cos(x)/sin(x).

Specify the argument x in radians, not in degrees. For example, use π to specify an angle of 180o.

All trigonometric functions are defined for complex arguments.

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

Translations by integer multiples of π are eliminated from the argument. Further, arguments that are rational multiples of π lead to simplified results; symmetry relations are used to rewrite the result using an argument from the standard interval . Explicit expressions are returned for the following arguments:

.

See Example 2.

The result is rewritten in terms of hyperbolic functions, if the argument is a rational multiple of I. See Example 3.

The functions expand and combine implement the addition theorems for the trigonometric functions. See Example 4.

The trigonometric functions do not respond to properties set via assume. Use simplify to take such properties into account. See Example 4.

Use rewrite to rewrite expressions in terms of a specific target function. For example, you can rewrite expressions involving the cotangent function in terms of other trigonometric functions and vice versa. See Example 5.

The inverse function is implemented as arccot. See Example 6.

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

Environment Interactions

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

Examples

Example 1

Call cot with the following exact and symbolic input arguments:

cot(PI/2), cot(1), cot(5 + I), cot(3*PI/2), cot(PI/11), cot(PI/8)

cot(-x), cot(x + PI), cot(x^2 - 4)

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

cot(123.4), cot(5.6 + 7.8*I), cot(1.0/10^20)

Floating-point intervals are computed for interval arguments:

ccot(1...2), cot(PI/4...3*PI/4), cot(0...PI)

For intervals containing discontinuities, the result is a union of intervals:

cot(2...4);
cot(-PI...-5/2)

Example 2

Some special values are implemented:

cot(PI/10), cot(2*PI/5), cot(123/8*PI), cot(-PI/12)

Translations by integer multiples of π are eliminated from the argument:

cot(x + 10*PI), cot(3 - PI), cot(x + PI), cot(2 - 10^100*PI)

All arguments that are rational multiples of π are transformed to arguments from the interval :

cot(4/7*PI), cot(-20*PI/9), cot(123/11*PI), cot(-PI/13)

Example 3

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

cot(5*I), cot(5/4*I), cot(-3*I)

For other complex arguments, use expand to rewrite the result:

cot(5*I + 2*PI/3), cot(PI/4 - 5/4*I), cot(-3*I + PI/2)

expand(cot(5*I + 2*PI/3)),
expand(cot(5/4*I - PI/4)),
expand(cot(-3*I + PI/2))

Example 4

The expand function implements the addition theorems:

expand(cot(x + PI/2)), expand(cot(x + y))

The trigonometric functions do not immediately respond to properties set via assume:

assume(n, Type::Integer):
cot((n + 1/2)*PI)

Use simplify to take such properties into account:

simplify(cot((n + 1/2)*PI))

assume(n, Type::Integer):
cot(n*PI + x), simplify(cot(n*PI + x))

y := cot(x + n*PI) + cot(x - n*PI);
simplify(y)

delete n, y

Example 5

Use rewrite to obtain a representation in terms of a specific target function:

rewrite(cot(x)*exp(2*I*x), sincos), rewrite(sin(x), cot)

Example 6

The inverse function is implemented asarccot:

cot(arccot(x)),
arccot(cot(x))

Note that arccot(cot(x)) does not necessarily yield x because arccot produces values with real parts in the interval [0,π]:

arccot(cot(4)), arccot(cot(3.2 + I))

Example 7

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

diff(cot(x), x), float(sin(3)*cot(5 + I))

limit(cot(PI/2 - x)/x, x = 0)

taylor(tan(x), x = 0)

Return Values

Arithmetical expression or a floating-point interval

Overloaded By

x

See Also

MuPAD Functions

Was this topic helpful?