Results 1 to 9 of 9
Like Tree3Thanks
  • 1 Post By Walagaster
  • 1 Post By Idea
  • 1 Post By Idea

Thread: evaluate an integral

  1. #1
    Member
    Joined
    May 2009
    Posts
    243
    Thanks
    3

    evaluate an integral

    Hi folks,

    I am trying to evaluate the following integral $ \int_{0.294}^{0.956}\sqrt{4x - x^2} dx$

    I checked the result in wolfram and get 0.94493

    I have tried it myself and consistently get the same wrong answer. Can you spot the error?

    $\int \sqrt{4 - (2 - x)^2} dx$

    let $u = 2 - x$, so $\frac{du}{dx} = -1$ so $\int \sqrt{2^2 - u^2}. (-1) du$

    let $u = 2 sin w$ , then $\frac{du}{dw} = 2 \cos w$ and $\sqrt{4 - u^2} = 2 cos w$

    so that $ -4 \int \cos^2 w dw$

    now $\cos^2 w = 1/2 (\cos 2w + 1)$

    so

    $-2 \int (\cos 2w + 1) dw = -2 ( 1/2 \sin 2w) - 2w = -\sin w - 2w = - u/2 - 2 \sin^{-1} (\frac{u}{2} )$

    $ \frac{x - 2}{2} - 2 \sin^{-1} \frac{2 - x}{2} $

    Now put in the limits

    $ -0.522 - 2 \sin^{-1} (0.522) - (-0.853 - 2 \sin^{-1} (0.853) )$

    $ -0.522 - 1.0984 + 0.853 + 2.0434 = -0.5631$

    as you see a different result.
    Last edited by s_ingram; Jun 3rd 2018 at 07:39 AM.
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Member Walagaster's Avatar
    Joined
    Apr 2018
    From
    Tempe, AZ
    Posts
    113
    Thanks
    48

    Re: evaluate an integral

    Quote Originally Posted by s_ingram View Post
    Hi folks,

    I am trying to evaluate the following integral $ \int_{0.294}^{0.956}\sqrt{4x - x^2} dx$

    I checked the result in wolfram and get 0.94493

    I have tried it myself and consistently get the same wrong answer. Can you spot the error?

    $\int \sqrt{4 - (2 - x)^2} dx$

    let $u = 2 - x$, so $\frac{du}{dx} = -1$ so $\int \sqrt{2^2 - u^2}. (-1) du$

    let $u = 2 sin w$ , then $\frac{du}{dw} = 2 \cos w$ and $\sqrt{4 - u^2} = 2 cos w$

    so that $ -4 \int \cos^2 w dw$

    now $\cos^2 w = 1/2 (\cos 2w + 1)$
    If you carry the limits along with your substitutions, at this step you will actually be doing this integral:$$
    \int_{1.021706683}^{.5491940886} -2(\cos(2w)+1)~dw =0.9449301179$$
    and everything is OK to here.


    so

    $-2 \int (\cos 2w + 1) dw = -2 ( 1/2 \sin 2w) - 2w = -\sin w - 2w = - u/2 - 2 \sin^{-1} (\frac{u}{2} )$

    $ \frac{x - 2}{2} - 2 \sin^{-1} \frac{2 - x}{2} $

    Now put in the limits

    $ -0.522 - 2 \sin^{-1} (0.522) - (-0.853 - 2 \sin^{-1} (0.853) )$

    $ -0.522 - 1.0984 + 0.853 + 2.0434 = -0.5631$

    as you see a different result.
    The rest of what you have shown gives a good argument for not doing this type of back-substituting in definite integrals.
    My first suspicion is careless use of inverse trig functions, which are multiple valued, and for which you must be careful of their ranges.
    Thanks from s_ingram
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    May 2009
    Posts
    243
    Thanks
    3

    Re: evaluate an integral

    Interesting point you make about the right point to substitute the limits. Your way can provide a handy shortcut, but it should not alter the result.

    I certainly get the right answer when I try it your way.

    I used radians for the sin and inverse sine, so I don't think the problem is with the trig functions.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Super Member
    Joined
    Jun 2013
    From
    Lebanon
    Posts
    868
    Thanks
    409

    Re: evaluate an integral

    the integral should be

    $\displaystyle 2 w + \sin \left( 2 w \right) $
    Last edited by Idea; Jun 4th 2018 at 02:14 AM.
    Thanks from s_ingram
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Member
    Joined
    May 2009
    Posts
    243
    Thanks
    3

    Re: evaluate an integral

    Yes, it is! But I can't get there. I have a negative sign (that came when I switched variable from x to u) and it won't go away!
    I also made a typo when I put - sin w instead of - sin 2w, but when I substituted the limits, I did it properly. The issue is the sign. Did I make a mistake when I introduced it or does another negative come from somewhere else?
    Last edited by s_ingram; Jun 4th 2018 at 06:18 AM.
    Follow Math Help Forum on Facebook and Google+

  6. #6
    Super Member
    Joined
    Jun 2013
    From
    Lebanon
    Posts
    868
    Thanks
    409

    Re: evaluate an integral

    x from a to b where a < b

    $\displaystyle 2-x$ from (2 - a) to (2 - b) with 2 - a > 2 - b
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Member
    Joined
    May 2009
    Posts
    243
    Thanks
    3

    Re: evaluate an integral

    I think you are cheating me here, Idea!
    If I understand correctly, you are saying that the integral really is - sin 2w - 2w but when I put the w limits in (integrating from 1.0217 to 0.5492), the smaller number goes first and the larger second and this is where the negative comes from?
    If you are saying this, then I am relieved, because it was the conclusion I came to with Walagaster.
    When you told me the actual integral was sin 2w + 2w, it tied in with an example in my book, so it confirmed that your earlier post was right (not that I didn't believe you), I just couldn't get the same result.
    Last edited by s_ingram; Jun 4th 2018 at 10:18 AM.
    Follow Math Help Forum on Facebook and Google+

  8. #8
    Super Member
    Joined
    Jun 2013
    From
    Lebanon
    Posts
    868
    Thanks
    409

    Re: evaluate an integral

    the x integral

    $\displaystyle \sqrt{4x-x^2}$ where $\displaystyle \left\{x,\frac{294}{1000},\frac{956}{1000}\right\}$

    the u integral

    $\displaystyle -\sqrt{4-u^2},\left\{u,2-\frac{294}{1000},2-\frac{956}{1000}\right\}$

    or

    $\displaystyle \sqrt{4-u^2},\left\{u,2-\frac{956}{1000},2-\frac{294}{1000}\right\}$

    $\displaystyle \sqrt{4-u^2},\left\{u,\frac {261}{250},\frac {853}{500}\right\}$

    the w-integral $\displaystyle u=2 sin w$

    $\displaystyle 4\cos ^2w,\left\{w,\arcsin \left(\frac{261}{500}\right),\arcsin \left(\frac{853}{1000}\right)\right\}$

    $\displaystyle 2+2 \cos ( 2w),\left\{w,\arcsin \left(\frac{261}{500}\right),\arcsin \left(\frac{853}{1000}\right)\right\}$

    Integrate to get

    $\displaystyle g(w)=2w+\sin (2w)$

    and so the final result is

    $\displaystyle g\left(\arcsin \left(\frac{853}{1000}\right)\right)-g\left(\arcsin \left(\frac{261}{500}\right)\right)$
    Thanks from s_ingram
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Member
    Joined
    May 2009
    Posts
    243
    Thanks
    3

    Re: evaluate an integral

    Great!
    Many thanks, Idea.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: Nov 27th 2012, 12:51 PM
  2. Replies: 2
    Last Post: Aug 31st 2010, 07:38 AM
  3. Replies: 1
    Last Post: Jun 2nd 2010, 02:25 AM
  4. Replies: 1
    Last Post: Nov 28th 2009, 08:44 AM
  5. evaluate the integral using FTC
    Posted in the Calculus Forum
    Replies: 1
    Last Post: Apr 13th 2009, 12:40 PM

/mathhelpforum @mathhelpforum