<s>[INST] Finding $\int_{0}^{1}{ \frac{ e^x}{ \cosh(x)} \,dx}$ using substitution $t = \cosh(x)$ $$\int_{0}^{1}{ \frac{ e^x}{ \cosh(x)} \,dx}$$
Hello,

I have to substitute with $$t = \cosh (x)$$

I just don´t know what to do with the e-function.
Thanks.
 [/INST] Note that $\cosh(x) = \frac{e^x + e^{-x}}{2}$, so $$\frac{e^{x}}{\cosh(x)} = \frac{2 e^{x}}{e^{x}+e^{-x}} = \frac{2}{1+e^{-2x}}$$
Now subsitute $u=e^{-x}$ (which gives $du = -e^{-x}dx = -u dx$) to find: $$\int \frac{2}{1+e^{-2x}} dx = \int \frac{-2}{u(1+u^2)} du$$
The rest is straightforward.

The remainder of the work can be completed using partial fraction decomposition:
$$\frac{1}{u(1+u^2)} = \frac{A}{u} + \frac{Bu+C}{1+u^2}$$
Which gives:
$$1=A(1+u^2) + (Bu+C)u$$
Setting $u=0$ tells us $A=1$. Then $$1=1+u^2 + Bu^2 + Cu$$ $$0=(1+B)u^2 + Cu$$ and we see that $B=-1$ and $C=0$.
Therefore $$\frac{1}{u(1+u^2)} = \frac{1}{u} - \frac{u}{1+u^2}.$$
Now we have $$\int \frac{-2}{u(1+u^2)} du = -2 \int \frac{1}{u} -\frac{u}{1+u^2} du$$
$$= -2 \left( \ln(u) - \int \frac{u}{1+u^2} du \right)$$
Finish by using another substitution $w=1+u^2$. This gives $dw = 2u du$ and $$= -2 \left( \ln(u) - \frac{1}{2}\int \frac{1}{w} dw \right) = -2 \left( \ln(u) - \frac{\ln(1+u^2)}{2}\right)$$
Finally, replace $u$ by $e^{-x}$ to find:
$$\int \frac{2}{1+e^{-2x}} dx = 2x + \ln(1+e^{-2x}) +C.$$
Then plug in the bounds.
</s>