next up previous
Next: Composite quadrature Up: Assignment 3: Quadrature Previous: Assignment 3: Quadrature

Basic quadrature

1.
Use Maple to plot the function f(x) = x2 e-x on the interval (0, 2). Using Maple or a calculator, estimate the integral of f(x) over this interval, using the Midpoint rule, the Trapezoid rule, and Simpson's rule.

2.
Using the functions middlesum, trapezoid and simpson in the Maple student library, check your answers to the previous question (see page 121).

3.
Use Maple to calculate the exact value of this integral (at least to 10 digits of accuracy).

4.
Calculate the absolute errors of each of the estimates. Looking at the plot of the function, see if the sign of the errors make sense. For example, we expect the Trapezoid rule to underestimate the integral of any function that is concave in the interval.

5.
Using Maple to differentiate and maximize (see the Maple command minimize), find the maximal values of f''(x) and f(4)(x) in the interval, and use these to find a bound on the errors for each of the estimates. Confirm that the errors fall within these bounds.

6.
Answer questions 9 and 10 on page 115 of the book.


next up previous
Next: Composite quadrature Up: Assignment 3: Quadrature Previous: Assignment 3: Quadrature
Allen B. Downey
1998-10-01