gives the cosine of z.
- Mathematical function, suitable for both symbolic and numerical manipulation.
- Unless explicitly given as a Quantity object, the argument of Cos is assumed to be in radians. (Multiply by Degree to convert from degrees.) »
- Cos is automatically evaluated when its argument is a simple rational multiple of ; for more complicated rational multiples, FunctionExpand can sometimes be used. »
- For certain special arguments, Cos automatically evaluates to exact values.
- Cos can be evaluated to arbitrary numerical precision.
- Cos automatically threads over lists.
Background & Context
- Cos is the cosine function, which is one of the basic functions encountered in trigonometry. It is defined for real numbers by letting be a radian angle measured counterclockwise from the axis along the circumference of the unit circle. Cos[x] then gives the horizontal coordinate of the arc endpoint. The equivalent schoolbook definition of the cosine of an angle in a right triangle is the ratio of the length of the leg adjacent to to the length of the hypotenuse.
- Cos automatically evaluates to exact values when its argument is a simple rational multiple of . For more complicated rational multiples, FunctionExpand can sometimes be used to obtain an explicit exact value. To specify an argument using an angle measured in degrees, the symbol Degree can be used as a multiplier (e.g. Cos[30 Degree]). When given exact numeric expressions as arguments, Cos may be evaluated to arbitrary numeric precision. Other operations useful for manipulation of symbolic expressions involving Cos include TrigToExp, TrigExpand, Simplify, and FullSimplify.
- Cos threads elementwise over lists and matrices. In contrast, MatrixFunction can be used to give the cosine of a square matrix (i.e. the power series for the cosine function with ordinary powers replaced by matrix powers) as opposed to the cosines of the individual matrix elements.
- Cos is periodic with period , as reported by FunctionPeriod. Cos satisfies the identity , which is equivalent to the Pythagorean theorem. The definition of the cosine function is extended to complex arguments using the definition , where is the base of the natural logarithm. The cosine function is entire, meaning it is complex differentiable at all finite points of the complex plane. Cos[z] has series expansion about the origin.
- The inverse function of Cos is ArcCos. The hyperbolic cosine is given by Cosh. Other related mathematical functions include Sec and Sin.
Examplesopen allclose all
Basic Examples (5)
Use Degree to specify an argument in degrees:
Numerical Evaluation (6)
Specific Values (5)
Values of Cos at fixed points:
Zeros of Cos:
Extrema of Cos:
Find a minimum of Cos as the root of in the minimum's neighborhood:
More complicated cases require explicit use of FunctionExpand:
Plot the Cos function:
Function Properties (13)
Cos is defined for all real and complex values:
Cos achieves all real values between -1 and 1:
Cos is a periodic function with a period :
Cos is an even function:
Cos has the mirror property :
Cos is an analytic function of x:
Cos is monotonic in a specific range:
Cos is not injective:
Cos is not surjective:
Cos is neither non-negative nor non-positive:
Cos has no singularities or discontinuities:
Cos is neither convex nor concave:
Series Expansions (4)
Integral Transforms (3)
Function Identities and Simplifications (6)
Properties & Relations (11)
Cos appears in special cases of many mathematical functions:
Cos is a numeric function:
The generating function for Cos:
The exponential generating function for Cos:
Possible Issues (5)
A larger setting for $MaxExtraPrecision can be needed:
Continuous functions involving Cos[x] can give discontinuous indefinite integrals:
In TraditionalForm, parentheses are needed around the argument:
Neat Examples (5)
Plot Cos at integer points:
Wolfram Research (1988), Cos, Wolfram Language function, https://reference.wolfram.com/language/ref/Cos.html (updated 2015).
Wolfram Language. 1988. "Cos." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2015. https://reference.wolfram.com/language/ref/Cos.html.
Wolfram Language. (1988). Cos. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Cos.html