Trapezoid Rule help?

I'm having trouble because I get a triangle instead of a trapezoid for the first trapezoid. Because It starts with (0,0). What should I do? What would the area be with the trapezoid rule? And I'm having trouble distinguishing the formulas of the trapezoid rule and midpoint rule. Any help?

Re: Trapezoid Rule help?

I'm having trouble because I get a triangle instead of a trapezoid for the first trapezoid. Because It starts with (0,0). What should I do? What would the area be with the trapezoid rule? And I'm having trouble distinguishing the formulas of the trapezoid rule and midpoint rule. Any help?

Let's look at the trapezoid rule in its simplest form, where there is only ONE interval:

If f(a) = 0 this reduces to $(b - a) * \dfrac{0 + f(b)}{2} = \dfrac{1}{2} * (b - a) * f(b)$, which is indeed the area of a triangle.

Now you are using more than one interval for your approximation, but the same logic will apply to subintervals. So for any subinterval where either
f(a) or f(b) = 0, the associated trapezoid degenerates into a triangle. You did not make a mistake; you discovered something you did not expect. Good job.

The midpoint formula does have a similarity to the trapezoid rule, but it calls for evaluating the function at only one point in the sub-interval, not two. Again, this is easiest to see if we put each rule into its simplest form, where there is only ONE interval.