# Simpson’s 1/24 Rule for Numerical Integration

by admin in on April 29, 2019

This code calculates the Numerical Integration of a given equation on a predefined interval using Simpson’s 1/24 Rule. This codes uses variable step size so it gives accurate results. This method used in case of narrow picks.  The method is comparable in accuracy and fastness with Simpson’s 1/3 and 3/8 rules.

### Code Outputs:

• Chart of Integration History
• Chart of Residuals
• Printed values of Final Iteration value, Accuracy and Number of Iterations.

Result is: 0.99718, Accuracy: 2.0449e-05, NO Iterations: 28

### Input Requirements:

• The equation you intended to integrate
• Integration interval [a b].
• predefined error (default 0.0001).
• Maximum number of iterations (default 50000).

For Simpson’s voting rule, see Minimax Condorcet. For Simpson’s rules used in ship stability, see Simpson’s rules (ship stability). Simpson’s rule can be derived by approximating the integrand (x) (in blue) by the quadratic interpolant P(x) (in red).

### Simpson’s 1/24 Rules:

In the task of estimation of full area of narrow peak-like functions, Simpson’s rules are much less efficient than trapezoidal rule. Namely, composite Simpson’s 1/3 rule requires 1.8 times more points to achieve the same accuracy[7] as trapezoidal rule. Composite Simpson’s 3/8 rule is even less accurate. Integral by Simpson’s 1/3 rule can be represented as a sum of 2/3 of integral by trapezoidal rule with step h and 1/3 of integral by rectangle rule with step 2h. No wonder that error of the sum corresponds lo less accurate term. Averaging of Simpson’s 1/3 rule composite sums with properly shifted frames produces following rules:

where two points outside of integrated region are exploited and

Those rules are very much similar to Press’s alternative extended Simpson’s rule. Coefficients within the major part of the region being integrated equal one, differences are only at the edges. These three rules can be associated with Euler-MacLaurin formula with the first derivative term and named Euler-MacLaurin integration rules. They differ only in how the first derivative at the region end is calculated.

### References:

[1] Atkinson, Kendall E. (1989). An Introduction to Numerical Analysis (2nd ed.). John Wiley & Sons. ISBN 0-471-50023-2.

[2] Burden, Richard L.; Faires, J. Douglas (2000). Numerical Analysis (7th ed.). Brooks/Cole. ISBN 0-534-38216-9.

[3] Pate, McCall (1918). The naval artificer’s manual: (The naval artificer’s handbook revised) text, questions and general information for deck. United States. Bureau of Reconstruction and Repair. p. 198.

[4] Matthews, John H. (2004). ‘Simpson’s 3/8 Rule for Numerical Integration’. Numerical Analysis – Numerical Methods Project. California State University, Fullerton. Archived from the original on 4 December 2008. Retrieved 11 November 2008.

Share Now!

#### Release Information

• Price
:

\$6.99

• Released
:

April 29, 2019

• Last Updated
:

May 28, 2019