# Math Help - rational substiution integral

1. ## rational substiution integral

$\int \frac{dx}{\sqrt{1+e^{x}}}$

$u^{2}=1+e^{x}$

[tex] 2u du=e^{x} dx [tex]

I finally get to

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

so if this is right

can somebody help me with hte second part of the last integral

and if it's wrong somekind of solution

2. Originally Posted by akhayoon
$\int \frac{dx}{\sqrt{1+e^{x}}}$

$u^{2}=1+e^{x}$

[tex] 2u du=e^{x} dx [tex]

I finally get to

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

so if this is right

can somebody help me with hte second part of the last integral

and if it's wrong somekind of solution
i get something different for the integral. by the way, i don't like the substitution you made because $\sqrt{u^2} = |u| \ne u$, but anyway, you'd get something like $2 \int \frac {du}{u^2 - 1}$ if we say $u > 0$

an alternative is to use two substitutions. first $u = 1 + e^x$ and then $t = \sqrt{u}$ and you'll get a similar integral to the one above

if you're still interested, completing the square coupled with substitution can take care of your original integral

3. Hello, akhayoon!

Your substitution should have come out like Jhevon's . . .

$\int \frac{dx}{\sqrt{1+e^{x}}}$

Let $u = \sqrt{1+e^x}\quad\Rightarrow\quad e^x \:=\:u^2-1\quad\Rightarrow\quad x \:=\:\ln(u^2-1) \quad\Rightarrow\quad dx \:=\:\frac{2u\,du}{u^2-1}$

Substitute: . $\int\frac{1}{u}\cdot\frac{2u\,du}{u^2-1} \;=\;2\int\frac{du}{u^2-1} \;=\;\ln\left|\frac{u-1}{u+1}\right| + C$

Back-substitute: . $\boxed{\ln\left|\frac{\sqrt{1+e^x} - 1}{\sqrt{1+e^x} + 1}\right| + C}$

~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

Here's another method . . . it's either brilliant or incredibly stupid.

Let $e^x \:=\:\tan^2\theta\quad\Rightarrow\quad x \:=\:2\ln|\tan\theta|\quad\Rightarrow\quad dx \:=\:\frac{2\sec^2\!\theta}{\tan\theta}\,d\theta$

Substitute: . $\int\frac{1}{\sec\theta}\cdot\frac{2\sec^2\!\theta }{\tan\theta}\,d\theta \;=\;2\int\csc\theta\,d\theta \;=\;2\!\cdot\!\ln|\csc\theta - \cot\theta| + C$

Back-substitute

We have: . $\tan\theta \:=\:e^{\frac{x}{2}}$

This is a right triangle with: . $opp = e^{\frac{x}{2}},\;adj = 1$
Hence: . $hyp = \sqrt{1+e^x} \quad\Rightarrow\quad\csc\theta = \frac{\sqrt{1+e^x}}{e^{\frac{x}{2}}},\;\cot\theta = \frac{1}{e^{\frac{x}{2}}}$

So we have: . $2\!\cdot\!\ln\left|\frac{\sqrt{1+e^x}}{e^{\frac{x} {2}}} - \frac{1}{e^{\frac{x}{2}}}\right| + C \;=\;2\!\cdot\!\ln\left|\frac{\sqrt{1+e^x} - 1}{e^{\frac{x}{2}}}\right| + C$

. . $= \;2\ln\left|\sqrt{1+e^x} - 1\right| - 2\ln\left|e^{\frac{x}{2}}\right| + C \;=\;2\!\cdot\!\ln\left|\sqrt{1+e^x} - 1\right| - \ln\left(e^{\frac{x}{2}}\right)^2 + C$

. . $= \;2\!\cdot\!\ln\left|\sqrt{1+e^x} - 1\right| - \ln(e^x) + C \;=\;\boxed{2\!\cdot\!\ln\left|\sqrt{1+e^x} - 1\right| - x + C}
$

You mission (should you decide to accept it)
. . is to prove that my two answers are equivalent.
.

4. Originally Posted by Soroban
Here's another method . . . it's either brilliant or incredibly stupid.
i say brilliant! so crazy, it's brilliant! ...though not for the faint of heart, or those new to the world of integrals. how did you discover such a substitution? was the integral given in a "special form"?

You mission (should you decide to accept it)
. . is to prove that my two answers are equivalent.
.
later

5. One can play with trig. sub. as many times as necessary.

700% personal opinion, I don't like trig. substitutions, some times it turns the integrand into a mess, but it depends of the problem.

I prefer workin' with algebra, you can get faster solutions, especially the reciprocal substitution, which can turn a nasty integral, into a cute one. (Not always, of course.)