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!

Evaluating definite integral

  1. Mar 24, 2013 #1
    1. The problem statement, all variables and given/known data
    [tex]\int_{0}^{2\pi} \frac{dx}{1+e^{\sin x}}[/tex]


    2. Relevant equations



    3. The attempt at a solution
    Let ##I=\int_{0}^{2\pi} \frac{dx}{1+e^{\sin x}}##

    Since ##\int_{a}^{b}f(x) dx=\int_{a}^{b} f(a+b-x)dx##
    Hence,
    [tex]I=\int_{0}^{2\pi} \frac{dx}{1+e^{-\sin x}}=\int_{0}^{2\pi} \frac{e^{\sin x}dx}{1+e^{\sin x}}[/tex]

    [tex]2I=\int_{0}^{2 \pi}dx[/tex]
    [tex]I=\pi[/tex]

    This is the right answer but when I try it with the following method it turns out to be zero.

    Let ##\sin x=t## or ##\cos xdx=dt##. Multiply the numerator and denominator by ##\cos x## & ##\cos x=\sqrt{1-t^2}##
    The integral transforms to
    [tex]I=\int_{0}^{0} \frac{dt}{\sqrt{1-t^2} (1+e^t)}[/tex]
    Both the upper and lower limits are zero. The value of I should be zero. What have I done wrong? :confused:

    Any help is appreciated. Thanks!
     
  2. jcsd
  3. Mar 24, 2013 #2
    Yo Naruto fan :)
    Last year i was confused with the same problem... when a trigonometric function is applied to 0 or 2∏, we get the same result... As trigonometric functions are periodic. You can draw a graph and u can see that the area under the curve is not 0. This implies that you can not substitute a trigonometric function like "sin x" with a variable like "t" when the difference between the upper and lower limits is greater than ∏/2... It doesn't appear wrong... but it is something like to prove LHS=RHS by multiplying both sides of an equation with zero...!
    Hope this helped!
     
  4. Mar 24, 2013 #3
    Hello there,

    Be careful with:

    [itex]\cos x = \sqrt{1- \sin^{2} x}[/itex]​

    In particular, for [itex]0 \le x \le 2\,\pi[/itex]:

    [itex]
    \cos x = \left \{ \begin{array}{ll}
    \sqrt{1- \sin^{2} x} & 0 \le x \le \pi/2\\
    -\sqrt{1- \sin^{2} x} & \pi/2 < x \le 3\,\pi/2 \\
    \sqrt{1- \sin^{2} x} & 3\,\pi/2 < x \le 2\,\pi
    \end{array}\right . [/itex]​

    In your case, split the integral in 3 cases, and go ahead.
     
  5. Mar 24, 2013 #4

    Curious3141

    User Avatar
    Homework Helper

    JFGobin has provided the correct explanation, but you should note that once you split the integral up, you don't really save any work - you basically need to do the same thing you did the first time to get the result (plus at one point you need to evaluate ##\displaystyle \int_{-1}^{1}\frac{1}{\sqrt{1-t^2}}dt##, which is easy, but still extra work). You do get the same answer though (I checked).
     
  6. Mar 24, 2013 #5
    Thank you Curious and jfgobin! :smile:

    I tried your advice but still cannot reach the final answer.
    The given integral can be separated into three integrals.
    [tex]I=\int_{0}^{\pi/2} \frac{\cos x}{\sqrt{1-\sin^2x}(1+e^{\sin x})}dx-\int_{\pi/2}^{3\pi/2} \frac{\cos x}{\sqrt{1-\sin^2x}(1+e^{\sin x})}dx+\int_{3\pi/2}^{2\pi} \frac{\cos x}{\sqrt{1-\sin^2x}(1+e^{\sin x})}dx[/tex]
    Using the substitution ##\sin x=t##.
    [tex]I=\int_{0}^{1} \frac{dt}{\sqrt{1-t^2}(1+e^t)}+\int_{-1}^{1} \frac{dt}{\sqrt{1-t^2}(1+e^t)}+\int_{-1}^{0} \frac{dt}{\sqrt{1-t^2}(1+e^t)}[/tex]
    [tex]I=I_1+I_2+I_3[/tex]

    I did a change of variable in ##I_3##, I substituted ##t=-x## or ##dt=-dx##. The integral ##I_3## transforms to
    [tex]I_3=\int_{1}^{0} \frac{-dx}{\sqrt{1-x^2}(1+e^{-x})}[/tex]
    which is equivalent to
    [tex]I_3=\int_{0}^{1} \frac{e^tdt}{\sqrt{1-t^2}(1+e^{t})}[/tex]

    Now I can add ##I_3## and ##I_1##. I end up with this:
    [tex]I=\int_{0}^{1} \frac{dt}{\sqrt{1-t^2}}+\int_{-1}^{1} \frac{dt}{\sqrt{1-t^2}(1+e^t)}[/tex]
    But my expression doesn't include the integral mentioned by Curious3141. :confused:
     
  7. Mar 24, 2013 #6

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    ##I_1+I_3=I_2##. So if ##I_1+I_3=\int_{0}^{1} \frac{dt}{\sqrt{1-t^2}}## then ##I=2\int_{0}^{1} \frac{dt}{\sqrt{1-t^2}}=\int_{-1}^{1} \frac{dt}{\sqrt{1-t^2}}## (because the integral is symmetric in t).
     
  8. Mar 24, 2013 #7
    How do you get a factor of 2? :confused:

    [tex]I_1=\int_0^1 \frac{dt}{\sqrt{1-t^2}(1+e^t)}[/tex]
    [tex]I_3=\int_0^1 \frac{e^t dt}{\sqrt{1-t^2}(1+e^t)}[/tex]

    [tex]I_1+I_3=\int_0^1 \frac{dt}{\sqrt{1-t^2}}[/tex]

    How do you get ##I_1+I_3=I_2##?
     
  9. Mar 24, 2013 #8

    Dick

    User Avatar
    Science Advisor
    Homework Helper

    Look back at the expressions you started with for I1, I2 and I3. I3 integrates ##\frac{dt}{\sqrt{1-t^2}(1+e^t)}## from -1 to 0, I1 integrates from 0 to 1. Put them together and it's the same as integrating -1 to 1. Which is I2.
     
  10. Mar 24, 2013 #9
    Silly me. :redface:

    Thanks a lot, Dick! :smile:
     
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: Evaluating definite integral
Loading...