# Documentation

### This is machine translation

Translated by
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

# sech

Hyperbolic secant function

MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.

MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.

## Syntax

```sech(`x`)
```

## Description

`sech(x)` represents the hyperbolic secant function, `1/cosh(x)`. This function is 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.

The hyperbolic secant function simplifies to (-1)n at the points $i\pi n$, where n is an integer. The hyperbolic secant function has singularities at the points $\frac{\pi i}{2}+\pi in$, where n is an integer. If the argument involves a negative numerical factor of `Type::Real`, then symmetry relations are used to make this factor positive. See Example 2.

The functions `expand` and `combine` implement the addition theorems for the hyperbolic functions. See Example 3.

`sech(x)` is rewritten as `1/cosh(x)`. Use `expand` or `rewrite` to rewrite expressions involving `sech` in terms of other functions. See Example 4.

The inverse function is implemented as `arcsech`. See Example 5.

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

## Examples

### Example 1

Call `sech` with the following exact and symbolic input arguments:

`sech(I*PI), sech(1), sech(5 + I), sech(PI), sech(1/11), sech(8)`
``` ```
`sech(x), sech(x + I*PI), sech(x^2 - 4)`
``` ```

Floating-point values are computed for floating-point arguments:

`sech(1.234), sech(5.6 + 7.8*I), sech(1.0/10^20)`
``` ```

Floating-point intervals are computed for interval arguments:

`sech(-1...1), sech(1...10)`
``` ```

### Example 2

The hyperbolic secant function equals simplifies to (-1)n at the points $i\pi n$, where n is an integer:

`assume(n in Z_)`
`simplify(sech(n*I*PI))`
``` ```
`delete n`

Negative real numerical factors in the argument are rewritten via symmetry relations:

`sech(-5), sech(-3/2*x), sech(-x*PI/12), sech(-12/17*x*y*PI)`
``` ```

### Example 3

The `expand` function implements the addition theorems:

`expand(sech(x + PI*I)), expand(sech(x + y))`
``` ```

### Example 4

`sech(x)` is automatically rewritten as `1/cosh(x)`:

`sech(x)`
``` ```

Use `rewrite` to obtain a representation in terms of other target functions:

`rewrite(sech(x)*exp(2*x), sinhcosh), rewrite(sech(x), tanh)`
``` ```
`rewrite(sinh(x)*sech(y), exp), rewrite(sech(x), coth)`
``` ```

### Example 5

The inverse function is implemented as `arcsech`:

```sech(arcsech(x)), arcsech(sech(x))```
``` ```

Note that `arcsech(sech(x))` does not necessarily yield `x`, because `arcsech` produces values with imaginary parts in the interval $\left[-\frac{\pi }{2},\frac{\pi }{2}\right]$:

`arcsech(sech(3)), arcsech(sech(1.6 + 100*I))`
``` ```

### Example 6

`diff`, `float`, `limit`, `taylor`, `series`, and other system functions handle expressions involving the hyperbolic functions:

`diff(sech(x), x), float(sech(3)*coth(5 + I))`
``` ```
`limit(1/sech(sin(x)/x), x = 0)`
``` ```
`taylor(1/sech(x), x = 0)`
``` ```
`series(sech(x), x = 0)`
``` ```

## Parameters

 `x`

## Return Values

Arithmetical expression or a floating-point interval

## Overloaded By

`x`

Was this topic helpful?

Watch now