Numerical integration in 1D: for a given function f:R→R and an interval (a,b)⊂R, compute an approximation of ∫ f(x) dx using
- the rectangle rule,
- trapezoidal rule,
- Keplersche Fassregel (barrel rule).
- Emphasize the connection to Lagrange polynomials (Hint: see Newton-Cotes formulas).