If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Calculus, all content (2017 edition)>Unit 4

Lesson 10: Trapezoidal rule

# Understanding the trapezoidal rule

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\left(x\right)=3\mathrm{ln}\left(x\right)$ on the interval $\left[2,8\right]$.
Here's how that looks in a diagram when we call the first trapezoid ${T}_{1}$, the second trapezoid ${T}_{2}$, and the third trapezoid ${T}_{3}$:
Recall that the area of a trapezoid is $h\left(\frac{{b}_{1}+{b}_{2}}{2}\right)$ where $h$ is the height and ${b}_{1}$ and ${b}_{2}$ are the bases.

## Finding the area of ${T}_{1}$‍

We need to think about the trapezoid as if it's lying sideways.
The height $h$ is the $2$ at the bottom of ${T}_{1}$ that spans $x=2$ to $x=4$.
The first base ${b}_{1}$ is the value of $3\mathrm{ln}\left(x\right)$ at $x=2$, which is $3\mathrm{ln}\left(2\right)$.
The second base ${b}_{2}$ is the value of $3\mathrm{ln}\left(x\right)$ at $x=4$, which is $3\mathrm{ln}\left(4\right)$.
Here's how all of this looks visually:
Let's put this all together to find the area of ${T}_{1}$:
${T}_{1}=h\left(\frac{{b}_{1}+{b}_{2}}{2}\right)$
${T}_{1}=2\left(\frac{3\mathrm{ln}\left(2\right)+3\mathrm{ln}\left(4\right)}{2}\right)$
Simplify:
${T}_{1}=3\left(\mathrm{ln}\left(2\right)+\mathrm{ln}\left(4\right)\right)$

## Finding the area of ${T}_{2}$‍

Let's find the height and both of the bases:
$h=2$
${b}_{1}=3\mathrm{ln}\left(4\right)$
${b}_{2}=3\mathrm{ln}\left(6\right)$
Plug in and simplify:
${T}_{2}=3\left(\mathrm{ln}\left(4\right)+\mathrm{ln}\left(6\right)\right)$

## Find the area of ${T}_{3}$‍

${T}_{3}=$

## Finding the total area approximation

We find the total area by adding up the area of each of the three trapezoids:
$\text{Total area}={T}_{1}+{T}_{2}+{T}_{3}$
$\text{Total area}=3\left(\mathrm{ln}2+2\mathrm{ln}4+2\mathrm{ln}6+\mathrm{ln}8\right)$
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\left(x\right)=2\mathrm{ln}\left(x\right)$ on the interval $\left[2,8\right]$.

# Challenge problem

Choose the expression that uses three trapezoids to approximate the area under the function $f$ on the interval $\left[-1,5\right]$.

## Want to join the conversation?

• In the answers for every problem why is everything but the first and last term times 2? Why isn't everything times 2?
• The first and last terms are the outer bases of the trapezoids on each end of the graph, whereas the inner terms are the bases of the two trapezoids either side of the term. So when you sum the areas of all the trapezoids you can simplify by saying 2 times the inner terms, rather than adding them twice.
• Is there any formula to find the error? like the trapezoid method gives us approximate area, so can we have some solutions to find the range for this approximation?
• Since you eventually learn how to find the exact area under the curve I never learned it, but really taking that and then subtracting the trapeoidal sum would get you the error
• I'm a little bit confused, not on how to answer these problems, but on why we are deciding to learn trapezoidal approximation.

I understand learning rectangular summation because that is what integrals are based on, but why trapezoidal? Couldn't we just learn to integrate and get an even better answer? I think that I'm probably just missing something.
(1 vote)
• Thing is, we won't always know the equation of the curve to just integrate it. There are cases where we model data, get a graph and it doesn't resemble any of your "special curves". In such cases, approximations are the best way to find the area, and the better the approximation, the closer you are to the true value.
• So I'm learning Numerical Integration. It is part of numerical integration? Is the Trapezoid Rule a derivation of Riemann's Sums?
• Trapezoid Rule is a form of Riemann's Summs, but it uses trapezoids not rectangles. Also, this explains why integration works, integration takes the limit as number of shapes approaches infinity. Which is the area under the curve.
• Where is he getting the ln(x) from?
• The original formula for the graph was F(x) = 3*ln(x). So when evaluating any Y at a specific X, you have 3*ln of that X to give you that Y. For example, at X=2, Y=3*ln(2)
• It looks like there might be an error in the solution for the second last problem. In the working out for T3 it shows:

T3 = (1/2)(2ln(5)+2ln(6.5))*(3/2) = (3/2)(ln(5)+3ln(6.5))

But that 3 in front of the ln(6.5) on the RHS of the equation shouldn't be there, should it?
• the last question I don't understand how its plus two on each interval and where that came from? also, why is it only on the first and second intervals where we add the two and not the last two?
• Isn't the trapezoidal sum the same as the average of right and left Riemann sums?