Integrating (1/(1+e^x)) dx: Challenges and Solutions

  • Context: Undergrad 
  • Thread starter Thread starter niyati
  • Start date Start date
  • Tags Tags
    Dx Integrating
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
36 replies · 14K views
niyati
Messages
63
Reaction score
0
I need to find the integral of (1/(1+e^x)) dx.

...I don't think I can use u substitution, but well, I'm basically open to suggestions.
 
Physics news on Phys.org
It should be solvable with substitution. Hint: u = 1+e^x
 
but, then wouldn't du = e^x dx? That would require a (1/e^x) outside the integral to balance it out, but my Cal I teacher (I'm now in Cal II with a different teacher) told me that I couldn't do this.
 
Write x in terms of u, and then take the differential.
 
let u = 1 + e^x
then we know du = (e^x)dx
and e^x = u -1

is there something we can multiply both the numerator and the denominator by to make this substitution work? Hint: this will turn it into a partial fraction decomposition problem.
 
Multiply by 1. (1=e-x/e-x)
 
That multiplication isn't really necessary. JonF's first point was sufficient: if u= 1+ ex, then ex= u- 1. du= exdx= (u-1)dx so dx= du/(u-1).
[tex]\int\frac{dx}{1+e^x}= \int\frac{du}{(u-1)(u)}[/tex]
which can be done by partial fractions.
 
Last edited by a moderator:
Since I'm clumsy at partial fractions, I find multiplying by 1 to be a bit easier.
 
Edit: woops sorry just saw d_leet mentioned this method already. But if you have a fraction with some e^x or e^-x then if you can't do u substitution, multiply by (e^-x)/(e^-x) or (e^x)/(e^x) and then do a nice u substitution.

another method:

multiply the top and bottom by e^-x to get:

[tex]\int\frac{e^{-x} dx}{e^{-x}+1}[/tex]

which you can use the substitution u=e^-x +1 then you have du = e^-x dx at the top which reduces the problem down to a simple integral
 
Last edited:
PowerIso said:
Since I'm clumsy at partial fractions, I find multiplying by 1 to be a bit easier.

Multiplying both numerator, and denominator by ex, or, making a substitution, is pretty much the same. After that, you have to do Partial Fraction it. You cannot avoid it. :)
 
VietDao29 said:
After that, you have to do Partial Fraction it. You cannot avoid it. :)

I could waste time by going the trig-way. :wink:
 
VietDao29 said:
Multiplying both numerator, and denominator by ex, or, making a substitution, is pretty much the same. After that, you have to do Partial Fraction it. You cannot avoid it. :)

Really? I ended up with du/u which doesn't seem like I need to do partial fractions.
 
PowerIso said:
Really? I ended up with du/u which doesn't seem like I need to do partial fractions.
Then I’m pretty sure you did something wrong, what substitution did you use?
 
I used e^-x + 1 for u then du= -e^-x dx so since that is on the top already with just a different constant you can get -du/u.
 
It’s the integral of: (1/(1+e^x)), not (1/(1+e^-x)). That "-" makes a huge difference. If you use that substitution you can’t substitute the bottom.
 
no what PowerIso did was this I think:

[tex]\int\frac{dx}{1+e^x} * \frac{e^{-x}}{e^{-x}} = \int\frac{e^{-x} dx}{e^{-x}+1}[/tex]

which doing the substitution u=e^(-x)+1 gives you -du/u.
 
I don't even think partial fractions are necessary. u(u-1)=u^2-u

so

[tex]\int\frac{dx}{1+e^x}= \int\frac{du}{(u-1)(u)} = \int{1 \over u^2-u}du = ln(u^2-u) + C = ln(e^{2x} + e^x) + C[/tex]
 
Well, here is what I did. I multiplied by e^-x/e^-x and I got e^-x/(e^-x + 1) , so I'm still fairly certain it works.
 
bob1182006 said:
no what PowerIso did was this I think:

[tex]\int\frac{dx}{1+e^x} * \frac{e^{-x}}{e^{-x}} = \int\frac{e^{-x} dx}{e^{-x}+1}[/tex]

which doing the substitution u=e^(-x)+1 gives you -du/u.

Yes that is what I did :).
 
How on Earth do you do partial fractions on exponential functions?
 
you don't do it directly you substitute to get some polynomials.

@ camilus: that integration is wrong you don't have the derivative of (u^2-u) on the top which is needed in order to get ln(u^2-1) + C as the answer so you would have to do partial fractions.
 
camilus said:
I don't even think partial fractions are necessary. u(u-1)=u^2-u

so

[tex]\int\frac{dx}{1+e^x}= \int\frac{du}{(u-1)(u)} = \int{1 \over u^2-u}du = ln(u^2-u) + C = ln(e^{2x} + e^x) + C[/tex]

Nope, doesn't work out...

The logorithmic integration rules do not work that way. The integral of "1/(x+x^2)" =/= ln(x+x^2)

You'd have to start doing trigonometric sub/partial fractions after this point.
 
bob1182006 said:
no what PowerIso did was this I think:

[tex]\int\frac{dx}{1+e^x} * \frac{e^{-x}}{e^{-x}} = \int\frac{e^{-x} dx}{e^{-x}+1}[/tex]

which doing the substitution u=e^(-x)+1 gives you -du/u.
slick ;)
 
[tex]\int \limits_0^1 \frac{dx}{1+e^x} \approx 0.379885493[/tex]

[tex]\int \limits_2^{e+1} {1 \over u^2-u}du \approx 0.379885493[/tex]

most of yall need to retake calc 1, apparently everyone disagrees with the correct answer...
 
you're missing some calculus there, the derivative of ln(u^2-u) is not your integral.
 
Last edited:
not ln(u^2+u), ln(u^2-u)...
 
yea I meant that >_> sorry
 
Hmm d/dxln(u^2-u) is (1/u^2 - u) * 2u

I'm pretty sure I did the derivative right, so camulis where did I error?