Calculating integral of function with square root I don't have any idea how to calculate this integral.
I learned to calculate the elementary functions, and how to calculate by the positioning way.
For example $t=e^x+1  \rightarrow dt=e^x \, dx$ and then solving as usual.
I having trouble with this:
$\int \sqrt{e^x+1} \, dx$ and $\sqrt{e^x-1} \, dx$ but I guess it's very similar.
Thank you in advance.
 A: Define $\displaystyle u=\sqrt{e^x+1} \rightarrow \frac{du}{dx}=\frac{e^x}{2 \sqrt{e^x+1}}=\frac{e^x}{2u} \rightarrow dx=\frac{du\cdot{2u}}{e^x}=\frac{du\cdot{2u}}{u^2-1}$.
Do you know how to proceed?
Hint: $\displaystyle \frac{2u^2}{u^2-1}=2+\frac{2}{u^2-1}$. Does this help?
A: When we integrate an expression involving a square root expression $\sqrt{A}$, letting the radicand $A$ be the square of another variable sometimes works. For example, in your case, let $u^2 = e^x+1$. Then $$x = \ln(u^2-1) = \ln\big((u-1)(u+1)\big) = \ln(u-1)+\ln(u+1)$$ so that $$dx = \bigg(\frac{1}{u-1}+\frac{1}{u+1}\bigg)du.$$
Hence
$$
\int \sqrt{e^x+1}\,dx=\int\sqrt{u^2}\bigg(\frac{1}{u-1}+\frac{1}{u+1}\bigg)du =\int \bigg(\frac{u}{u-1}+\frac{u}{u+1}\bigg)du.
$$
You should be able to finish off the problem from here.
The same method turns out to work for the second integral, but the outcome is not so similar. Let $z^2=e^x-1$. Then
$x=\ln(z^2+1)$, so that $\displaystyle dx = \frac{2z}{z^2+1}dz$. Hence
$$
\int \sqrt{e^x-1}\,dx=\int\sqrt{z^2}\frac{2z}{z^2+1}dz = 2\int\frac{z^2}{z^2+1}dz = 2\int\bigg(1-\frac{1}{z^2+1}\bigg)dz.
$$
