Hi all!
im stuck again with this difficult integral
$\displaystyle \int \frac{dx}{1+e^x}$
can u help with what to substitute
??
and we're not yet in integration by parts
Hi all!
im stuck again with this difficult integral
$\displaystyle \int \frac{dx}{1+e^x}$
can u help with what to substitute
??
and we're not yet in integration by parts
Hello, ^_^Engineer_Adam^_^!
This is one of my favorite integrals.
I posted a long discourse on it on SOSMath in 2003.
(1) Plato had the best method: .multiply top and bottom by $\displaystyle e^{-x}$$\displaystyle \int \frac{dx}{1+e^x}$
His answer: .$\displaystyle -\ln(e^{-x} +1) + C$
(2) CaptainBlack also had a good approach: Partial Fractions.
He had: .$\displaystyle \int\left(\frac{1}{u} - \frac{1}{u+1}\right)\,du \;=\;\ln(u) - \ln(u + 1) + C$
Back-substitute: .$\displaystyle \ln(e^x) - \ln(e^x + 1) + C \;=\;x - \ln(e^x + 1) + C$
(3) We can use Long Division:. . $\displaystyle \int\frac{1}{1+e^x}\,dx \;=\;\int\frac{1 + e^x - e^x}{1 + e^x}\,dx \;=\;\int\left(\frac{1+e^x}{1+e^x} - \frac{e^x}{1+e^x}\right)\,dx$
. . $\displaystyle =\;\int\left(1 - \frac{e^x}{1 + e^x}\right)\,dx \;= \;x - \ln(1 + e^x) + C$
(4) One day, while totally bored, I came up with this substitution . . .
Let $\displaystyle e^x = \tan^2\!\theta \quad\Rightarrow\quad e^{\frac{x}{2}} = \tan\theta \quad\Rightarrow\quad \frac{x}{2} = \ln(\tan\theta) \quad\Rightarrow\quad dx = 2\frac{\sec^2\theta}{\tan\theta}\,d\theta$
Substitute: .$\displaystyle \int\frac{2\frac{\sec^2\theta}{\tan\theta}\,d\thet a}{\sec^2\theta} \;=\;2\int\cot\theta\,d\theta \;=\;2\ln(\sin\theta) + C$
Since $\displaystyle \tan\theta = e^{\frac{x}{2}}$, then $\displaystyle \theta$ is in a right triangle
. . with: .$\displaystyle opp = e^{\frac{x}{2}}$ and $\displaystyle adj = 1$
Hence: .$\displaystyle hyp = \sqrt{1 + e^x}$ . . . and: .$\displaystyle \sin\theta = \frac{e^{\frac{x}{2}}}{\sqrt{1 + e^x}}$
And we have: .$\displaystyle 2\ln\left(\frac{e^{\frac{x}{2}}}{\sqrt{1+e^x}}\rig ht) + C$
And, of course, you are expected to show that these answers are equivalent.
Well if you really want to be ugly I have another way of doing this.
$\displaystyle \frac{1}{1+e^x} = \frac{1}{2+x+\frac{x^2}{2!}+\frac{x^3}{3!}+....}$
Long division.
Integrate term-by-term
And bring to standard form of ones of the know functions.
I leave the details to you.