Main content

## Integral Calculus

### Course: Integral Calculus > Unit 1

Lesson 2: Approximation with Riemann sums- Riemann approximation introduction
- Over- and under-estimation of Riemann sums
- Left & right Riemann sums
- Worked example: finding a Riemann sum using a table
- Left & right Riemann sums
- Worked example: over- and under-estimation of Riemann sums
- Over- and under-estimation of Riemann sums
- Midpoint sums
- Trapezoidal sums
- Understanding the trapezoidal rule
- Midpoint & trapezoidal sums
- Riemann sums review
- Motion problem with Riemann sum approximation

© 2023 Khan AcademyTerms of usePrivacy PolicyCookie Notice

# Understanding the trapezoidal rule

AP.CALC:

LIM‑5 (EU)

, LIM‑5.A (LO)

, LIM‑5.A.1 (EK)

, LIM‑5.A.2 (EK)

, LIM‑5.A.3 (EK)

, LIM‑5.A.4 (EK)

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 parenthesis, x, right parenthesis, equals, 3, natural log, left parenthesis, x, right parenthesis on the interval open bracket, 2, comma, 8, close bracket.

Here's how that looks in a diagram when we call the first trapezoid T, start subscript, 1, end subscript, the second trapezoid T, start subscript, 2, end subscript, and the third trapezoid T, start subscript, 3, end subscript:

Recall that the area of a trapezoid is h, left parenthesis, start fraction, b, start subscript, 1, end subscript, plus, b, start subscript, 2, end subscript, divided by, 2, end fraction, right parenthesis where h is the height and b, start subscript, 1, end subscript and b, start subscript, 2, end subscript are the bases.

## Finding the area of T, start subscript, 1, end subscript

We need to think about the trapezoid as if it's lying sideways.

The height h is the 2 at the bottom of T, start subscript, 1, end subscript that spans x, equals, start color #1fab54, 2, end color #1fab54 to x, equals, start color #ca337c, 4, end color #ca337c.

The first base b, start subscript, 1, end subscript is the value of 3, natural log, left parenthesis, x, right parenthesis at x, equals, start color #1fab54, 2, end color #1fab54, which is 3, natural log, left parenthesis, start color #1fab54, 2, end color #1fab54, right parenthesis.

The second base b, start subscript, 2, end subscript is the value of 3, natural log, left parenthesis, x, right parenthesis at x, equals, start color #ca337c, 4, end color #ca337c, which is 3, natural log, left parenthesis, start color #ca337c, 4, end color #ca337c, right parenthesis.

Here's how all of this looks visually:

Let's put this all together to find the area of T, start subscript, 1, end subscript:

Simplify:

## Finding the area of T, start subscript, 2, end subscript

Let's find the height and both of the bases:

Plug in and simplify:

## Find the area of T, start subscript, 3, end subscript

## Finding the total area approximation

We find the total area by adding up the area of each of the three trapezoids:

Here's the final simplified answer:

*You should pause here and walk through the algebra to make sure you understand how we got this!*

# Practice problem

# Challenge problem

## 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?(16 votes)
- 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.(51 votes)

- Where is he getting the ln(x) from?(0 votes)
- 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)(9 votes)

- 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?(2 votes)
- 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(5 votes)

- So I'm learning Numerical Integration. It is part of numerical integration? Is the Trapezoid Rule a derivation of Riemann's Sums?(0 votes)
- 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.(8 votes)

- 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?(3 votes) - 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?(2 votes)
- Is the question, or it’s working correct?

We want to find 3 trapezoidal sums total from 0 to 6 of function (x-3)^2 , answer is 22 in the practice questions, my doubt is why did we add rectangle in the middle from 2 to 4, as they are distinct shapes?

Thanks(1 vote)- Depending on your definition of a trapezoid, rectangles can be considered a type of trapezoid.(2 votes)

- From the different Riemann sum methods (Left, Right, Midpoint, Trapezoid), would the Trapezoidal sums be the most accurate?

It seems like they would be, unless there are other methods that I'm not aware of?(1 vote) - Do you think you can clarify how we find Delta x over 2? I am a little confused about how the last one is 1 rather than 2.(1 vote)
- Instead of integrating, why do we need to learn left, right, midpoint, trapezoid sums that give us inaccurate answers?(1 vote)
- 1)You may not know the precise function.

2)You are not able to integrate everything, or you can but but the problem is not well suited for the approach.(1 vote)