Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Numerical integration

From Wikipedia, the free encyclopedia
Methods of calculating definite integrals
This article is about methods of calculating definite integrals. For methods of finding numerical solutions of ordinary or partial differential equations, seeNumerical methods for ordinary differential equations andNumerical methods for partial differential equations.
Numerical integration is used to calculate a numerical approximation for the valueS{\displaystyle S}, the area under the curve defined byf(x){\displaystyle f(x)}.
Differential equations
Scope
Classification
Solution
People

Inanalysis,numerical integration comprises a broad family ofalgorithms for calculating the numerical value of a definiteintegral.The termnumerical quadrature (often abbreviated toquadrature) 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 ascubature;[1] others take "quadrature" to include higher-dimensional integration.

The basic problem in numerical integration is to compute an approximate solution to a definite integral

abf(x)dx{\displaystyle \int _{a}^{b}f(x)\,dx}

to a given degree of accuracy. Iff(x) is a smooth function integrated over a small number of dimensions, and the domain of integration is bounded, there are many methods for approximating the integral to the desired precision.

Numerical integration has roots in the geometrical problem of finding a square with the same area as a given plane figure (quadrature orsquaring), as in thequadrature of the circle.The term is also sometimes used to describe thenumerical solution of differential equations.

Motivation and need

[edit]

There are several reasons for carrying out numerical integration, as opposed to analytical integration by finding theantiderivative:

  1. The integrandf (x) may be known only at certain points, such as obtained bysampling. Someembedded systems and other computer applications may need numerical integration for this reason.
  2. A formula for the integrand may be known, but it may be difficult or impossible to find an antiderivative that is anelementary function. An example of such an integrand isf (x) =exp(−x2), the antiderivative of which (theerror function, times a constant) cannot be written inelementary form(see also:Nonelementary integral).
  3. It may be possible to find an antiderivative symbolically, but it may be easier to compute a numerical approximation than to compute the antiderivative. That may be the case if the antiderivative is given as an infinite series or product, or if its evaluation requires aspecial function that is not available.

History

[edit]
Main article:Quadrature (geometry)

The term "numerical integration" first appears in 1915 in the publicationA Course in Interpolation and Numeric Integration for the Mathematical Laboratory byDavid Gibb.[2]

"Quadrature" is a historical mathematical term that means calculating area. Quadrature problems have served as one of the main sources ofmathematical analysis.Mathematicians of Ancient Greece, according to thePythagorean doctrine, understood calculation ofarea as the process of constructing geometrically asquare having the same area(squaring) — that is why the process was named "quadrature". Examples includequadrature of the circle,Lune of Hippocrates, and the treatiseQuadrature of the Parabola. This construction must be performed only by means ofcompass and straightedge.

The ancient Babylonians used thetrapezoidal rule to integrate the motion ofJupiter along theecliptic.[3]

Antique method of finding thegeometric mean

For a quadrature of a rectangle with the sidesa andb it is necessary to construct a square with the sidex=ab{\displaystyle x={\sqrt {ab}}} (thegeometric mean ofa andb). For this purpose it is possible to use the following fact: if we draw the circle with the sum ofa andb as the diameter, then the height BH (from a point of their connection to crossing with a circle) equals their geometric mean. The similar geometrical construction solves a problem of a quadrature for a parallelogram and a triangle.

The area of a segment of a parabola

Problems of quadrature for curvilinear figures are much more difficult. Thequadrature of the circle with compass and straightedge had been proved in the 19th century to be impossible. Nevertheless, for some figures (for example thelune of Hippocrates) a quadrature can be performed. The quadratures of a sphere surface and aparabola segment done byArchimedes became the highest achievement of the antique analysis.

  • The area of the surface of a sphere is equal to quadruple the area of agreat circle of this sphere.
  • The area of a segment of theparabola cut from it by a straight line is 4/3 the area of the triangle inscribed in this segment.

To prove the results, Archimedes used themethod of exhaustion ofEudoxus.

In medieval Europe the quadrature meant calculation of area by any method. More often themethod of indivisibles was used; it was less rigorous, but more simple and powerful. With its helpGalileo Galilei andGilles de Roberval found the area of acycloid arch,Grégoire de Saint-Vincent investigated the area under ahyperbola (Opus Geometricum, 1647), andAlphonse Antonio de Sarasa, de Saint-Vincent's pupil and commentator, noted the relation of this area tologarithms.

John Wallis algebrised this method: he wrote in hisArithmetica Infinitorum (1656) series that we now call thedefinite integral, and he calculated their values.Isaac Barrow andJames Gregory made further progress: quadratures for somealgebraic curves andspirals.Christiaan Huygens successfully performed a quadrature of somesolids of revolution.

