# Use integration by substitution on exponential form of an inverse hyperbolic function?

I've been doing this question for a bit and I can't get my head around it.
I'm meant to evaluate $I = \int \frac1{\cosh(x)} dx$ by substitution, using $e^x$ as $u$.

So far I have,

$$\int \frac{2}{e^x+e^{-x}} dx$$

$u=e^x, du=e^xdx$

"$dx=du/e^x$" --Not sure if I can do this.

$$2\int \frac{\frac{1}{e^x}}{e^x+\frac{1}{e^x}} du\\ 2\int \frac{\frac{1}{u}}{u+\frac{1}{u}} du$$

And at this stage I get stuck. It looks kind of a function and its derivative I think? If I represent it as:

$$2\int u^{-1}(u+u^{-1})^{-1}$$

But not enough for me to be able to obviously recognise it and doctor it to use integration by substitution again. I think I'm overthinking the question and it's probably a lot simpler than this. Thanks heaps for any help.

• The solution may be very similar to $\int\frac1{\cos(x)}~dx$ Oct 15, 2017 at 23:39
• $$\int\frac{\frac1u}{u+\frac1u}=\int\frac1{u^2+1}=\arctan(\dots$$ Oct 15, 2017 at 23:41
• As per the "Not sure if I can do this" step, consider rewriting it as $x=\ln(u)$ and $dx=\frac1udu$, which is equivalent to what you reached. Oct 15, 2017 at 23:43
• Thank you for your help! Oct 16, 2017 at 0:27

$$\int \frac{2}{e^x+e^{-x}} dx$$ Let $u=e^x\implies du=e^xdx=udx$. So, $$\int \frac{2}{e^x+e^{-x}} d=2\int\dfrac{\frac{1}{u}}{u+\frac{1}{u}}du=2\int\dfrac{1}{u^2+1}du=?$$ Hints: multiplied by $\frac{u}{u}$ in second to last step. If you don't recognize that final integral, try using the substitution $u=\tan(v)$ to finish (and recall the derivative of $\tan(.)$!).
So we have $$\int \frac{1}{\cosh(x)}\,dx=\int\text{sech}{(x)}\,dx=\int \frac{2}{e^x+e^{-x}}\,dx$$ Now we substitute $x=\ln(u)$. $dx=\frac{1}{u}du$ $$\int \frac{2}{e^x+e^{-x}}\,dx=2\int\left(\frac{1}{u+u^{-1}}\right)\left(\frac{du}{u}\right)=2\int\frac{du}{u^2+1}$$ The last integral is a standard one; substitute $u=\tan(\theta)$. You should then get $$2\int\frac{du}{u^2+1}=2\arctan(u)+C$$ Remembering that $x=\ln(u)$ or equivalently that $u=e^x$ we get $$\int \text{sech}{(x)}\,dx=2\arctan(e^x)+C$$ Added bonus: From this, we get that $$\int_{-\infty}^{\infty}\text{sech}(x)\,dx=\lim_{b\to\infty}\left(2\arctan(e^x)\Big|_{-b}^{b}\right)=2\left(\frac{\pi}{2}\right)=\pi$$
• I suppose it is beautiful, but I'll probably say that about every non-trivial integral that evaluates to $\pi$. Oct 16, 2017 at 13:30