sec

sec(x)

Try it yourself:

See also:

Calculate secant with sec

sec(x) returns the reciprocal of cosine: 1 / cos(x). It is useful in trigonometric identities and formulas expressed through reciprocal ratios.

Example

sec(0) is 1. See cos for the direct ratio and asec for an inverse principal angle. The identity sec(x)^2 = 1 + tan(x)^2 connects it to tan.

Domain caution

Secant is undefined where cosine is zero, at odd multiples of pi/2. It grows rapidly near those angles, so use pi for exact radians and handle near-pole values deliberately.

Try Sec in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions