Results 1 to 15 of 15

Math Help - Midpoint

  1. #1
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32

    Midpoint

    a)With f(x)= e^-x^2 , compute approximations using midpoint, trapezoidal and simpson's rule for

    ∫ [0 to 2] f(x) dx

    with n=2 (5 decimal places)
    Follow Math Help Forum on Facebook and Google+

  2. #2
    MHF Contributor
    Joined
    Oct 2005
    From
    Earth
    Posts
    1,599
    Simpson's rule won't work unless n \ge 3. Is your n correct?
    Follow Math Help Forum on Facebook and Google+

  3. #3
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    that's what it says.
    Follow Math Help Forum on Facebook and Google+

  4. #4
    MHF Contributor
    Joined
    Oct 2005
    From
    Earth
    Posts
    1,599
    Well for midpoint, divide each subinterval into width \frac{b-a}{n}. And the height is of course the midpoint values. Thus we can use these rectangles to approximate the area. So...

    A \approx (\frac{2-0}{2}) \left(f(.5)+f(1.5) \right)
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Quote Originally Posted by 413 View Post
    a)With f(x)= e^-x^2 , compute approximations using ..., trapezoidal ... rule for
    ∫ [0 to 2] f(x) dx
    with n=2 (5 decimal places)
    Hi,

    I presume that you know this rule already.

    I presume also, that you mean the function f(x)=e^{-x^2}

    So you have to calculate:

    \frac{f(0)+f(1)}{2}+\frac{f(1)+f(2)}{2}\approx 1.75407...

    I've attached a diagram showing the 2 trapezoids.

    EB
    Attached Thumbnails Attached Thumbnails Midpoint-trapezmethode1.gif  
    Follow Math Help Forum on Facebook and Google+

  6. #6
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    I found that from midpoint rule gives 0.88420, trapezoidal rule gives 0.87704, and simpson's rule gives 0.82994. The next question asks me to

    Compute the error esimates for midpoint, trapezoidal, simpson's. Carefully examine the extreme values of f ''(x). You may use that |f ''''(x)| < 12 for 0<x<2. (the < signs all mean less than or equal to).

    How would you do this?
    Follow Math Help Forum on Facebook and Google+

  7. #7
    Super Member
    earboth's Avatar
    Joined
    Jan 2006
    From
    Germany
    Posts
    5,830
    Thanks
    123
    Quote Originally Posted by 413 View Post
    I found that ... trapezoidal rule gives 0.87704, ...
    Hi,

    you are right. Certainly you have noticed that I've forgotten to divide by 2. So your result is correct.

    So sorry.

    EB
    Follow Math Help Forum on Facebook and Google+

  8. #8
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    its okay.

    How do you compute the error estimates, and why would you use f ''(x) and f ''''(x)?
    Follow Math Help Forum on Facebook and Google+

  9. #9
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by 413 View Post

    How do you compute the error estimates, and why would you use f ''(x) and f ''''(x)?
    It is shown in numerical analysis that given a function,
    f continous on [a,b] with a countinous f'' then, let T_n be the result of using the trapezoidal rule n subdivisons. Then, the error term
    If E_n=\left| \int_a^b f(x)dx -T_n \right|
    satisfies,
    E_n\leq \frac{(b-a)^3}{12n^2}\cdot \max_{a\leq x\leq b}\{f''(x)\} (which exists by EVT)
    Follow Math Help Forum on Facebook and Google+

  10. #10
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    is f '' (x)= -2xe^-x^2 and f ''''(x)=-2e^-x^2 + 2xe^x^2 ?
    Follow Math Help Forum on Facebook and Google+

  11. #11
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by 413 View Post
    is f '' (x)= -2xe^-x^2 and f ''''(x)=-2e^-x^2 + 2xe^x^2 ?
    We have,
    f=e^{-x^2}
    Thus,
    f'=-2xe^{-x^2}
    Thus, (product rule you forgot to use it )
    f''=-2e^{-x^2}+4x^2e^{-x^2}
    Follow Math Help Forum on Facebook and Google+

  12. #12
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    does En< 0.14875 seem right?
    Follow Math Help Forum on Facebook and Google+

  13. #13
    Global Moderator

    Joined
    Nov 2005
    From
    New York City
    Posts
    10,616
    Thanks
    9
    Quote Originally Posted by 413 View Post
    does En< 0.14875 seem right?
    For what? Trapezoids? Does not seem corret to me.


    The following table are the error bounds for using the trapezoidal rule n times:
    Attached Thumbnails Attached Thumbnails Midpoint-picture12.gif  
    Follow Math Help Forum on Facebook and Google+

  14. #14
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    not correct?..hmm...then how do you actually compute it with the formula's you gave me?
    Follow Math Help Forum on Facebook and Google+

  15. #15
    413
    413 is offline
    Junior Member
    Joined
    Oct 2006
    Posts
    32
    and another question,
    How big should we take n to guarntee absolute value of ET <0.0001? and also for EM and ES.
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 3
    Last Post: September 12th 2010, 02:30 AM
  2. Midpoint M
    Posted in the Pre-Calculus Forum
    Replies: 2
    Last Post: December 14th 2009, 04:01 PM
  3. Midpoint
    Posted in the Algebra Forum
    Replies: 1
    Last Post: September 12th 2009, 03:59 PM
  4. Midpoint?
    Posted in the Geometry Forum
    Replies: 2
    Last Post: September 9th 2009, 06:01 PM
  5. need help please with midpoint
    Posted in the Pre-Calculus Forum
    Replies: 3
    Last Post: October 20th 2006, 11:32 AM

Search Tags


/mathhelpforum @mathhelpforum