Math-305, Numerical Methods & Matrices
Section 5.2
Numeric Integration – Trapezoidal Rule

Dr. Kevin G. TeBeest

 
Always rework my examples BEFORE attempting the homework.

  1. You should have already worked Problem 1 in this problem set.

  2. Write this Maple code that uses the Trapezoidal rule to approximate a proper, definite integral.
    You should write this code as soon as possible, because you will use this code as a template (model) for writing codes for other numeric integration methods.

  3. Now re-run your trapezoidal rule code using 12 subintervals. You should get the result worked in class.
  4. Use the trapezoidal rule code to approximate the integral of   ex2  on the interval [0,3] using:
    1. 10 subintervals      Answer:   0.88620 20336 37399 79195
    2. 20 subintervals      Answer:   0.88620 59753 41917 12340
    3. Use Richardson extrapolation to obtain an improved estimate.
      Answer:   0.88620 72892 43422 90055
    4. How much more accurate should the result in (b) be than the result in (a)?

  5. Play around with the code to approximate integrals of other functions f(x) on different intervals [a, b].


Return to main index