The quadrature of the hyperbola by Saint-Vincent and de Sarasa provided a newfunction, thenatural logarithm, of critical importance.

With the invention ofintegral calculus came a universal method for area calculation. In response, the term "quadrature" has become traditional, and instead the modern phrase "computation of a univariate definite integral" is more common.

Methods for one-dimensional integrals

[edit]

Aquadrature rule is an approximation of thedefinite integral of afunction, usually stated as aweighted sum of function values at specified points within the domain of integration.

Numerical integration methods can generally be described as combining evaluations of the integrand to get an approximation to the integral. The integrand is evaluated at a finite set of points calledintegration points and a weighted sum of these values is used to approximate the integral. The integration points and weights depend on the specific method used and the accuracy required from the approximation.

An important part of the analysis of any numerical integration method is to study the behavior of the approximation error as a function of the number of integrand evaluations. A method that yields a small error for a small number of evaluations is usually considered superior. Reducing the number of evaluations of the integrand reduces the number of arithmetic operations involved, and therefore reduces the total error. Also, each evaluation takes time, and the integrand may be arbitrarily complicated.

Quadrature rules based on step functions

[edit]

A "brute force" kind of numerical integration can be done, if the integrand is reasonably well-behaved (i.e.piecewisecontinuous and ofbounded variation), by evaluating the integrand with very small increments.

Illustration of the rectangle rule.

This simplest method approximates the function by astep function (a piecewise constant function, or a segmented polynomial of degree zero) that passes through the point(a+b2,f(a+b2)){\textstyle \left({\frac {a+b}{2}},f\left({\frac {a+b}{2}}\right)\right)}. This is called themidpoint rule orrectangle ruleabf(x)dx(ba)f(a+b2).{\displaystyle \int _{a}^{b}f(x)\,dx\approx (b-a)f\left({\frac {a+b}{2}}\right).}

Quadrature rules based on interpolating functions

[edit]

A large class of quadrature rules can be derived by constructinginterpolating functions that are easy to integrate. Typically these interpolating functions arepolynomials. In practice, since polynomials of very high degree tend tooscillate wildly, only polynomials of low degree are used, typically linear and quadratic.

Illustration of the trapezoidal rule.

The interpolating function may be a straight line (anaffine function, i.e. a polynomial of degree 1)passing through the points(a,f(a)){\displaystyle \left(a,f(a)\right)} and(b,f(b)){\displaystyle \left(b,f(b)\right)}.This is called thetrapezoidal ruleabf(x)dx(ba)(f(a)+f(b)2).{\displaystyle \int _{a}^{b}f(x)\,dx\approx (b-a)\left({\frac {f(a)+f(b)}{2}}\right).}

Illustration of Simpson's rule.

For either one of these rules, we can make a more accurate approximation by breaking up the interval[a,b]{\displaystyle [a,b]} into some numbern{\displaystyle n} of subintervals, computing an approximation for each subinterval, then adding up all the results. This is called acomposite rule,extended rule, oriterated rule. For example, the composite trapezoidal rule can be stated asabf(x)dxban(f(a)2+k=1n1(f(a+kban))+f(b)2),{\displaystyle \int _{a}^{b}f(x)\,dx\approx {\frac {b-a}{n}}\left({f(a) \over 2}+\sum _{k=1}^{n-1}\left(f\left(a+k{\frac {b-a}{n}}\right)\right)+{f(b) \over 2}\right),}

where the subintervals have the form[a+kh,a+(k+1)h][a,b],{\displaystyle [a+kh,a+(k+1)h]\subset [a,b],} withh=ban{\textstyle h={\frac {b-a}{n}}} andk=0,,n1.{\displaystyle k=0,\ldots ,n-1.} Here we used subintervals of the same lengthh{\displaystyle h} but one could also use intervals of varying length(hk)k{\displaystyle \left(h_{k}\right)_{k}}.

Interpolation with polynomials evaluated at equally spaced points in[a,b]{\displaystyle [a,b]} yields theNewton–Cotes formulas, of which the rectangle rule and the trapezoidal rule are examples.Simpson's rule, which is based on a polynomial of order 2, is also a Newton–Cotes formula.

Quadrature rules with equally spaced points have the very convenient property ofnesting. The corresponding rule with each interval subdivided includes all the current points, so those integrand values can be re-used.

If we allow the intervals between interpolation points to vary, we find another group of quadrature formulas, such as theGaussian quadrature formulas. A Gaussian quadrature rule is typically more accurate than a Newton–Cotes rule that uses the same number of function evaluations, if the integrand issmooth (i.e., if it is sufficiently differentiable). Other quadrature methods with varying intervals includeClenshaw–Curtis quadrature (also called Fejér quadrature) methods, which do nest.

