Working out an area when you cannot do the integral by hand — which is the normal case, not the exception.
Reading order
- Riemann Sums — [Beginner] — how a continuous integral becomes a finite sum you can actually loop over: step width, sample points, and the left, right, midpoint and trapezoidal rules
- Quadrature Rules — [Intermediate] — Newton–Cotes and Simpson’s rules, Gaussian quadrature, adaptive methods and Monte Carlo
The methods, at a glance
| Rule | Where it samples | Error shrinks like |
|---|---|---|
| Left / right rectangle | one end of each strip | |
| Midpoint | the centre of each strip | |
| Trapezoidal | average of both ends | |
| Simpson’s 1/3 | a parabola through three points | |
| Simpson’s 3/8 | a cubic through four points | |
| Gauss–Legendre | points chosen to be optimal | exact for degree |
Lesson 1 covers the first three rows and explains why the choice of sample point is the whole story. Lesson 2 covers the rest.
Related
- numerical-methods/ — the parent course
- Integration — where the limit definition comes from
- ODE solvers — each step of which is an integration
Jump to a subject
Software engineering
Infrastructure & security
Computer science
Hardware & engineering