Tanh-sinh quadrature

Last updated

Tanh-sinh quadrature is a method for numerical integration introduced by Hidetoshi Takahashi and Masatake Mori in 1974. [1] It is especially applied where singularities or infinite derivatives exist at one or both endpoints.

Contents

The method uses hyperbolic functions in the change of variables

to transform an integral on the interval x  (−1, 1) to an integral on the entire real line t  (−∞, ∞), the two integrals having the same value. After this transformation, the integrand decays with a double exponential rate, and thus, this method is also known as the double exponential (DE) formula. [2]

For a given step size , the integral is approximated by the sum

with the abscissas

and the weights

Use

The Tanh-Sinh method is quite insensitive to endpoint behavior. Should singularities or infinite derivatives exist at one or both endpoints of the (−1, 1) interval, these are mapped to the (−∞,∞) endpoints of the transformed interval, forcing the endpoint singularities and infinite derivatives to vanish. This results in a great enhancement of the accuracy of the numerical integration procedure, which is typically performed by the Trapezoidal rule. In most cases, the transformed integrand displays a rapid roll-off (decay), enabling the numerical integrator to quickly achieve convergence.

Like Gaussian quadrature, Tanh-Sinh quadrature is well suited for arbitrary-precision integration, where an accuracy of hundreds or even thousands of digits is desired. The convergence is exponential (in the discretization sense) for sufficiently well-behaved integrands: doubling the number of evaluation points roughly doubles the number of correct digits. However, Tanh-Sinh quadrature is not as efficient as Gaussian quadrature for smooth integrands; but unlike Gaussian quadrature, tends to work equally well with integrands having singularities or infinite derivatives at one or both endpoints of the integration interval as already noted. Furthermore, Tanh-Sinh quadrature can be implemented in a progressive manner, with the step size halved each time the rule level is raised, and reusing the function values calculated on previous levels. A further advantage is that the abscissas and weights are relatively simple to compute. The cost of calculating abscissa–weight pairs for n-digit accuracy is roughly n2 log2n compared to n3 log n for Gaussian quadrature.

Bailey and others have done extensive research on Tanh-Sinh quadrature, Gaussian quadrature and Error Function quadrature, as well as several of the classical quadrature methods, and found that the classical methods are not competitive with the first three methods, particularly when high-precision results are required. In a conference paper presented at RNC5 on Real Numbers and Computers (Sept 2003), when comparing Tanh-Sinh quadrature with Gaussian quadrature and Error Function quadrature, Bailey and Li found: "Overall, the Tanh-Sinh scheme appears to be the best. It combines uniformly excellent accuracy with fast run times. It is the nearest we have to a truly all-purpose quadrature scheme at the present time."

Upon comparing the scheme to Gaussian quadrature and Error Function quadrature, Bailey et al. (2005) found that the Tanh-Sinh scheme "appears to be the best for integrands of the type most often encountered in experimental math research".

Bailey (2006) found that: "The Tanh-Sinh quadrature scheme is the fastest currently known high-precision quadrature scheme, particularly when one counts the time for computing abscissas and weights. It has been successfully employed for quadrature calculations of up to 20,000-digit precision."

In summary, the Tanh-Sinh quadrature scheme is designed so that it gives the most accurate result for the minimum number of function evaluations. In practice, the Tanh-Sinh quadrature rule is almost invariably the best rule and is often the only effective rule when extended precision results are sought[ citation needed ].

Implementations

Related Research Articles

<span class="mw-page-title-main">Gaussian quadrature</span> Approximation of the definite integral of a function

In numerical analysis, an n-point Gaussian quadrature rule, named after Carl Friedrich Gauss, is a quadrature rule constructed to yield an exact result for polynomials of degree 2n − 1 or less by a suitable choice of the nodes xi and weights wi for i = 1, ..., n.

<span class="mw-page-title-main">Hyperbolic functions</span> Collective name of 6 mathematical functions

In mathematics, hyperbolic functions are analogues of the ordinary trigonometric functions, but defined using the hyperbola rather than the circle. Just as the points (cos t, sin t) form a circle with a unit radius, the points (cosh t, sinh t) form the right half of the unit hyperbola. Also, similarly to how the derivatives of sin(t) and cos(t) are cos(t) and –sin(t) respectively, the derivatives of sinh(t) and cosh(t) are cosh(t) and +sinh(t) respectively.

<span class="mw-page-title-main">Numerical integration</span> Methods of calculating definite integrals

In analysis, numerical integration comprises a broad family of algorithms for calculating the numerical value of a definite integral. The term numerical quadrature is more or less a synonym for "numerical integration", especially as applied to one-dimensional integrals. Some authors refer to numerical integration over more than one dimension as cubature; others take "quadrature" to include higher-dimensional integration.

Integration is the basic operation in integral calculus. While differentiation has straightforward rules by which the derivative of a complicated function can be found by differentiating its simpler component functions, integration does not, so tables of known integrals are often useful. This page lists some of the most common antiderivatives.

<span class="mw-page-title-main">Newton–Cotes formulas</span> Formulas for numerical integration

In numerical analysis, the Newton–Cotes formulas, also called the Newton–Cotes quadrature rules or simply Newton–Cotes rules, are a group of formulas for numerical integration based on evaluating the integrand at equally spaced points. They are named after Isaac Newton and Roger Cotes.

In mathematics, a transcendental function is an analytic function that does not satisfy a polynomial equation whose coefficients are functions of the independent variable that can be written using only the basic operations of addition, subtraction, multiplication, and division. This is in contrast to an algebraic function.

<span class="mw-page-title-main">Trapezoidal rule</span> Numerical integration method

In calculus, the trapezoidal rule is a technique for numerical integration, i.e., approximating the definite integral:

In numerical analysis, Romberg's method is used to estimate the definite integral by applying Richardson extrapolation repeatedly on the trapezium rule or the rectangle rule. The estimates generate a triangular array. Romberg's method is a Newton–Cotes formula – it evaluates the integrand at equally spaced points. The integrand must have continuous derivatives, though fairly good results may be obtained if only a few derivatives exist. If it is possible to evaluate the integrand at unequally spaced points, then other methods such as Gaussian quadrature and Clenshaw–Curtis quadrature are generally more accurate.

<span class="mw-page-title-main">Squeezed coherent state</span> Type of quantum state

In physics, a squeezed coherent state is a quantum state that is usually described by two non-commuting observables having continuous spectra of eigenvalues. Examples are position and momentum of a particle, and the (dimension-less) electric field in the amplitude and in the mode of a light wave. The product of the standard deviations of two such operators obeys the uncertainty principle:

<span class="mw-page-title-main">Monte Carlo integration</span> Numerical technique

In mathematics, Monte Carlo integration is a technique for numerical integration using random numbers. It is a particular Monte Carlo method that numerically computes a definite integral. While other algorithms usually evaluate the integrand at a regular grid, Monte Carlo randomly chooses points at which the integrand is evaluated. This method is particularly useful for higher-dimensional integrals.

<span class="mw-page-title-main">Hyperbolic angle</span> Argument of the hyperbolic functions

In geometry, hyperbolic angle is a real number determined by the area of the corresponding hyperbolic sector of xy = 1 in Quadrant I of the Cartesian plane. The hyperbolic angle parametrizes the unit hyperbola, which has hyperbolic functions as coordinates. In mathematics, hyperbolic angle is an invariant measure as it is preserved under hyperbolic rotation.

<span class="mw-page-title-main">Rapidity</span> Measure of relativistic velocity

In special relativity, the classical concept of velocity is converted to rapidity to accommodate the limit determined by the speed of light. Velocities must be combined by Einstein's velocity-addition formula. For low speeds, rapidity and velocity are almost exactly proportional but, for higher velocities, rapidity takes a larger value, with the rapidity of light being infinite.

Clenshaw–Curtis quadrature and Fejér quadrature are methods for numerical integration, or "quadrature", that are based on an expansion of the integrand in terms of Chebyshev polynomials. Equivalently, they employ a change of variables and use a discrete cosine transform (DCT) approximation for the cosine series. Besides having fast-converging accuracy comparable to Gaussian quadrature rules, Clenshaw–Curtis quadrature naturally leads to nested quadrature rules, which is important for both adaptive quadrature and multidimensional quadrature (cubature).

In mathematics numerical analysis, the Nyström method or quadrature method seeks the numerical solution of an integral equation by replacing the integral with a representative weighted sum. The continuous problem is broken into discrete intervals; quadrature or numerical integration determines the weights and locations of representative points for the integral.

The Gauss–Kronrod quadrature formula is an adaptive method for numerical integration. It is a variant of Gaussian quadrature, in which the evaluation points are chosen so that an accurate approximation can be computed by re-using the information produced by the computation of a less accurate approximation. It is an example of what is called a nested quadrature rule: for the same set of function evaluation points, it has two quadrature rules, one higher order and one lower order. The difference between these two approximations is used to estimate the calculational error of the integration.

In numerical analysis Gauss–Laguerre quadrature is an extension of the Gaussian quadrature method for approximating the value of integrals of the following kind:

In numerical analysis, Gauss–Legendre quadrature is a form of Gaussian quadrature for approximating the definite integral of a function. For integrating over the interval [−1, 1], the rule takes the form:

Bayesian quadrature is a method for approximating intractable integration problems. It falls within the class of probabilistic numerical methods. Bayesian quadrature views numerical integration as a Bayesian inference task, where function evaluations are used to estimate the integral of that function. For this reason, it is sometimes also referred to as "Bayesian probabilistic numerical integration" or "Bayesian numerical integration". The name "Bayesian cubature" is also sometimes used when the integrand is multi-dimensional. A potential advantage of this approach is that it provides probabilistic uncertainty quantification for the value of the integral.

In numerical analysis, Filon quadrature or Filon's method is a technique for numerical integration of oscillatory integrals. It is named after English mathematician Louis Napoleon George Filon, who first described the method in 1934.

References

  1. Takahashi & Mori (1974)
  2. Mori (2005)
  3. Thompson, Nick; Maddock, John. "Double-exponential quadrature". boost.org.
  4. Dennes, Graeme (29 October 2020). "Numerical Integration With Tanh-Sinh Quadrature". Newton Excel Bach, not (just) an Excel Blog.
  5. Kmett, Edward. "integration: Fast robust numeric integration via tanh-sinh quadrature". Hackage.
  6. "mpmath library for real and complex floating-point arithmetic with arbitrary precision". mpmath.
  7. Ganchovski, Ned. "Tanh-Sinh Integration with C#". GitHub repository.

Further reading