Results 1 to 5 of 5

Math Help - A strange integral

  1. #1
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,825
    Thanks
    714

    A strange integral


    Hello, everyone!

    Try this integral: . \int \frac{dx}{1 + e^x}


    I posted this problem at SOSMath three years ago.

    I said (quite smugly as you will see):
    . . . . ."So far, I've found four ways to integrate it.
    . . . . . And the four answers all look different.
    . . . . . Give it a try. .I dare you to come up with a fifth method."

    Within three hours, radagast found a stunning fifth method.
    And a day or so later, skeeter provided a surprising sixth method.

    So I offer the challenge again (less arrogantly this time):
    . . Is there a seventh method?

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Method #1: "Long Division"

    We have: . I \:= \:\int\frac{dx}{1 + e^x}

    . . \frac{1}{1 + e^x}\;=\;\frac{1 + e^x - e^x}{1 + e^x} \;= \;\frac{1 + e^x}{1 + e^x} - \frac{1}{1 + e^x}\;=\;1 - \frac{e^x}{1 + e^x}

    Therefore: . I \;= \;\int\left(1 - \frac{e^x}{1 + e^x}\right)\,dx\;=\;\boxed{x - \ln(1 + e^x) + C}

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Method #2: \frac{du}{u}

    Multiply top and bottom by e^{-x}:

    . . \frac{e^{-x}}{e^{-x}}\cdot\frac{1}{1 + e^x} \;= \;\frac{e^{-x}}{e^{-x} + 1} \;= \;-\frac{-e^{-x}}{e^{-x} + 1}<br />

    Therefore: . I \;= \;-\int\frac{-e^{-x}}{e^{-x} + 1}\,dx \;= \;\boxed{ -\ln(e^{-x} + 1) + C}

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Method #3: Substitution

    Let U = 1 + e^x\quad\Rightarrow\quad e^x = U-1\quad\Rightarrow\quad x =  \ln(U - 1)\quad\Rightarrow\quad dx = \frac{dU}{U - 1}

    Substitute: . I \;= \;\int \frac{dU}{U(U - 1)}


    Now there are two ways to proceed . . .


    . . (A) Partial Fractions

    . . \int\frac{du}{U(U - 1)}\;=\;\int\left(\frac{1}{U - 1} - \frac{1}{U}\right)\,dU = \;\ln|U - 1| - \ln|U| + C

    . . . . = \;\ln\left|\frac{U - 1}{U}\right| + C \;= \;\ln\left(\frac{e^x}{1 + e^x}\right) + C


    . . (B) Complete the square

    . . \int\frac{dU}{U^2 - U} \;= \;\int\frac{dU}{(U - \frac{1}{2})^2 - (\frac{1}{2})^2} \;=\;\ln\left|\frac{(U - \frac{1}{2}) - \frac{1}{2}}{(U - \frac{1}{2}) + \frac{1}{2}}\right| + C

    . . . . = \;\ln\lleft|\frac{U - 1}{u}\right| + C \;= \;\boxed{\ln\left(\frac{e^x}{1 + e^x}\right) + C}



    Note: the substitution u = e^x leads to the same integral.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Method #4: Trig Substitution . . . my personal favorite.

    Let e^x = \tan^2\theta\quad\Rightarrow\quad e^{\frac{x}{2}} = \tan\theta\quad \Rightarrow\quad \frac{x}{2} =  \ln(\tan\theta)\quad\Rightarrow\quad dx = 2\cdot\frac{sec^2\theta}{\tan\theta}\,d\theta
    The denominator is: . 1 + e^x \;= \;1 + \tan^2\theta \;= \;\sec^2\theta

    Substitute: . I\;=\;\int\frac{1}{\sec^2\theta}\cdot2\cdot\frac{\  sec^2\theta}{\tan\theta}\,d\theta\;= 2\int\cot\theta\,d\theta \;= \;2\cdot\ln|\sin\theta| + C

    Since \tan\theta = e^{\frac{x}{2}}. then angle \theta is in a right triangle with  opp = e^{\frac{x}{2}} and adj = 1.
    . . Hence: . hyp = \sqrt{1 + e^x} .and . \sin\theta = \frac{e^{\frac{x}{2}}}{\sqrt{1 + e^x}}

    Therefore: . I \;= \;\boxed{2\cdot\ln\left(\frac{e^{\frac{x}{2}}}{ \sqrt{1 + e^x}}\right) + C}

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    I have "boxed" the four different-looking solutions.

    Your mission
    (should you decide to accept it) is to prove them equivalent.

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Method #5: radagast's method

    We note that: . \frac{d}{dx}\left[\ln(1 + e^x)\right] \:=\:\frac{e^x}{1 + e^x}

    Then: . \int d\left[\ln(1 + e^x)\right]\,dx\;=\;\int\frac{e^x}{1 + e^x}\,dx

    . . and we have: . \ln(1 + e^x) \;= \;\int\left(1 - \frac{1}{1 + e^x}\right)\,dx\;= \int dx\: - \underbrace{\int\frac{dx}{1 + e^x}}
    . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . This is I

    We have the equation: . \ln(1 + e^x)\:=\:x - I + C

    Therefore: . I\;=\;x - \ln(1 + e^x) + C . (Solution #1)

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Method #6: skeeter's method

    Let u^2 = e^x\quad\Rightarrow\quad 2u\,du = e^x\,dx\quad\Rightarrow\qiad 2u\,du =  u^2dx\quad\Rightarrow\quad dx = \frac{2\,du}{u}

    Substitute: . \int\frac{1}{1 + u^2}\left(\frac{2\,du}{u}\right)\;=\;\int\frac{2\,  du}{u(1 + u^2)}\;= \int\left(\frac{2}{u} - \frac{2u}{1 + u^2}\right)\,du


    . . = \;2\ln u - \ln(1 + u^2) + C \;= \;\ln u^2 - \ln(1 + u^2) + C\;= \ln\left(\frac{u^2}{1 + u^2}\right) + C<br />

    Therefore: . I \;= \;\ln\left(\frac{e^x}{1 + e^x}\right) + C . (Solution #3)

    ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~ ~

    Now you are fully prepared to impress/amaze/terrify your teacher.


    Follow Math Help Forum on Facebook and Google+

  2. #2
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Hello, Soroban,

    Answer #1:
    x-\ln(1+e^x)=\ln(e^x)-\ln(1+e^x)=\ln\left(\frac{e^x}{1+e^x}\right). Answer # 3

    Answer #2:
    -\ln(e^{-x}+1)=\ln\left(\frac{1}{\frac{1}{e^x}+1}\right) =\ln\left(\frac{e^x}{1+e^x}\right). Answer # 3

    Answer #4:
    2 \cdot \ln \left(\frac{e^{\frac{x}{2}}}{\sqrt{1+e^x}} \right) = \ln\left(\left(\frac{e^{\frac{x}{2}}}{\sqrt{1+e^x}  }\right)^2\right)  =\ln\left(\frac{e^x}{1+e^x}\right). Answer # 3

    Greetings

    EB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,825
    Thanks
    714
    Well done, Earboth!

    My first experience with these multiple-answer integrals was: \int\sin x\cos x\,dx
    . . which my professor said could be integrated in two ways.


    (1) Let u = \sin x\quda\Rightarrow\quad du = \cos x\,dx
    . . .Substitute: . \int u\,du \;= \;\frac{1}{2}u^2 + C\;= \;\frac{1}{2}\sin^2x + C


    (2) Let u = \cos x\quad\Rightarrow\quad du = -\cos x\,dx
    . . . Substitute: . -\int u\,du \;=\;-\frac{1}{2}u^2 + C\;= \;-\frac{1}{2}\cos^2x + C


    Then he proceeded to show us a third method:

    (3) \int\sin x\cos x\,dx \;= \;\frac{1}{2}\int(2\sin x\cos x)\,dx \;=  \;\frac{1}{2}\int\sin(2x)\,dx \;= \;-\frac{1}{4}\cos(2x) + C

    And asked us to show that the answers are equivalent.
    . . (I later found a fourth method.)


    Later he gave us: . \int\sec^2x\tan x\,dx

    And asked us to find at least three ways to integrate it . . .

    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Quote Originally Posted by Soroban
    Well done, Earboth![size=3]

    My first experience with these multiple-answer integrals was: \int\sin x\cos x\,dx
    . . which my professor said could be integrated in two ways....
    Hello, Soroban,

    how about using partial integration:


    \int u\cdot v'dx= u\cdot v-\int v\cdot u'dx


    Let v(x)=sin(x) ==> v'(x) = cos(x) and
    u'(x) = cos(x) ==> u(x) = sin(x)

    \int\sin x\cos x\,dx=\sin(x) \cdot \sin(x)-\int\sin x\cos x\,dx + C

    Thus

    2\cdot \int\sin x\cos x\,dx= \left(\sin(x)\right)^2+C_1. Therefore

    \int\sin x\cos x\,dx=\frac{1}{2}\cdot \left(\sin(x)\right)^2+C_2

    Greetings

    EB
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    11,825
    Thanks
    714
    Nice work, Earboth!
    . . That was the fourth method I had found
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Strange Integral Notation
    Posted in the Calculus Forum
    Replies: 1
    Last Post: August 12th 2010, 08:26 PM
  2. strange double integral
    Posted in the Calculus Forum
    Replies: 1
    Last Post: March 16th 2009, 03:26 PM
  3. Double integral over strange region
    Posted in the Calculus Forum
    Replies: 2
    Last Post: March 7th 2009, 01:02 PM
  4. Strange definition of Lebesgue Integral !!!
    Posted in the Calculus Forum
    Replies: 3
    Last Post: February 16th 2009, 10:22 PM
  5. A strange probability integral
    Posted in the Calculus Forum
    Replies: 1
    Last Post: June 10th 2008, 02:42 AM

Search Tags


/mathhelpforum @mathhelpforum