# Help with Trapezoidal Rule

#### RESmonkey

##### Diamond Member
Say I have to use trapezoidal rule with 4 equal subdivisions to estimate:

Integral of f(t) from 5 to 7.

I would do this:

(7-5)/(2*4) * ( f(5) + 2f(5.5) + 2f(6) + 2f(6.5) + f(7) )

because of

But shouldn't I only have 4 things inside? I have five. Halp!

*sigh*

#### RESmonkey

##### Diamond Member
Oh, wait. Have I been doing it right? I mean, four rectangles means 5 points, doesn't it?

Yes.

#### Suspicious-Teach8788

##### Lifer
I had this program that let you type in a function, the subdivisions and it would give you the area based on left/right rectangles, midpoint, trapezoidal, and simpson's rule

#### RESmonkey

##### Diamond Member
Thanks

I looked at an online solution to the problem. The guy did two approximations, one right hand and one left hand, both with 4 points, and then averaged them out. Got the same number. Did he do too much work? Hmm...

Oh, well. I gotta remember this trapezoidal thing. That and mean value theorem are the only 2 things I can't remember.

#### BigPoppa

##### Golden Member
Originally posted by: RESmonkey
Thanks

I looked at an online solution to the problem. The guy did two approximations, one right hand and one left hand, both with 4 points, and then averaged them out. Got the same number. Did he do too much work? Hmm...

Oh, well. I gotta remember this trapezoidal thing. That and mean value theorem are the only 2 things I can't remember.
Without mathing it out, partially because i'm too lazy, its probably just luck that the average of the left- and right-hand approximations averages out to the trapezoid approx.