# Thread: A boring limit that I'm struggling with

1. ## A boring limit that I'm struggling with

I know the answer, but I'm not getting at it, can someone point out my error? It's probably something stupid, b/c I've been doing math all day and my brain is fried.

Correct answer should be $\displaystyle x-ln(e^x+1)+C$

I'm not so interested in the best way to get this answer as I am in what I did incorrect. I did it 3 times now, and got the same answer (granted I used the same method, but this implies I also made the same mistake)
================================================

$\displaystyle \int \frac 1{1+e^x} ~dx$
--------------
Substitute
$\displaystyle a = 1+e^x$

$\displaystyle =\frac 1{a-1} ~da = dx$
--------------

$\displaystyle =\int \frac 1{a-1}*\frac 1a ~da$

$\displaystyle =\int \frac 1{(a-1/2)^2+1/4}\ ~da$
--------------
Substitute
$\displaystyle \frac 12tan(b) = a-\frac 12$

$\displaystyle \frac 12sec^2b ~db = da$
--------------

$\displaystyle =\frac 12\int sec^2b*\frac 1{\frac 14(tan^2b+1)}~db$

$\displaystyle =2 \int~db$

$\displaystyle =2b+c$

$\displaystyle =2 ~arctan(2a-1)+c$

$\displaystyle =2 ~arctan(2e^x+1)+c$

2. $\displaystyle \frac{1}{e^x+1} = \frac{1}{e^x(e^x+1)} \cdot (e^x)'$.
Let $\displaystyle t = e^x$ and so we get $\displaystyle \int \frac{1}{t(t+1)} dt$.
Use partial fractions.

3. Originally Posted by ThePerfectHacker
Use partial fractions.
It seems so obvious when you say it >.<

I'll use this method to get the correct answer, but can you tell me where I went wrong in my methods? presumably there is a discrepancy in my work (aside from using a less effective technique), and I want to see where it is, because I have made the same error at least 3 times while working on this (more if you count all the times I checked my work).

4. $\displaystyle \frac{1}{a-1} \cdot \frac{1}{a}$

$\displaystyle =\frac{1}{a^{2} - a}$

$\displaystyle =\frac{1}{\left(a^{2} - a {\color{blue} + \frac{1}{4}}\right) {\color{blue} - \frac{1}{4}}}$

$\displaystyle = \frac{1}{\left(a - \frac{1}{2}\right)^{2} {\color{blue} - } \frac{1}{4}}$

That might've thrown a wrench to your sub? Seems messy from here

5. oh, thank you, it was driving me nuts not seeing my mistake.

6. Originally Posted by angel.white
It seems so obvious when you say it >.<
Ever watched pairs skating in the Winter Olympics? They make it look easy. Same idea here.

7. I know TPH is godly when it comes to integration around these parts but didn't he just do a simple substitution of $\displaystyle u = 1 + e^{x}$

8. Originally Posted by o_O
I know TPH is godly when it comes to integration around these parts but didn't he just do a simple substitution of $\displaystyle u = 1 + e^{x}$
Well he also pointed out that a partial fraction decomposition would be much simpler than a trig substitution like I was doing (though I used the wrong substitution, should have used secant, that was the error that stemmed from writing that negative 1/4 as a positive 1/4 >.< )

9. That's what I mean:
$\displaystyle u = 1+ e^{x}$
$\displaystyle du = e^{x}dx = (u-1) du$

So with the subs:
$\displaystyle \int \frac{1}{u (u - 1)}du$

10. I will try it again using partial fractions, it's a new day, I think we can get it to work ^_^

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

---------------
Substitute:
$\displaystyle a = 1+e^x$

$\displaystyle \frac 1{a-1}da = dx$
---------------

$\displaystyle =\int \frac 1{a(a-1)} ~da$

Partial Fraction Decomposition

$\displaystyle =\int \left(\frac 1{a-1} -frac 1a \right)~da$

$\displaystyle =ln|a-1| -ln|a| +C$

$\displaystyle =ln|e^x| - ln|1+e^x| +C$

$\displaystyle =x - ln|1+e^x| +C$

Hooray, it worked !

11. $\displaystyle \int {\frac{1} {{1 + e^x }}\,dx} = \int {dx} - \int {\frac{{e^x }} {{1 + e^x }}\,dx} = x - \ln \left( {1 + e^x } \right) + k.$

12. Originally Posted by Krizalid
$\displaystyle \int {\frac{1} {{1 + e^x }}\,dx} = \int {dx} - \int {\frac{{e^x }} {{1 + e^x }}\,dx} = x - \ln \left( {1 + e^x } \right) + k.$
I always find your approaches to be so inspiring, thank you ^_^