Walk through an example using the trapezoid rule, then try a couple of practice problems on your own.
By now you know that we can use Riemann sums to approximate the area under a function. Riemann sums use rectangles, which make for some pretty sloppy approximations. But what if we used trapezoids to approximate the area under a function instead?
Key idea: By using trapezoids (aka the "trapezoid rule") we can get more accurate approximations than by using rectangles (aka "Riemann sums").

An example of the trapezoid rule

Let's check it out by using three trapezoids to approximate the area under the function f(x)=3ln(x)f(x) = 3 \ln(x) on the interval [2,8][2, 8].
Here's how that looks in a diagram when we call the first trapezoid T1T_1, the second trapezoid T2T_2, and the third trapezoid T3T_3:
Recall that the area of a trapezoid is h(b1+b22)h \left(\dfrac{b_1 + b_2}{2}\right) where hh is the height and b1b_1 and b2b_2 are the bases.

Finding the area of T1T_1

We need to think about the trapezoid as if it's lying sideways.
The height hh is the 22 at the bottom of T1T_1 that spans x=2x = \greenD 2 to x=4x = \maroonD 4.
The first base b1b_1 is the value of 3ln(x)3 \ln(x) at x=2x = \greenD 2, which is 3ln(2)3 \ln (\greenD 2).
The second base b2b_2 is the value of 3ln(x)3 \ln(x) at x=4x = \maroonD 4, which is 3ln(4)3 \ln (\maroonD 4).
Here's how all of this looks visually:
Let's put this all together to find the area of T1T_1:
T1=h(b1+b22)T_1 = h \left(\dfrac{b_1 + b_2}{2}\right)
T1=2(3ln(2)+3ln(4)2)T_1 = 2 \left(\dfrac{3\ln(\greenD2) + 3\ln(\maroonD4)}{2}\right)
Simplify:
T1=3(ln(2)+ln(4))T_1 = 3(\ln(\greenD 2) + \ln(\maroonD 4))

Finding the area of T2T_2

Let's find the height and both of the bases:
h=2h = 2
b1=3ln(4)b_1 = 3 \ln(4)
b2=3ln(6)b_2 = 3 \ln(6)
Plug in and simplify:
T2=3(ln(4)+ln(6))T_2 = 3(\ln(4) + \ln(6))

Find the area of T3T_3

T3=T_3 =
Choose 1 answer:
Choose 1 answer:
T3=3(ln(6)+ln(8))T_3 = 3(\ln(6) + \ln(8))

Finding the total area approximation

We find the total area by adding up the area of each of the three trapezoids:
Total area=T1+T2+T3\text{Total area} = T_1 + T_2 + T_3
Here's the final simplified answer:
Total area=3(ln2+2ln4+2ln6+ln8)\text{Total area} = 3\big(\ln2+2\ln 4+ 2\ln 6+\ln 8\big)
You should pause here and walk through the algebra to make sure you understand how we got this!

Practice problem

Choose the expression that uses four trapezoids to approximate the area under the function f(x)=2ln(x)f(x) = 2 \ln(x) on the interval [2,8][2, 8].
Choose 1 answer:
Choose 1 answer:
The area of a trapezoid is given by
A=12(B1+B2)h\qquad\displaystyle A=\dfrac12\Big(B_1+B_2\Big)\cdot h
where  B1 ~B_1~ and  B2 ~B_2~ are the lengths of the vertical bases and  h ~h~ is the height (which is horizontal in this case).
T1=12(2ln2+2ln3.5)32=32(ln2+ln3.5)\displaystyle T_1=\dfrac12\big(2\ln2+2\ln3.5\big)\cdot \dfrac32=\dfrac32\Big(\ln2+\ln3.5\Big)
T2=12(2ln3.5+2ln5)32=32(ln3.5+ln5) T_2=\dfrac12\big(2\ln3.5+2\ln5\big)\cdot \dfrac32=\dfrac32\Big(\ln3.5+\ln5\Big)
T3=12(2ln5+2ln6.5)32=32(ln5+ln6.5)\displaystyle T_3=\dfrac12\big(2\ln5+2\ln6.5\big)\cdot \dfrac32=\dfrac32\Big(\ln5+\ln6.5\Big)
T4=12(2ln6.5+2ln8)32=32(ln6.5+ln8)\displaystyle T_4=\dfrac12\big(2\ln6.5+2\ln8\big)\cdot \dfrac32=\dfrac32\Big(\ln6.5+\ln8\Big)
Add them all up:
32ln2 + 3ln3.5 + 3ln5 + 3ln6.5 + 32ln8\dfrac32\ln2~+~3\ln 3.5~+~3\ln 5~+~3\ln 6.5~+~\dfrac32\ln8\,
Simplify:
32(ln2+2ln3.5+2ln5+2ln6.5+ln8)\dfrac32\big(\ln2+2\ln 3.5+ 2\ln 5+2\ln 6.5+\ln 8\big)\,

Challenge problem

Choose the expression that uses three trapezoids to approximate the area under the function ff on the interval [1,5][-1, 5].
Choose 1 answer:
Choose 1 answer:
The area of a trapezoid is given by
A=12(B1+B2)h\qquad\displaystyle A=\dfrac12\Big(B_1+B_2\Big)\cdot h
where  B1 ~B_1~ and  B2 ~B_2~ are the lengths of the vertical bases and  h ~h~ is the height (which is horizontal in this problem).
T1=12(f(1)+f(1))2=f(1)+f(1)T_1=\dfrac12\Big(f(-1)+f(1)\Big)\cdot 2=f(-1)+f(1)
T2=12(f(1)+f(3))2=f(1)+f(3)T_2=\dfrac12\Big(f(1)+f(3)\Big)\cdot 2=f(1)+f(3)
T3=12(f(3)+f(5))2=f(3)+f(5)T_3=\dfrac12\Big(f(3)+f(5)\Big)\cdot 2=f(3)+f(5)
Add them all up:
f(1)+2f(1)+2f(3)+f(5)f(-1)+2\cdot f(1)+ 2\cdot f(3)+f(5)\,
Loading