How To Solve By Simpson's Rule With Excel

Simpson's rule is a method for evaluating definite integrals. Simpson's rule uses quadratic polynomials. It often provides more accurate estimates than the trapezoidal rule. If the function you are integrating can be evaluated in Excel, then you can implement Simpson's rule in Excel.

Advertisement

Step 1

Subtract the lower endpoint from the upper endpoint and divide by 2. For example, if you want to find the definite integral of cos(x) between 0 and pi/2 radians, subtract 0 from pi/2 and divide by 2 to get pi/4. (Radians are the usual method of measuring angles in calculus; Excel also assumes that angles are measured in radians).

Advertisement

Step 2

Enter column headers in Excel. Enter "value" in cell A1 and "function" in cell B1, where "function" is the function you are evaluating. In the example, put cos(x) in cell B1.

Step 3

Enter the lower endpoint, the midpoint and the upper endpoint of the integral in cells A2, A3 and A4 respectively. In the example, put 0 in cell A2, =PI/4 in cell A3 and =PI()/2 in cell A4.

Step 4

Use Excel to evaluate the function at these three points. In cell B2, enter =function(A2). In the example, put =COS(A2) in cell B2 and copy this to cells B3 and B4.

Step 5

Evaluate Simpson's rule. In cell A5, enter =(A3-A2)(B2+4B3+B4)/3. The result is the approximation of the integral by Simpson's rule.

Cite This Article

MLA

Flom, Peter. "How To Solve By Simpson's Rule With Excel" sciencing.com, https://www.sciencing.com/solve-simpsons-rule-excel-8576957/. 22 November 2019.

APA

Flom, Peter. (2019, November 22). How To Solve By Simpson's Rule With Excel. sciencing.com. Retrieved from https://www.sciencing.com/solve-simpsons-rule-excel-8576957/

Chicago

Flom, Peter. How To Solve By Simpson's Rule With Excel last modified March 24, 2022. https://www.sciencing.com/solve-simpsons-rule-excel-8576957/

Recommended

Advertisement