“Numerical Integration” Courseware

Download the free mathematics courseware module using MATLAB.

Course Materials Include:

Numerical Integration

by Dr. Matthew Leineweber, San Jose State University.

This curriculum module contains interactive live scripts that teach two fundamental techniques for approximating definite integrals: the trapezoid rule and Simpson’s rules. These rules are derived from Lagrange interpolating polynomials and explored through interactive visualizations. Each lesson concludes with a guided activity in which students implement the discussed integration rule. These live scripts can be used as part of a lecture, as activities in an instructional setting, or as an interactive assignment to be completed outside of class.

Learning goals

TrapezoidRule.mlx (an interactive lesson that explores the trapezoid rule):

  • Explain numerical quadrature and its relationship to the definite integral.
  • Describe how the trapezoid rule is derived.
  • Illustrate the trapezoid rule graphically.
  • Compare integration of a continuous function with integration of tabulated data.
  • Implement the trapezoid rule in MATLAB.

SimpsonsRules.mlx (an interactive lesson that explores Simpson’s rules):

  • Describe how Lagrange interpolating polynomials can be used to derive integration rules.
  • Illustrate Simpson’s 1/3 rule graphically.
  • Explain the steps required to implement Simpson’s 1/3 rule.
  • Compare the accuracy and limitations of Simpson’s 1/3 rule with those of Simpson’s 3/8 rule.
  • Implement Simpson’s 3/8 rule in MATLAB.


Have any questions or feedback? Contact the MathWorks online teaching team.