gives the hyperbolic secant of z.


  • Mathematical function, suitable for both symbolic and numerical manipulation.
  • .
  • 1/Cosh[z] is automatically converted to Sech[z]. TrigFactorList[expr] does decomposition.
  • For certain special arguments, Sech automatically evaluates to exact values.
  • Sech can be evaluated to arbitrary numerical precision.
  • Sech automatically threads over lists.

Background & Context

  • Sech is the hyperbolic secant function, which is the hyperbolic analogue of the Sec circular function used throughout trigonometry. It is defined as the reciprocal of the hyperbolic cosine function as . It is defined for real numbers by letting be twice the area between the axis and a ray through the origin intersecting the unit hyperbola . Sech[α] then represents the reciprocal of the horizontal coordinate of the intersection point. The equivalent definition of hyperbolic secant is , where is the base of the natural logarithm Log.
  • Sech automatically evaluates to exact values when its argument is the (natural) logarithm of a rational number. When given exact numeric expressions as arguments, Sech may be evaluated to arbitrary numeric precision. TrigFactorList can be used to factor expressions involving Sech into terms containing Sinh, Cosh, Sin, and Cos. Other operations useful for manipulation of symbolic expressions involving Sech include TrigToExp, TrigExpand, Simplify, and FullSimplify.
  • Sech threads element-wise over lists and matrices. In contrast, MatrixFunction can be used to give the hyperbolic secant of a square matrix (i.e. the power series for the hyperbolic secant function with ordinary powers replaced by matrix powers) as opposed to the hyperbolic secants of the individual matrix elements.
  • Sech[x] decreases exponentially as x approaches . Sech satisfies an identity similar to the Pythagorean identity satisfied by Sec, namely . The definition of the hyperbolic secant function is extended to complex arguments by way of the identity . Sech has poles at values for an integer and evaluates to ComplexInfinity at these points. Sech[z] has series expansion sum_(k=0)^infty(TemplateBox[{{2,  , k}}, EulerE])/((2 k)!)z^(2 k) about the origin that may be expressed in terms of the Euler numbers EulerE.
  • The inverse function of Sech is ArcSech. Related mathematical functions include Cosh and Csch.


open allclose all

Basic Examples  (5)

Evaluate numerically:

Plot over a subset of the reals:

Plot over a subset of the complexes:

Series expansion at the origin:

Asymptotic expansion at a singular point:

Scope  (40)

Numerical Evaluation  (6)

Evaluate numerically:

Evaluate to high precision:

The precision of the output tracks the precision of the input:

Sech can take complex number inputs:

Evaluate Sech efficiently at high precision:

Sech can deal with realvalued intervals:

Sech threads elementwise over lists and matrices:

Specific Values  (4)

Values of Sech at fixed purely imaginary points:

Values at infinity:

Maximum of Sech:

Find the maximum as a root of :

Substitute in the value:

Visualize the result:

Simple exact values are generated automatically:

More complicated cases require explicit use of FunctionExpand:

Visualization  (3)

Plot the Sech function:

Plot the real part of :

Plot the imaginary part of :

Polar plot with :

Function Properties  (5)

Sech is defined for all real values:

Complex domain:

Sech achieves all real values from the interval :

Sech is an even function:

Sech has the mirror property sech(TemplateBox[{z}, Conjugate])=TemplateBox[{{sech, (, z, )}}, Conjugate]:

TraditionalForm formatting:

Differentiation  (3)

First derivative:

Higher derivatives:

Formula for the ^(th) derivative:

Integration  (3)

Indefinite integral of Sech:

Definite integral of an even function over the interval centered at the origin:

This is twice the integral over half the interval:

More integrals:

Series Expansions  (4)

Find the Taylor expansion using Series:

Plot the first three approximations for Sech around :

General term in the series expansion of Sech:

The first term of Fourier series for Sech:

Sech can be applied to power series:

Integral Transforms  (2)

Compute the Laplace transform using LaplaceTransform:


Function Identities and Simplifications  (6)

Sech of a double angle:

Sech of a sum:

Convert multipleangle expressions:

Convert sums of hyperbolic functions to products:

Expand assuming real variables and :

Convert to exponentials:

Function Representations  (4)

Representation through Cos:

Representation through Bessel functions:

Representation through Jacobi functions:

Representation in terms of MeijerG:

Applications  (5)

Plot a tractrix pursuit curve:

Plot a pseudosphere:

Calculate the finite area of the surface extending to infinity:

A soliton in the Kortewegde Vries equation:

A Schrödinger equation with a zero energy solution:

Calculate the CDF of the hyperbolic secant PDF:

Plot the PDF and CDF:

Properties & Relations  (11)

Basic parity and periodicity properties of Sech get automatically applied:

Expressions containing hyperbolic functions do not automatically simplify:

Use Refine, Simplify, and FullSimplify to simplify expressions containing Sech:

Use FunctionExpand to express special values in radicals:

Compose with inverse functions:

Solve a hyperbolic equation:

Numerically find a root of a transcendental equation:

Reduce a hyperbolic equation:

Obtain Sech from sums, products, and integrals:

Sech appears in special cases of special functions:

Sech is a numeric function:

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 can be needed:

The inverse of Sech evaluates to Cosh:

No power series exists at infinity, where Sech has an essential singularity:

In TraditionalForm, parentheses are needed around the argument:

Wolfram Research (1988), Sech, Wolfram Language function, (updated 1996).


Wolfram Research (1988), Sech, Wolfram Language function, (updated 1996).


@misc{reference.wolfram_2020_sech, author="Wolfram Research", title="{Sech}", year="1996", howpublished="\url{}", note=[Accessed: 15-January-2021 ]}


@online{reference.wolfram_2020_sech, organization={Wolfram Research}, title={Sech}, year={1996}, url={}, note=[Accessed: 15-January-2021 ]}


Wolfram Language. 1988. "Sech." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 1996.


Wolfram Language. (1988). Sech. Wolfram Language & System Documentation Center. Retrieved from