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

1. Jan 6, 2012

escobar147

∫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. Jan 6, 2012

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, $\pi$/4, $\pi$/2, $3\pi$/4, and $\pi$.

3. Jan 6, 2012

escobar147

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?

4. Jan 6, 2012

HallsofIvy

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

5. Jan 6, 2012

escobar147

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 :)