# How to integrate dx/(1+e^x)

1. Oct 13, 2005

### Nusc

Someone please tell me how to integrate dx/(1+e^x).

Thanks

2. Oct 13, 2005

### VietDao29

Since you have 1 + ex in the denominator, you would want something like d(ex) instead of dx. So let's try multiplying both numerator and denominator by ex.
$$\int \frac{dx}{1 + e ^ x} = \int \frac{e ^ x dx}{e ^ x(1 + e ^ x)} = \int \frac{d(e ^ x)}{e ^ x(1 + e ^ x)} = = \int \left( \frac{1}{e ^ x} - \frac{1}{e ^ x + 1} \right) d(e ^ x)$$.
Can you go from here?
Viet Dao,

3. Oct 13, 2005

### HallsofIvy

Staff Emeritus
Or: almost the same thing, let u= 1+ex. Then du= exdx so that dx= du/ex.
The integral is $$\int\frac{du}{e^x u}$$
You still have ex in your integral but since u= 1+ ex
ex= u- 1:
The integral is $$\int\frac{du}{(u-1)u}$$ which can be done by "partial fractions" giving exactly what VietDao29 had.

4. Oct 13, 2005

### Ali 2

You can do it in another way ..

Multiply the numerator and denominator by e-x

so ..

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

Now .. the numerator is the derivative of the denominator , so you can integrate easily .

Last edited: Oct 13, 2005
5. Oct 13, 2005

### Nusc

I'm trying to evaluate int: dv/(1+(A/(mg))alpha*v) from [vo,v] = -gt

You should get [ v- ln(1 +(A/(mg))alpha*v)/alpha ] limits v and vo = -gt

I tried the partial fractions and it won't match the answer, that U - 1 will cancel with the 1 + a /mb alpha v etc.

you will get the ln over alpha but I have no idea where the V - in front of that comes from.

so your left with just a /mg alpha v which is not correct. the last method looked tempting but I would just end up with ln u which is even worse

Last edited: Oct 13, 2005