# cosh()

cosh(x) returns hyperbolic cosine of x , the input number x is in radian.
import math
print(math.cosh(-1))       # 1.5430806348152437
print(math.cosh(-1.5))     # 2.352409615243247
print(math.cosh(-5))       # 74.20994852478785
print(math.cosh(0))        # 1.0
print(math.cosh(1))        # 1.5430806348152437
print(math.cosh(1.5))      # 2.352409615243247
print(math.cosh(5))        # 74.20994852478785
Note that all the inputs are in radian.

## Inputs in degree

We can convert radian value to degree and use the same
import math
in_degree = 60
print(math.cosh(in_redian)) # 1.600286857702386

## Drawing graph of cosh()

We will use Matplotlib to generate graph of cosh
import matplotlib.pyplot as plt
x=[]
y=[]
i=-10
while (i<=10):
x.append(i)
y.append(math.cosh(i))
i=i+0.1
plt.plot(x,y)
plt.axvline(x=0.00,linewidth=2, color='#f1f1f1')

plt.grid(linestyle='-',
linewidth=0.5,color='#f1f1f1')
plt.show()

Subscribe to our YouTube Channel here

## Subscribe

* indicates required
Subscribe to plus2net

plus2net.com