Sec
Sec[z]
gives the secant of z.
Details
- Mathematical function, suitable for both symbolic and numerical manipulation.
- The argument of Sec is assumed to be in radians. (Multiply by Degree to convert from degrees.)
- .
- 1/Cos[z] is automatically converted to Sec[z]. TrigFactorList[expr] does decomposition.
- For certain special arguments, Sec automatically evaluates to exact values.
- Sec can be evaluated to arbitrary numerical precision.
- Sec automatically threads over lists. »
- Sec can be used with Interval and CenteredInterval objects. »
Background & Context
- Sec is the secant function, which is one of the basic functions encountered in trigonometry. It is defined as the reciprocal of the cosine function: . It is defined for real numbers by letting be a radian angle measured counterclockwise from the axis along the circumference of the unit circle. Sec[x] then gives the reciprocal of the horizontal coordinate of the arc endpoint. The equivalent schoolbook definition of the secant of an angle in a right triangle is the ratio of the length of the hypotenuse to the length of the leg adjacent to .
- Sec 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. TrigFactorList can be used to factor expressions involving Sec into terms containing Sin and Cos. To specify an argument using an angle measured in degrees, the symbol Degree can be used as a multiplier (e.g. Sec[30 Degree]). When given exact numeric expressions as arguments, Sec may be evaluated to arbitrary numeric precision. Other operations useful for manipulation of symbolic expressions involving Sec include TrigToExp, TrigExpand, Simplify, and FullSimplify.
- Sec threads element-wise over lists and matrices. In contrast, MatrixFunction can be used to give the secant of a square matrix (i.e. the power series for the secant function with ordinary powers replaced by matrix powers) as opposed to the secants of the individual matrix elements.
- Sec is periodic with period , as reported by FunctionPeriod. Sec is periodic with period , as reported by FunctionPeriod. Sec satisfies the identity , which is equivalent to the Pythagorean theorem. The definition of the secant function is extended to complex arguments using the definition , where is the base of the natural logarithm. Sec has poles at for an integer and evaluates to ComplexInfinity at these points. Sec[z] has series expansion about the origin that may be expressed in terms of the Euler numbers EulerE.
- The inverse function of Sec is ArcSec. The hyperbolic secant is given by Sech. Other related mathematical functions include Cos and Csc.
Examples
open allclose allBasic Examples (7)
The argument is given in radians:
Use Degree to specify an argument in degrees:
Plot over a subset of the reals:
Scope (47)
Numerical Evaluation (5)
The precision of the output tracks the precision of the input:
Evaluate for complex arguments:
Evaluate Sec efficiently at high precision:
Compute the elementwise values of an array using automatic threading:
Or compute the matrix Sec function using MatrixFunction:
Compute worst-case guaranteed intervals using Interval and CenteredInterval objects:
Or compute average-case statistical intervals using Around:
Specific Values (6)
Values of Sec at fixed points:
Singular points of Sec:
Local extrema of Sec:
Find a local minimum of Sec as a root of :
Simple exact values are generated automatically:
More complicated cases require explicit use of FunctionExpand:
Visualization (3)
Function Properties (13)
The real domain of Sec:
Sec achieves all real values except the open interval :
Sec is a periodic function with a period :
Sec is an even function:
Sec has the mirror property :
Sec is not an analytic function:
Sec is monotonic in a specific range:
Sec is not injective:
Sec is not surjective:
Sec is neither non-negative nor non-positive:
It has both singularity and discontinuity when x is a multiple of π/2:
It is convex for x in [-1.5,1.5]:
TraditionalForm formatting:
Integration (3)
Series Expansions (4)
Function Identities and Simplifications (6)
Function Representations (4)
Representation through Sin:
Representation through Bessel functions:
Representation through SphericalHarmonicY:
Representation in terms of MeijerG:
Applications (4)
Properties & Relations (11)
Basic parity and periodicity properties of the secant function get automatically applied:
Use TrigFactorList to factor Sec into Sin and Cos:
Complicated expressions containing trigonometric functions do not autosimplify:
Evaluate under additional assumptions:
Compositions with the inverse functions:
Solve a trigonometric equation:
Numerically solve a transcendental equation:
Sec is automatically returned as a special case for many mathematical functions:
Possible Issues (5)
Machine-precision input is insufficient to give a correct answer:
With exact input, the answer is correct:
A larger setting for $MaxExtraPrecision is needed:
For arguments with imaginary part too large, the result cannot be represented by a computer:
The precision of the output can be much smaller or larger than the precision of the input:
In TraditionalForm, parentheses are needed around the argument:
Text
Wolfram Research (1988), Sec, Wolfram Language function, https://reference.wolfram.com/language/ref/Sec.html (updated 2021).
CMS
Wolfram Language. 1988. "Sec." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2021. https://reference.wolfram.com/language/ref/Sec.html.
APA
Wolfram Language. (1988). Sec. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Sec.html