Results 1 to 5 of 5

Thread: A strange integral

  1. #1
    Super Member

    Joined
    May 2006
    From
    Lexington, MA (USA)
    Posts
    12,028
    Thanks
    849

    A strange integral


    Hello, everyone!

    Try this integral: .$\displaystyle \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: .$\displaystyle I \:= \:\int\frac{dx}{1 + e^x}$

    . . $\displaystyle \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: .$\displaystyle I \;= \;\int\left(1 - \frac{e^x}{1 + e^x}\right)\,dx\;=\;\boxed{x - \ln(1 + e^x) + C}$

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

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

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

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

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

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

    Method #3: Substitution

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

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


    Now there are two ways to proceed . . .


    . . (A) Partial Fractions

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

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


    . . (B) Complete the square

    . . $\displaystyle \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$

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



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

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

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

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

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

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

    Therefore: .$\displaystyle 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: .$\displaystyle \frac{d}{dx}\left[\ln(1 + e^x)\right] \:=\:\frac{e^x}{1 + e^x} $

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

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

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

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

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

    Method #6: skeeter's method

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

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


    . . $\displaystyle = \;2\ln u - \ln(1 + u^2) + C \;= \;\ln u^2 - \ln(1 + u^2) + C\;=$ $\displaystyle \ln\left(\frac{u^2}{1 + u^2}\right) + C
    $

    Therefore: .$\displaystyle 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,854
    Thanks
    138
    Hello, Soroban,

    Answer #1:
    $\displaystyle 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:
    $\displaystyle -\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:
    $\displaystyle 2 \cdot \ln \left(\frac{e^{\frac{x}{2}}}{\sqrt{1+e^x}} \right) = $ $\displaystyle \ln\left(\left(\frac{e^{\frac{x}{2}}}{\sqrt{1+e^x} }\right)^2\right)$ $\displaystyle =\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
    12,028
    Thanks
    849
    Well done, Earboth!

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


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


    (2) Let $\displaystyle u = \cos x\quad\Rightarrow\quad du = -\cos x\,dx$
    . . . Substitute: .$\displaystyle -\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) $\displaystyle \int\sin x\cos x\,dx \;= \;\frac{1}{2}\int(2\sin x\cos x)\,dx \;=$ $\displaystyle \;\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: .$\displaystyle \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,854
    Thanks
    138
    Quote Originally Posted by Soroban
    Well done, Earboth![size=3]

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

    how about using partial integration:


    $\displaystyle \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)

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

    Thus

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

    $\displaystyle \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
    12,028
    Thanks
    849
    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: Aug 12th 2010, 08:26 PM
  2. strange double integral
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Mar 16th 2009, 03:26 PM
  3. Double integral over strange region
    Posted in the Calculus Forum
    Replies: 2
    Last Post: Mar 7th 2009, 01:02 PM
  4. Strange definition of Lebesgue Integral !!!
    Posted in the Calculus Forum
    Replies: 3
    Last Post: Feb 16th 2009, 10:22 PM
  5. A strange probability integral
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Jun 10th 2008, 02:42 AM

Search Tags


/mathhelpforum @mathhelpforum