Skip to content
    Calculus

    Trapezoidal Rule: How to Estimate Integrals

    How do surveyors find the area of a field with a curved river along one side, using only a tape measure? They often use the trapezoidal rule: join measured points with straight lines and add up the trapezoids. This guide shows you the formula and a full worked example.

    Math Solver Academic Editorial Board5 min read

    Key takeaways

    • Area ≈ (Δx ÷ 2) × [first + 2 × each middle height + last].
    • Δx = (b − a) ÷ N, and N strips need N + 1 points.
    • Only the inside heights are doubled, never the two ends.
    • It equals the average of the left and right Riemann sums.
    In this guide
    1. 01What is the trapezoidal rule?
    2. 02Why does the trapezoidal rule matter?
    3. 03The formula
    4. 04How to use the trapezoidal rule step by step
    5. 05Common mistakes to avoid
    6. 06Tips and tricks
    7. 07Where you’ll use it in real life
    8. 08Quick summary
    9. 09Worked example
    10. 10Frequently asked questions

    What is the trapezoidal rule?

    The area under a curve between two points is called a definite integral. When you can’t find it exactly, you can estimate it. Rectangles (a Riemann sum) leave gaps or overlaps. Trapezoids follow the curve better, because their top edge slopes to meet the curve at both ends of each strip.

    Why does the trapezoidal rule matter?

    In real life you often have measurements, not a formula: speed every minute, width of a field every 10 metres, power use every hour. The trapezoidal rule turns those numbers straight into a total, with no formula needed.

    For smooth curves, doubling the number of strips makes the error about four times smaller. That makes it easy to get a more accurate answer.

    The formula

    Area ≈ (Δx ÷ 2) × [ f(x₀) + 2f(x₁) + 2f(x₂) + … + 2f(xₙ₋₁) + f(xₙ) ]
    SymbolWhat it meansExample
    ΔxWidth of each strip: (b − a) ÷ N(3 − 1) ÷ 4 = 0.5
    NThe number of strips4
    x₀ = a, xₙ = bThe two ends of the interval1 and 3
    x₁, x₂, …The points in between1.5, 2, 2.5
    f(x)The height of the curve at each pointf(1.5) = 2.25

    The two end heights are counted once. Every inside height is counted twice, because it is shared by two trapezoids. This calculator uses f(x) = xᵖ from a to b and also shows the exact value and the error.

    How to use the trapezoidal rule step by step

    1. 1Find the width. Δx = (b − a) ÷ N.
    2. 2List the N + 1 points. a, a + Δx, a + 2Δx, …, b.
    3. 3Find each height. Put each point into f(x).
    4. 4Add them up the right way. First + last + 2 × (every middle height).
    5. 5Multiply by Δx ÷ 2. That is your estimate.

    Now try it yourself. Enter a power, the limits and the number of strips in the calculator below, and compare with the exact value.

    Try it yourself

    Pre-filled with the example — change any value.

    🧮
    Calculus
    University

    Trapezoidal Rule

    Approximate ∫[a,b] xⁿ dx using the Trapezoidal Rule with N subintervals.

    ∫[a,b]f dx ≈ (Δx/2)[f(x₀)+2f(x₁)+…+2f(xₙ₋₁)+f(xₙ)]

    Area Under Curve ∫f(x)dx
    120
    120
    0.120
    120

    💡 Example

    Reference
    Inputs:p=2, a=0, b=1, N=4
    Result:0.34375
    Open the full Trapezoidal Rule calculator

    Common mistakes to avoid

    • Using Δx instead of Δx/2. The formula has Δx ÷ 2 in front.
    • Counting points wrong. N strips need N + 1 points.
    • Expecting an exact answer. For curves that bend upward, like x², the straight tops sit slightly above the curve, so the estimate is a bit too big.

    Tips and tricks

    • Straight lines are exact. If f is a straight line, the trapezoids fit perfectly and there is no error.
    • Want more accuracy? Try Simpson’s rule, which fits curves through the points.
    • Exact check: for powers of x, the definite integral calculator gives the true area.

    Where you’ll use it in real life

    • Surveying: the area of a plot with a curved edge, from width measurements.
    • Transport: distance travelled from a speed log.
    • Energy: total energy from a power meter’s hourly readings.
    • Medicine: the area under a drug concentration curve from blood samples.

    Quick summary

    The trapezoidal rule joins points with straight lines and adds the trapezoids: (Δx ÷ 2) × [first + 2 × middles + last]. Double only the inside heights, and use more strips for a better answer. Use the calculator above to compare your estimate with the exact area.

    Worked example

    An engineering student wants to estimate the area under y = x² between x = 1 and x = 3 using 4 trapezoids, then see how close it is to the exact answer. Here p = 2, a = 1, b = 3 and N = 4.

    1. 01∫[1 to 3] x^2 dx using Trapezoidal Rule, N=4
    2. 02Δx = (3−1)/4 = 0.5
    3. 03T = (Δx/2)[f(a) + 2f(x₁) + … + 2f(xₙ₋₁) + f(b)]
    4. 04≈ 8.75
    5. 05Exact = 8.6667
    6. 06Error = 0.0833

    These numbers are pre-filled in the calculator above.

    Frequently asked questions

    Is the trapezoidal rule more accurate than a Riemann sum?

    It is usually more accurate than a left or right Riemann sum with the same strips. A midpoint sum is often similar or slightly better.

    How do I make the trapezoidal rule more accurate?

    Use more strips (a bigger N). Doubling N makes the error about four times smaller for smooth curves.

    What’s the difference between the trapezoidal rule and Simpson’s rule?

    The trapezoidal rule joins points with straight lines. Simpson’s rule fits curved pieces (parabolas) through them, which is usually much more accurate.

    #Calculus#University#Trapezoidal Rule
    Updated

    Keep reading

    Sponsored ToolsAd

    More tools on Ytools →
    Calcu.click — 25+ Free Smart Calculators preview

    Calcu.click — 25+ Free Smart Calculators

    Brand new calculation platform with 0ms reactive math, 100% client-side privacy, and dedicated subdomains. Fast calculators for EMI, SIP, Mortgage, Income Tax, BMI, Age, Percentage, and more.

    25+ CalculatorsFinanceHealth0ms Real-TimeFree
    Keyboard Arena preview

    Keyboard Arena

    Master touch typing with real-time WPM speed tests, mechanical switch audio, A-Z finger biomechanics drills, 40+ structured lessons, and competitive arcade games.

    Typing TestWPMTouch Typing
    Flutter Log Explorer preview

    Flutter Log Explorer

    Real-time structured log viewer and search explorer for Flutter & Dart. Zero-config capture from Debug Adapter (DAP) & Dart VM Service with smart classification and filters.

    FlutterDartVS Code ExtensionOpen VSX