The Trapezoidal Rule

Expert reviewed 21 July 2024 8 minute read


HSC Maths Advanced Syllabus

  • determine f(x)f(x), given f(x)f'(x) and an initial condition f(a)=bf(a)=b in a range of practical and abstract applications including coordinate geometry, business and science
  • determine the approximate area under a curve using a variety of shapes including squares, rectangles (inner and outer rectangles), triangles or trapezia
    • consider functions which cannot be integrated in the scope of this syllabus, for example f(x)=lnxf(x)=lnx, and explore the effect of increasing the number of shapes used
  • use the Trapezoidal rule to estimate areas under curves
    • use geometric arguments (rather than substitution into a given formula) to approximate a definite integral of the form abf(x)dx\int_a^bf(x)dx, where f(x)0f(x)\geq0, on the interval axba\leq x\leq b, by dividing the area into a given number of trapezia with equal widths
    • demonstrate understanding of the formula:abf(x)dxba2n[f(a)+f(b)+2[f(x1)+...+f(xn1)]]\int_a^bf(x)dx\approx\frac{b-a}{2n}[f(a)+f(b)+2[f(x_1)+...+f(x_{n-1})]] where a=x0a=x_0 and b=xnb=x_n and the values of x0,x1,...,xnx_0,x_1,...,x_n are found by dividing the interval axba\leq x\leq b into nn equal subintervals

Note:

Video coming soon!

What is the Trapezoidal Rule?

The Trapezoidal Rule is a numerical method used to approximate the definite integral of a function. It's particularly useful when an integral is difficult or impossible to solve analytically. The method works by approximating the region under the curve using a series of trapezoids, rather than rectangles or more complex shapes. The process of how this completed is displayed below.

placeholder

When a function is continuous and lies within the closed interval [a,b][a,b], then the formula for the trapezoidal rule is:

abf(x)dxba2n[f(a)+f(b)+2[f(x1)+...+f(xn1)]]\int_a^bf(x)dx\approx\frac{b-a}{2n}[f(a)+f(b)+2[f(x_1)+...+f(x_{n-1})]]

Why use \approx?

As seen above, the formula demonstrates that the trapezoidal rule is simply an approximation of the area under a curve. As such, the concavity of the curve will determine if the trapezoidal rule will overestimate or underestimate the area being found. Finding the concavity can be done by determining the second derivative of the function, or by visual inspection of the graph.

  • If a curve is concave up, the trapezoidal rule will overestimate the integral
  • If a curve is concave down, the trapezoidal rule will underestimate the integral
  • If the curve is linear, the trapezoidal rule will provide the exact value of the integral

What is nn?

The variable nn in the trapezoidal rule refers to the amount of sub-intervals used in the function. A simple way to think about this is how many sections is the area under the graph split into. Generally, a question will tell you how many subintervals, or points that should be used when conducting calculations using the trapezoidal rule. For example, the graph above, has 4 subintervals, however, the trapezoidal rule is calculated using five points.

Practice Question 1

Using the trapezoidal rule with points x=2,4x=2,4 and 66, determine the area under the graph for the function, 1x\frac{1}{x}

To begin, we could sketch the graph to gain a better understanding of the curve’s properties. However, for trapezoidal rule it is not always required if all the information is provided.

From the question we have been told to use 3 different points. This means that the area under the curve, between the limits 2x62\leq x\leq6 will be split into two different parts. Thus, n=2n=2.

Now that we have all the information we can substitute points into the formula:

261xdx622×2[f(2)+f(6)+2[f(4)]]44[12+16+2[14]]76units2\int_2^6\frac{1}{x}dx\approx\frac{6-2}{2\times2}[f(2)+f(6)+2[f(4)]]\\\approx\frac{4}{4}[\frac{1}{2}+\frac{1}{6}+2[\frac{1}{4}]]\\\approx\frac{7}{6}units^2

Return to Module 4: Integration