Cosecant function

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.




csc(x) represents the cosecant function 1/sin(x).

The arguments have to be specified in radians, not in degrees. E.g., 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:


Cf. Example 2.

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

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

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

csc(x) is immediately rewritten as 1/sin(x). Cf. Example 5.

The inverse function is implemented by arccsc. Cf. Example 6.

The float attributes are kernel functions, i.e., 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.


Example 1

We demonstrate some calls with exact and symbolic input data:

sin(PI), cos(1), tan(5 + I), csc(PI/2), sec(PI/11), cot(PI/8)

sin(-x), cos(x + PI), tan(x^2 - 4)

Floating point values are computed for floating-point arguments:

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

Floating point intervals are computed for interval arguments:

sin(0 ... 1), cos(20 ... 30), tan(0 ... 5)

For the functions with discontinuities, the result may be a union of intervals:

csc(-1 ... 1), tan(1 ... 2)

Example 2

Some special values are implemented:

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

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

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

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

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

Example 3

Arguments that are rational multiples of I are rewritten in terms of hyperbolicfunctions:

sin(5*I), cos(5/4*I), tan(-3*I)

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

sin(5*I + 2*PI/3), cos(PI/4 - 5/4*I), tan(-3*I + PI/2)

expand(sin(5*I + 2*PI/3)), expand(cos(5/4*I - PI/4)),
expand(tan(-3*I + PI/2))

Example 4

The expand function implements the addition theorems:

expand(sin(x + PI/2)), expand(cos(x + y))

The combine function uses these theorems in the other direction, trying to rewrite products of trigonometric functions:

combine(sin(x)*sin(y), sincos)

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

assume(n, Type::Integer): sin(n*PI), cos(n*PI)

Use simplify to take such properties into account:

simplify(sin(n*PI)), simplify(cos(n*PI))

assume(n, Type::Odd): sin(n*PI + x), simplify(sin(n*PI + x))

y := cos(x + n*PI) + cos(x - n*PI):  y, simplify(y)

delete n, y:

Example 5

Various relations exist between the trigonometric functions:

csc(x), sec(x)

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

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

Example 6

The inverse functions are implemented by arcsin, arccos etc.:

sin(arcsin(x)), sin(arccos(x)), cos(arctan(x))

Note that arcsin(sin(x)) does not necessarily yield x, because arcsin produces values with real parts in the interval :

arcsin(sin(3)), arcsin(sin(1.6 + I))

Example 7

Various system functions such as diff, float, limit, or series handle expressions involving the trigonometric functions:

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

limit(x*sin(x)/tan(x^2), x = 0)

series((tan(sin(x)) - sin(tan(x)))/sin(x^7), x = 0)

Return Values

Arithmetical expression or a floating-point interval

Overloaded By


See Also

MuPAD Functions

Was this topic helpful?