#simpsonsrule

mkwadee@diasp.eu

Literally a couple of years ago I posted some #AnimatedGifs of the simplest #NumericalIntegration techniques, namely the #RectangleMethod, the #TrapeziumRule and #SimpsonsRule. In the comments, @Miloslav Číž suggested that I show the errors of each method as the number of strips increases (or equivalently,the width of each decreases). I said I'd try to do it when I got time. In principle it is a simple but worthwhile request but getting a bit of time and motivation to do it is another matter. Also, I needed to a way to change the labels dynamically. Anyway, here we are.

The rectangle method is the most simple-minded and crudest method of finding the area below the curve. It converges slowly.
Rectangle method

The trapezium rule is quite an improvement to the above and each area is approximated by joining up the ordinates at the beginning and end of each discrete interval with a straight line. This converges appreciably faster than the above method.
Trapezium rule

Finally the most sophisticated of the three is Simpson's rule in which pairs of adjacent strips use a #quadratic #parabola to interpolate between the ordinates. This even better at convergence than the trapezium rule. I've shown a different function here because for the function shown in the first two cases the difference between the approximation and the numerical #approximation is not discernible and the errors are very small.
Simpson's rule

#MyWork #Mathematics #Maths #Numerics #RectangleMethod #TrapeziumRule #SimpsonsRule #FreeSoftware #CCBYSA #Wikipedia #Wikimedia