# Need help with integration

Can anyone help me with this:

$$\int \sqrt\frac{e^x-1}{e^x+1}\, \mathrm{d}x$$

I can't think of a good substitution, any hint is welcome :)
Thanks.

-
Do you assume anything on the region where $x$ is from? For example, is $x > 0$? –  Vincent Jan 17 '14 at 14:23
No, nothing is known about x. –  Genadi Jan 17 '14 at 14:24
Well, the expression is only defined for $x \geq 0$ –  aaaaa Jan 17 '14 at 14:28

An idea:

$$u^2:=\frac{e^x-1}{e^x+1}=1-\frac2{e^x+1}\iff e^x+1=\frac2{1-u^2}\;\;,\;\;e^x=\frac{1+u^2}{1-u^2}$$

$$\implies 2u\,du=\frac{2e^x}{(e^x+1)^2}dx\implies dx=\frac{\frac{4}{(1-u^2)^2}}{\frac{2(1+u^2)}{1-u^2}}2u\,du=\frac{4u\,du}{(1-u^2)(1+u^2)}$$

$$\int\sqrt{\frac{e^x-1}{e^x+1}}dx=\int \frac{4u^2}{(1-u^2)(1+u^2)}du=\int\left(\frac1{1-u}+\frac1{1+u}-\frac2{1+u^2}\right)du=$$

$$=\log(1-u^2)-2\arctan u+C=\;\ldots$$

-

HINT:

Let $\displaystyle\sqrt{\frac{e^x-1}{e^x+1}}=\tan\theta$

$\displaystyle\implies \frac{e^x-1}{e^x+1}=\frac{\tan^2\theta}1$

Applying Componendo and dividendo

$\displaystyle\implies\cos2\theta=\frac{1-\tan^2\theta}{1+\tan^2\theta}=e^{-x}$

$\displaystyle\implies-2\sin2\theta\ d\theta=-e^{-x}dx\iff dx=2\tan2\theta\ d\theta$

$$I=\int\sqrt{\frac{e^x-1}{e^x+1}}dx=\int \tan\theta\cdot 2\tan2\theta\ d\theta$$

Now using $\tan2A$ formula, $$\int \tan\theta\cdot 2\tan2\theta\ d\theta=\int\frac{2\sin^2\theta}{1-2\sin^2\theta}d\theta=\int\left(-1+\sec2\theta\right)d\theta$$

Can you take it home from here?

-

It's not elegant, but substitute $u^2 = \dfrac{e^x-1}{e^x+1}$, and you'll get a rational function in $u$ to integrate.

-

You can write

$$\frac {e^x-1}{e^x+1}=\frac {e^{x/2}-e^{-x/2}}{e^{x/2}+e^{-x/2}}=\tanh \frac x2$$

Thus, if

$$u=\sqrt{\frac {e^x-1}{e^x+1}}=\sqrt{\tanh \frac x2}$$

$$x = 2\arg \tanh u^2$$

$$\mathrm{d}x = \frac{4u\mathrm{d}u}{1-u^4}$$

Now,

$$\int \sqrt{\frac {e^x-1}{e^x+1}} \mathrm{d}x=\int \frac{4u^2\mathrm{d}u}{1-u^4}$$

And you can expand in partial fractions:

$$\frac{2u^2}{1-u^4}=\frac{2u^2-2+2}{(1+u^2)(1-u^2)}=\frac{2}{(1+u^2)(1-u^2)}-\frac{2}{1+u^2}$$

$$=\frac{1}{1-u^2}+\frac{1}{1+u^2}-\frac{2}{1+u^2}=\frac{1}{1-u^2}-\frac{1}{1+u^2}$$

And

$$\int \frac{1}{1-u^2}-\frac{1}{1+u^2} \mathrm{d}u=\arg \tanh u - \arctan u$$

Thus

$$\int \sqrt{\frac {e^x-1}{e^x+1}} \mathrm{d}x=2\arg \tanh \left( \sqrt{\tanh \frac x2}\right) - 2\arctan \left( \sqrt{\tanh \frac x2}\right)$$

-

$u = \sqrt{\frac{e^x - 1}{e^x + 1}}$ will work. Then you'll need partial fractions.

-

If you multiply numerator and denominator under the radical by $e^x-1$, you'll get $$\displaystyle \int \sqrt{\frac{(e^x-1)^2}{(e^x+1)(e^x-1)}}dx = \int \frac{e^x-1}{\sqrt{e^{2x}-1}}dx$$ which gives you two separate integrals which might be easier to see how to solve.

-