Gaussian quadrature rules do not nest, but the relatedGauss–Kronrod quadrature formulas do.

Adaptive algorithms

[edit]
This section is an excerpt fromAdaptive quadrature.[edit]
Adaptive quadrature is a numerical integration method in which theintegral of afunctionf(x){\displaystyle f(x)} isapproximated using static quadrature rules on adaptively refined subintervals of the region of integration. Generally, adaptive algorithms are just as efficient and effective as traditional algorithms for "well behaved" integrands, but are also effective for "badly behaved" integrands for which traditional algorithms may fail.

Extrapolation methods

[edit]

The accuracy of a quadrature rule of theNewton–Cotes type is generally a function of the number of evaluation points. The result is usually more accurate as the number of evaluation points increases, or, equivalently, as the width of the step size between the points decreases. It is natural to ask what the result would be if the step size were allowed to approach zero. This can be answered by extrapolating the result from two or more nonzero step sizes, usingseries acceleration methods such asRichardson extrapolation. The extrapolation function may be apolynomial orrational function. Extrapolation methods are described in more detail by Stoer and Bulirsch (Section 3.4) and are implemented in many of the routines in theQUADPACK library.

Conservative (a priori) error estimation

[edit]

Letf{\displaystyle f} have a bounded first derivative over[a,b],{\displaystyle [a,b],} i.e.fC1([a,b]).{\displaystyle f\in C^{1}([a,b]).} Themean value theorem forf,{\displaystyle f,} wherex[a,b),{\displaystyle x\in [a,b),} gives(xa)f(ξx)=f(x)f(a),{\displaystyle (x-a)f'(\xi _{x})=f(x)-f(a),}for someξx(a,x]{\displaystyle \xi _{x}\in (a,x]} depending onx{\displaystyle x}.

If we integrate inx{\displaystyle x} froma{\displaystyle a} tob{\displaystyle b} on both sides and take the absolute values, we obtain|abf(x)dx(ba)f(a)|=|ab(xa)f(ξx)dx|.{\displaystyle \left|\int _{a}^{b}f(x)\,dx-(b-a)f(a)\right|=\left|\int _{a}^{b}(x-a)f'(\xi _{x})\,dx\right|.}

We can further approximate the integral on the right-hand side by bringing the absolute value into the integrand, and replacing the term inf{\displaystyle f'} by an upper bound

|abf(x)dx(ba)f(a)|(ba)22supaxb|f(x)|,{\displaystyle \left|\int _{a}^{b}f(x)\,dx-(b-a)f(a)\right|\leq {(b-a)^{2} \over 2}\sup _{a\leq x\leq b}\left|f'(x)\right|,}

1

where thesupremum was used to approximate.

Hence, if we approximate the integralabf(x)dx{\textstyle \int _{a}^{b}f(x)\,dx} by thequadrature rule(ba)f(a){\displaystyle (b-a)f(a)} our error is no greater than the right hand side of1. We can convert this into an error analysis for theRiemann sum, giving an upper bound ofn12sup0x1|f(x)|{\displaystyle {\frac {n^{-1}}{2}}\sup _{0\leq x\leq 1}\left|f'(x)\right|}for the error term of that particular approximation. (Note that this is precisely the error we calculated for the examplef(x)=x{\displaystyle f(x)=x}.) Using more derivatives, and by tweaking the quadrature, we can do a similar error analysis using aTaylor series (using a partial sum with remainder term) forf. This error analysis gives a strict upper bound on the error, if the derivatives off are available.

This integration method can be combined withinterval arithmetic to producecomputer proofs andverified calculations.

Integrals over infinite intervals

[edit]

Several methods exist for approximate integration over unbounded intervals. The standard technique involves specially derived quadrature rules, such asGauss-Hermite quadrature for integrals on the whole real line andGauss-Laguerre quadrature for integrals on the positive reals.[4] Monte Carlo methods can also be used, or a change of variables to a finite interval; e.g., for the whole line one could usef(x)dx=1+1f(t1t2)1+t2(1t2)2dt,{\displaystyle \int _{-\infty }^{\infty }f(x)\,dx=\int _{-1}^{+1}f\left({\frac {t}{1-t^{2}}}\right){\frac {1+t^{2}}{\left(1-t^{2}\right)^{2}}}\,dt,}and for semi-infinite intervals one could useaf(x)dx=01f(a+t1t)dt(1t)2,af(x)dx=01f(a1tt)dtt2,{\displaystyle {\begin{aligned}\int _{a}^{\infty }f(x)\,dx&=\int _{0}^{1}f\left(a+{\frac {t}{1-t}}\right){\frac {dt}{(1-t)^{2}}},\\\int _{-\infty }^{a}f(x)\,dx&=\int _{0}^{1}f\left(a-{\frac {1-t}{t}}\right){\frac {dt}{t^{2}}},\end{aligned}}}as possible transformations.

Multidimensional integrals

[edit]

The quadrature rules discussed so far are all designed to compute one-dimensional integrals. To compute integrals in multiple dimensions, one approach is to phrase the multiple integral as repeated one-dimensional integrals by applyingFubini's theorem (the tensor product rule). This approach requires the function evaluations togrow exponentially as the number of dimensions increases. Three methods are known to overcome this so-calledcurse of dimensionality.

A great many additional techniques for forming multidimensional cubature integration rules for a variety of weighting functions are given in the monograph by Stroud.[5]Integration on thesphere has been reviewed by Hesse et al. (2015).[6]

Monte Carlo

[edit]
Main article:Monte Carlo integration

Monte Carlo methods andquasi-Monte Carlo methods are easy to apply to multi-dimensional integrals. They may yield greater accuracy for the same number of function evaluations than repeated integrations using one-dimensional methods.[citation needed]

A large class of useful Monte Carlo methods are the so-calledMarkov chain Monte Carlo algorithms, which include theMetropolis–Hastings algorithm andGibbs sampling.

Sparse grids

[edit]

Sparse grids were originally developed by Smolyak for the quadrature of high-dimensional functions. The method is always based on a one-dimensional quadrature rule, but performs a more sophisticated combination of univariate results. However, whereas the tensor product rule guarantees that the weights of all of the cubature points will be positive if the weights of the quadrature points were positive, Smolyak's rule does not guarantee that the weights will all be positive.

Bayesian quadrature

[edit]

Bayesian quadrature is a statistical approach to the numerical problem of computing integrals and falls under the field ofprobabilistic numerics. It can provide a full handling of the uncertainty over the solution of the integral expressed as aGaussian process posterior variance.

Connection with differential equations

[edit]

The problem of evaluating the definite integral

F(x)=axf(u)du{\displaystyle F(x)=\int _{a}^{x}f(u)\,du}

can be reduced to aninitial value problem for anordinary differential equation by applying the first part of thefundamental theorem of calculus. By differentiating both sides of the above with respect to the argumentx, it is seen that the functionF satisfies

dF(x)dx=f(x),F(a)=0.{\displaystyle {\frac {dF(x)}{dx}}=f(x),\quad F(a)=0.}

Numerical methods for ordinary differential equations, such asRunge–Kutta methods, can be applied to the restated problem and thus be used to evaluate the integral. For instance, the standard fourth-order Runge–Kutta method applied to the differential equation yields Simpson's rule from above.

The differential equationF(x)=f(x){\displaystyle F'(x)=f(x)} has a special form: the right-hand side contains only the independent variable (herex{\displaystyle x}) and not the dependent variable (hereF{\displaystyle F}). This simplifies the theory and algorithms considerably. The problem of evaluating integrals is thus best studied in its own right.

Conversely, the term "quadrature" may also be used for the solution of differential equations: "solving by quadrature" or "reduction to quadrature" means expressing its solution in terms ofintegrals.

See also

[edit]

References

[edit]
  1. ^Weisstein, Eric W."Cubature".MathWorld.
  2. ^"Earliest Known Uses of Some of the Words of Mathematics (Q)".jeff560.tripod.com. Retrieved31 March 2018.
  3. ^Mathieu Ossendrijver (Jan 29, 2016). "Ancient Babylonian astronomers calculated Jupiter's position from the area under a time-velocity graph".Science.351 (6272):482–484.Bibcode:2016Sci...351..482O.doi:10.1126/science.aad8085.PMID 26823423.S2CID 206644971.
  4. ^Leader, Jeffery J. (2004).Numerical Analysis and Scientific Computation. Addison Wesley.ISBN 978-0-201-73499-7.
  5. ^Stroud, A. H. (1971).Approximate Calculation of Multiple Integrals. Cliffs, NJ: Prentice-Hall Inc.ISBN 9780130438935.
  6. ^Kerstin Hesse, Ian H. Sloan, and Robert S. Womersley: Numerical Integration on the Sphere. In W. Freeden et al. (eds.), Handbook of Geomathematics, Springer: Berlin 2015,doi:10.1007/978-3-642-54551-1_40

External links

[edit]
Wikimedia Commons has media related toNumerical integration.
Newton–Cotes formulas
Gaussian quadrature
Other
Related
Classification
Operations
Attributes of variables
Relation to processes
Solutions
Existence/uniqueness
Solution topics
Solution methods
Examples
Mathematicians
International
National
Other
Retrieved from "https://en.wikipedia.org/w/index.php?title=Numerical_integration&oldid=1322017411"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp