Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Using the trapezium rule, evaluate the following definite integral, with 4,8 & 16 sub

  1. Jan 6, 2012 #1
    ∫cos x + sin x

    lower limit: 0 upper limit: pi

    correct answer: 4 intervals: 1.8962, 8 intervals: 1.9742, 16 intervals: 1.9936

    i cannot seem to get the correct answer, here is my attempt:

    x values cosx + sinx values
    0 1
    1.042 0.998
    2.0944 0.993
    3.1415 0.9984

    2(0.998 +0.993) + 1 + 0.9984 = 5.9966

    h= b-a/n n=4, b-a = pi

    h= 0.7853

    h/2(5.9966) = 2.3548

    this is for the 4 sub interval part of the question and is incorrect...... any help would be massively appreciated!!
     
  2. jcsd
  3. Jan 6, 2012 #2

    Mark44

    Staff: Mentor

    Re: Using the trapezium rule, evaluate the following definite integral, with 4,8 & 16

    You have three subintervals, not four. The endpoints of your subintervals should be at 0, [itex]\pi[/itex]/4, [itex]\pi[/itex]/2, [itex]3\pi[/itex]/4, and [itex]\pi[/itex].
     
  4. Jan 6, 2012 #3
    Re: Using the trapezium rule, evaluate the following definite integral, with 4,8 & 16

    i believe these are the correct values:
    0 1
    .785 1.414
    1.570 1
    2.356 0
    3.1415 -1

    how are they found????? when i plug the x values in to cos x + sin x, my answers are different?
     
  5. Jan 6, 2012 #4

    HallsofIvy

    User Avatar
    Science Advisor

    Re: Using the trapezium rule, evaluate the following definite integral, with 4,8 & 16

    Your calculator should be in radian mode, not degrees!
     
  6. Jan 6, 2012 #5
    Re: Using the trapezium rule, evaluate the following definite integral, with 4,8 & 16

    ah.... i see..... there's 3 hours i will never get back :)
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook