ArticleslgStudy

science

Adaptive Simpson's method

Adaptive Simpson's method is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Adaptive Simpson's method rather than just read about it. In short: Adaptive Simpson's method, also called adaptive Simpson's rule, is a method of numerical integration proposed by G.F. Kuncir in 1962.

Key takeaways

  • Adaptive Simpson's method belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Adaptive Simpson's method to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Adaptive Simpson's method from memory before moving on to harder problems.

Reference excerpt

Adaptive Simpson's method, also called adaptive Simpson's rule, is a method of numerical integration proposed by G.F. Kuncir in 1962. It is probably the first recursive adaptive algorithm for numerical integration to appear in print, although more modern adaptive methods based on Gauss–Kronrod quadrature and Clenshaw–Curtis quadrature are now generally preferred. Adaptive Simpson's method uses an estimate of the error we get from calculating a definite integral using Simpson's rule. If the error exceeds a user-specified tolerance, the algorithm calls for subdividing the interval of integration in two and applying adaptive Simpson's method to each subinterval in a recursive manner. The technique is usually much more efficient than composite Simpson's rule since it uses fewer function evaluations in places where the function is well-approximated by a cubic function. Simpson's rule is an interpolatory quadrature rule which is exact when the integrand is a polynomial of degree three or lower. Using Richardson extrapolation, the more accurate Simpson estimate S(a,m)+S(m,b) for six function values is combined with the less accurate estimate S(a,b) for three function values by applying the correction [S(a,m)+S(m,b)−S(a,b)]/15. So, the obtained estimate is exact for polynomials of degree five or less.

Mathematical procedure

Defining terms A criterion for determining when to stop subdividing an interval, suggested by J.N. Lyness, is |S(a,m)+S(m,b)−S(a,b)|<15ε where [a,b] is an interval with midpoint m=a+b2, while S(a,b), S(a,m), and S(m,b) given by Simpson's rule are the estimates of ∫abf(x)dx, ∫amf(x)dx, and ∫mbf(x)dx respectively, and ε is the desired maximum error tolerance for the interval. Note, εi+1=εi/2.

Procedural steps To perform adaptive Simpson's method, do the following: if |S(a,m)+S(m,b)−S(a,b)|<15εi, add S(a,m) and S(m,b) to the sum of Simpson's rules which are used to approximate the integral, otherwise, perform the same operation with |S(a,m−a2)+S(m−a2,m)−S(a,m)|<15εi+1 and |S(m,b−m2)+S(b−m2,b)−S(m,b)|<15εi+1 instead of |S(a,m)+S(m,b)−S(a,b)|<15εi.

Numerical consideration Some inputs will fail to converge in adaptive Simpson's method quickly, resulting in the tolerance underflowing and producing an infinite loop. Simple methods of guarding against this problem include adding a depth limitation (like in the C sample and in McKeeman), verifying that ε/2 ≠ ε in floating-point arithmetics, or both (like Kuncir). The interval size may also approach the local machine epsilon, giving a = b. Lyness's 1969 paper includes a "Modification 4" that addresses this problem in a more concrete way:

Let the initial interval be [A, B]. Let the original tolerance be ε0. For each subinterval [a, b], define D(a, b), the error estimate, as 12a−b[S(2)(a,b)−S(a,b)]=14[f(a)−4f(lm)+6f(m)−4f(rm)+f(b)]. Define E = 180 ε0 / (B - A). The original termination criteria would then become D ≤ E. If the D(a, m) ≥ D(a, b), either the round-off level have been reached or a zero for f(4) is found in the interval. A change in the tolerance ε0 to ε′0 is necessary. The recursive routines now need to return a D level for the current interval. A routine-static variable E' = 180 ε'0 / (B - A) is defined and initialized to E. (Modification 4 i, ii) If further recursion is used on an interval: If round-off appears to have been reached, change the E' to D(a, m). Otherwise, adjust E' to max(E, D(a, m)). Some control of the adjustments is necessary. Significant increases and minor decreases of the tolerances should be inhibited. To calculate the effective ε′0 over the entire interval: Log each xi at which the E' is changed into an array of (xi, εi' ) pairs. The first entry should be (a, ε′0). The actual εeff is the arithmetic mean of all ε′0, weighted by the width of the intervals. If the current E' for an interval is higher than E, then the fifth-order acceleration/correction would not apply: The "15" factor in the termination criteria is disabled. The correction term should not be used. The epsilon-raising maneuver allows the routine to be used in a "best effort" mode: given a zero initial tolerance, the routine will try to get the most precise answer and return an actual error level.

Sample code implementations A common implementation technique shown below is passing down f(a), f(b), f(m) along with the interval [a, b]. These values, used for evaluating S(a, b) at the parent level, will again be used for the subintervals. Doing so cuts down the cost of each recursive call from 6 to 2 evaluations of the input function. The size of the stack space used stays linear to the layer of recursions.

Python Here is an implementation of adaptive Simpson's method in Python.

C Here is an implementation of the adaptive Simpson's method in C99 that avoids redundant evaluations of f and quadrature computations. It includes all three "simple" defenses against numerical problems.

This implementation has been incorporated into a C++ ray tracer intended for X-Ray Laser simulation at Oak Ridge National Laboratory, among other projects. The ORNL version has been enhanced with a call counter, templates for different datatypes, and wrappers for integrating over multiple dimensions.

Racket Here is an implementation of the adaptive Simpson method in Racket with a behavioral software contract. The exported function computes the indeterminate integral for some given function f.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with Adaptive Simpson's method

Start with the simplest possible case. Write down what Adaptive Simpson's method claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Adaptive Simpson's method before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Adaptive Simpson's method ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Adaptive Simpson's method

In research
Adaptive Simpson's method appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Adaptive Simpson's method in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Adaptive Simpson's method is common in secondary-school and first-year university syllabi. It links to neighbouring topics Numerical integration, so understanding it makes those chapters shorter.
In everyday life
Look for Adaptive Simpson's method outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Adaptive Simpson's method” →

How to study Adaptive Simpson's method in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Adaptive Simpson's method means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Adaptive Simpson's method out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Adaptive Simpson's method in simple terms?

Adaptive Simpson's method, also called adaptive Simpson's rule, is a method of numerical integration proposed by G.F. Kuncir in 1962.

Why does Adaptive Simpson's method matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Adaptive Simpson's method?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Adaptive Simpson's method.

Tags

  • Numerical integration

Keep exploring