Numerical integration Flashcards
how does midpoint rule work
split into segments then make rectangles with height of midpoint then work out total area
create a table with x values, mid x values then y values
midpoint rule formula
a-b/n (y1/2 + y3/2…. + y n-1/2)
how does trapezium rule work
split into strips then fit a trapezium into each with start and end point then work out total area
make a table of x endpoint values and y values
trapezium rule formula
1/2 (a + b/n) ((y0 + yn + 2(y1 + y2….. + y n-1))
Combining midpoint and trapezium
T 2n is the average of Tn and Mn
T2 = T1 + M1 /2
error bounds of midpoint and trapezium
for a concave up curve, trapezium overestimate and midpoint under
vice versa for concave down
if fully concave up then set trapezium as upper bound and midpoint lower and vice versa
if there is a mix of both then less able to do so
How does simpsons rule work
Fitting one or more quadratics to a curve, if one quadratic is fitted it is S2, if 2(i.e two parts of 2 different quadratics) then S4 and so on
Simpsons rule formulae
S 2n = 2Mn + Tn / 3
S 2n = 4T2n - Tn / 3