# Integration problem

1. Mar 22, 2015

### cloveryeah

1. The problem statement, all variables and given/known data
integrate 1/(1+e^x) dx
2. Relevant equations

3. The attempt at a solution
firstly i let t=1+e^x
and then i come to : integrate 1/(t^2-1)
and then i put t=secx
.
.
.
but then the final ans is -1/2 ln | 2/e^x +1 |

it should be 1 instead of 2, i hv checked for the steps for so many times, but found nothing wrong

2. Mar 22, 2015

### HallsofIvy

You have done the substitution wrong.

If $t= 1+ e^x$ then $dt= e^xdx= (t- 1)dx$ so that $\frac{1}{t- 1}= dx$.

$$\int \frac{1}{1+ e^x}dx= \int \frac{1}{t} \frac{dt}{t- 1}= \int \frac{1}{t(t- 1)} dt$$

NOT $\int \frac{1}{t^2- 1} dt$

3. Mar 22, 2015

### Zondrina

Perhaps you should multiply the top and bottom of the expression by $e^{-x}$ and see what happens when you substitute $u = e^{-x}$.

4. Mar 22, 2015

### kishlaysingh

then you can use partial fraction i.e. create (t)- (t-1) in the numerator