The document provides matlab code to approximate the integral I = ∫11 exp(-x^2)dx in three different ways: 1) Using the quad command with default settings to integrate over [-1,1]. 2) Using the trapezoidal rule over [-1,1]. 3) Using the composite trapezoidal rule over [-1,1] divided into 20 sub-intervals. The results of approximations 1 and 3 are saved to files A01.dat and A03.dat respectively.