1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Integration using substitution

  1. Apr 21, 2014 #1
    1. $$\int \frac{1}{1+e^x}\,dx$$

    2. Relevant equations

    Substitution

    3. The attempt at a solution

    $$u=1+e^x$$ $$du=e^xdx$$
    $$\int \frac{1}{u}\frac{1}{e^x}\,du$$ $$\int \frac{1}{u}\frac{1}{u-1}\,du$$ $$\int \frac{1}{u(u-1)}\,du$$
    $$= \ln {|u^2-u|} = \ln {|(1+e^x)-(1+e^x)|} = \ln {|1+2e^x+e^{2x}-1-e^x|} = \ln {|e^2|}$$

    There is something obviously wrong with my answer but I don't know what. The answer key says $$x-\ln {(1+e^x)}+C$$ Any help is greatly appreciated!
     
  2. jcsd
  3. Apr 21, 2014 #2
    The item in red is wrong .

    Write 1/u(u-1) = 1/(u-1) - 1/u .
     
  4. Apr 21, 2014 #3

    Mark44

    Staff: Mentor

    To expand on what Tanya Sharma said,
    $$\int \frac{dx}{f(x)} \neq ln|f(x)| + C$$
    unless f(x) just happens to be x.
     
  5. Apr 21, 2014 #4
    or, to be more precise f(x) happens to be of the form ax+b ,where a and b are constants.
     
    Last edited: Apr 21, 2014
  6. Apr 21, 2014 #5
    Yes subbing u = 1+e^x would work, but for this question you do not need to figure out du. So
    ∫1/(1+e^x) dx

    so 1 = u-e^x

    ∫(u-e^x)/u dx

    from here you can see how it would work.
    You could also do it your way but you have to use partial fraction decomposition.
     
  7. Apr 21, 2014 #6
    A better approach is to do this:
    $$\int \frac{1}{1+e^{x}}\,dx=\int \frac{e^{-x}}{1+e^{-x}}\,dx$$
    Use ##e^{-x}=u## to get:
    $$\int \frac{-du}{1+u}\,du=-\ln|1+u|+C=-\ln|1+e^{-x}|+C$$
     
    Last edited: Apr 21, 2014
  8. Apr 21, 2014 #7

    CAF123

    User Avatar
    Gold Member

    Or another: $$\int \frac{1}{1+e^x}\,\text{d}x = \int \frac{1+e^x}{1+e^x}\,\text{d}x - \int \frac{e^x}{1+e^x}\,\text{d}x$$The second integral on the right can be evaluated by a simple substitution.
     
  9. Apr 21, 2014 #8

    Mark44

    Staff: Mentor

    No, that wouldn't work.
    $$\int \frac{dx}{ax + b} = \frac 1 a ln|ax + b| + C$$
    So ∫dx/f(x) ≠ ln|f(x)| + C. There's that pesky factor of 1/a.
     
  10. Apr 21, 2014 #9
    How was she able to ln the instead like that? I thought there was a factor of [itex]\frac{1}{a}[/itex] to deal with?
     
  11. Apr 21, 2014 #10

    SammyS

    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Gold Member

    ... ln the WHAT instead ...


    What part of Pranav-Arora's post don't you get?
     
  12. Apr 21, 2014 #11
    I'm assuming they did something like this?

    $$\int \frac{-du}{u+1} = -\frac{1}{1}\ln {|u+1|} +C$$
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Integration using substitution
Loading...