Integral of $$$\frac{1}{\cosh{\left(x \right)}}$$$
Related calculator: Definite and Improper Integral Calculator
Your Input
Find $$$\int \frac{1}{\cosh{\left(x \right)}}\, dx$$$.
Solution
Rewrite the hyperbolic function in terms of the exponential:
$${\color{red}{\int{\frac{1}{\cosh{\left(x \right)}} d x}}} = {\color{red}{\int{\frac{1}{\frac{e^{x}}{2} + \frac{e^{- x}}{2}} d x}}}$$
Simplify the integrand:
$${\color{red}{\int{\frac{1}{\frac{e^{x}}{2} + \frac{e^{- x}}{2}} d x}}} = {\color{red}{\int{\frac{2}{e^{x} + e^{- x}} d x}}}$$
Apply the constant multiple rule $$$\int c f{\left(x \right)}\, dx = c \int f{\left(x \right)}\, dx$$$ with $$$c=2$$$ and $$$f{\left(x \right)} = \frac{1}{e^{x} + e^{- x}}$$$:
$${\color{red}{\int{\frac{2}{e^{x} + e^{- x}} d x}}} = {\color{red}{\left(2 \int{\frac{1}{e^{x} + e^{- x}} d x}\right)}}$$
Simplify:
$$2 {\color{red}{\int{\frac{1}{e^{x} + e^{- x}} d x}}} = 2 {\color{red}{\int{\frac{e^{x}}{e^{2 x} + 1} d x}}}$$
Let $$$u=e^{x}$$$.
Then $$$du=\left(e^{x}\right)^{\prime }dx = e^{x} dx$$$ (steps can be seen »), and we have that $$$e^{x} dx = du$$$.
Therefore,
$$2 {\color{red}{\int{\frac{e^{x}}{e^{2 x} + 1} d x}}} = 2 {\color{red}{\int{\frac{1}{u^{2} + 1} d u}}}$$
The integral of $$$\frac{1}{u^{2} + 1}$$$ is $$$\int{\frac{1}{u^{2} + 1} d u} = \operatorname{atan}{\left(u \right)}$$$:
$$2 {\color{red}{\int{\frac{1}{u^{2} + 1} d u}}} = 2 {\color{red}{\operatorname{atan}{\left(u \right)}}}$$
Recall that $$$u=e^{x}$$$:
$$2 \operatorname{atan}{\left({\color{red}{u}} \right)} = 2 \operatorname{atan}{\left({\color{red}{e^{x}}} \right)}$$
Therefore,
$$\int{\frac{1}{\cosh{\left(x \right)}} d x} = 2 \operatorname{atan}{\left(e^{x} \right)}$$
Add the constant of integration:
$$\int{\frac{1}{\cosh{\left(x \right)}} d x} = 2 \operatorname{atan}{\left(e^{x} \right)}+C$$
Answer
$$$\int \frac{1}{\cosh{\left(x \right)}}\, dx = 2 \operatorname{atan}{\left(e^{x} \right)} + C$$$A