Enter the width of the subintervals and the function values at the nodes into the calculator to determine the approximation of the integral.

## Composite Trapezoidal Rule Formula

The following formula is used to calculate the approximation of a definite integral using the Composite Trapezoidal Rule.

I = h/2 * (y0 + 2y1 + 2y2 + ... + 2yn-1 + yn)

Variables:

- I is the approximation of the integral
- h is the width of the subintervals
- y0, y1, ..., yn are the function values at the nodes

To calculate the approximation of the integral, first determine the width of the subintervals. Then, calculate the function values at the nodes. Multiply the width of the subintervals by half. Multiply the function values at the first and last nodes by 1, and the function values at the remaining nodes by 2. Sum all these values and multiply by the half-width of the subintervals to get the approximation of the integral.

## What is a Composite Trapezoidal Rule?

The Composite Trapezoidal Rule is a numerical integration method used to approximate the definite integral of a function. It works by dividing the area under the curve of a function into several trapezoids, calculating the area of each, and then summing these areas to provide an approximation of the total area, and hence, the integral. The accuracy of the approximation increases with the number of trapezoids used.

## How to Calculate Composite Trapezoidal Rule?

The following steps outline how to calculate the approximation of the integral using the Composite Trapezoidal Rule.

- First, determine the width of the subintervals (h).
- Next, determine the function values at the nodes (y0, y1, ..., yn).
- Next, use the formula: I = h/2 * (y0 + 2y1 + 2y2 + ... + 2yn-1 + yn) to calculate the approximation of the integral.
- Finally, calculate the approximation of the integral using the Composite Trapezoidal Rule.
- After inserting the values of h and y0, y1, ..., yn into the formula and calculating the result, check your answer with the calculator above.

**Example Problem : **

Use the following variables as an example problem to test your knowledge.

Width of subintervals (h) = 0.5

Function values at the nodes (y0, y1, ..., yn) = 2, 4, 6, 8