# Numerical integration

When no antiderivative can be found, estimate the integral with the trapezoid rule or Simpson's rule, which use values of the function at several points.

Maths (university) · Part 06: Integration techniques and uses · Card 7 of 9 · Last updated 2026-10-19

## Analogy

Estimating the area of a lake by laying a grid over its map.

## Example

**Integral of x^2 from 0 to 2, n = 2**

Points x = 0, 1, 2; values 0, 1, 4.
Trapezoid: (1/2)(0 + 2(1) + 4) = 3.
Simpson: (1/3)(0 + 4(1) + 4) = 8/3.
Exact: 8/3, about 2.667.

## In practice

Computers use it for most real-world integrals, such as those from experiments.

## Practice

### Flashcards

- **Trapezoid estimate of the integral of x^2 on [0, 2] with 2 strips?** 3, against an exact value of 8/3.

## Questions people ask

### Why use numerical integration when I have a formula?

Many functions, such as e to the minus x squared, have no antiderivative in terms of standard functions. Numerical rules still give accurate answers. Experimental data is also only known at certain points, so adding up from measured values is the only choice.

### Which is more accurate, the trapezoid rule or Simpson's rule?

Simpson's rule, usually. It fits parabolas through three points instead of straight lines through two, so it follows curves better. In the example with x squared it gives the exact answer, since a parabola matches perfectly. Trapezoids, in contrast, gave 3 instead of 2.667, which is a visible error.

## Related concepts

- [Integration by parts](https://studyvisually.com/learn/science/maths-university/maths-university-part-6/maths-university-part-6-concept-1)
- [Choosing u and dv](https://studyvisually.com/learn/science/maths-university/maths-university-part-6/maths-university-part-6-concept-2)
- [Partial fractions](https://studyvisually.com/learn/science/maths-university/maths-university-part-6/maths-university-part-6-concept-3)
- [Trigonometric integrals](https://studyvisually.com/learn/science/maths-university/maths-university-part-6/maths-university-part-6-concept-4)

Web page: https://studyvisually.com/learn/science/maths-university/maths-university-part-6/maths-university-part-6-concept-7
Study this card in the app: https://studyvisually.com/app/learn?category=maths-university&card=maths-university-part-6-concept-7
