# Numerical Integration

Numerical integration is using numerical methods to integrate functions that are too complex to integrate directly. These involve finding the area under the graph of a function to approximate the integral of the function.

## Contents |

## Trapezoidal Rule

The trapezoidal rule uses trapezoids to approximate the area under a graph of a function.

where h = Δx, which can be calculated by h = (b - a)/n, where n is the number of segments required.

It is helpful to calculate each f_{i} in a separate table before substituting into the equation.

The error of trapezoidal rule is O(h^{2}), but is exact for linear functions.

## Simpson 1/3 Rule

The Simpson rule is similar to the trapezoidal rule, though approximates the area using a series of quadratic functions instead of straight lines. It is used if the number of segments is even.

The error of Simpson 1/3 rule is O(h^{4}), but is exact for polynomial functions up to order 3.

### Simpson 3/8 Rule

The 3/8 rule is similar to the 1/3 rule. It is used when the number of segments is odd, and requires 3 segments to be taken. It is usually used in conjunction with the 1/3 rule, where the first 3 segments are calculated with 3/8 rule while the rest are calculated with the 1/3 rule.

The error is the same as the Simpson 1/3 rule, with O(h^{4}).

## End

This is the end of this topic. Click here to go back to the main subject page for Numerical Methods & Statistics.