Work with hyperbolic cosine using cosh
cosh(x) returns the hyperbolic cosine, defined by (e^x + e^-x) / 2. Unlike ordinary cosine, it is not periodic. For real x it is always at least 1 and grows rapidly as the magnitude of x increases.
Where cosh appears
Hyperbolic functions model shapes such as a hanging cable, as well as solutions to differential equations and transfer problems. A catenary can be expressed with a scaled and shifted cosh. Its companion sinh measures the odd hyperbolic component, and tanh is their ratio.
Identity and example
The fundamental identity is cosh(x)^2 - sinh(x)^2 = 1. For example, evaluate cosh(0) to get 1, then compare the identity at a small nonzero value. The inverse acosh recovers a real x from cosh(x) when the input is at least 1.
Input considerations
Real and complex values are supported, but large real magnitudes can overflow because exponentials grow quickly. Use exp when you specifically need the exponential components, and use a scaled formulation in numerical work when values are extreme. Do not substitute cos for cosh: although their names are similar, their graphs and identities are different.