Courses / Mathematics I
Scientific Programming

Numerical Integration

Mathematics I 196 words Free to read

Quadrature and Basic Rules

Many definite integrals lack an antiderivative, like the Gaussian ex2dx\int e^{-x^2} dx. When the Fundamental Theorem fails, numerical integration (quadrature) approximates the area using function values.

MethodShape UsedTruncation ErrorKey Feature
MidpointRectangleh2\sim h^2 per stepCrude baseline
TrapezoidalTrapezoidh2\sim h^2 globalStraight-line connects
Simpson'sParabolah4\sim h^4 globalFits triples of points

Simpson's rule fits a parabola through each point triple. Because parabolas hug curves tightly, halving hh cuts its error by sixteen. It is exact for polynomials up to degree three.

A straight edge bends into a parabola, without moving its endpoints

Accuracy Limits and Pitfalls

The golden principle: finer subdivisions (hh) and higher-order rules drive faster convergence.

Common Pitfall: Assuming more subdivisions always improve accuracy. Shrinking hh reduces truncation error, but summing millions of tiny terms allows round-off error to accumulate and eventually dominate the final result.

The Solution: Do not blindly shrink hh into the round-off zone. Instead, use a higher-order method like Simpson's rule to achieve high accuracy at a modest step size.

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

11practice questions
2interactive scenes

Scientific Programming