Numerical integration Created 2026-10-03 Updated 2026-10-18
Numerical integration approximates a definite integral using finitely many sampled function values. For an integrand on a finite interval , , a quadrature rule has the form
The quadrature nodes tell us where to evaluate ; the quadrature weights turn those values into an approximation to the accumulated signed area. The exact definite integral depends on the integrand throughout the interval, whereas the quadrature rule sees only these samples. Integrating a chosen interpolant exactly still generally approximates the original integrand's integral.[ref]
The fundamental theorem of calculus evaluates as when an antiderivative is available. Numerical integration is useful when no convenient antiderivative is known, or each evaluation of the integrand requires an expensive computation. The task then becomes choosing informative quadrature nodes and controlling the quadrature error with as few evaluations as possible. Fixed data also permit a quadrature rule, but refinement cannot supply new information between observations.[ref]
For an exact comparison, take the polynomial on . Its antiderivative gives . On a partition of an interval into equal panels, the composite midpoint quadrature rule uses midpoint samples, each with quadrature weight ; the composite trapezoidal rule uses endpoint samples, with outer quadrature weights and interior quadrature weights . The existing derivations under these two quadrature rules give
In particular, and already bracket ; two panels give and . The convex function explains the opposite signs. A midpoint rectangle can cross the curve within its panel, so its total signed area, rather than pointwise ordering, determines the underestimate.
Figure 1.
One and two panels for numerical integration of : midpoint and endpoint samples with their quadrature weights
. Details.
Define the signed approximation error as . In this example the absolute errors are and : doubling reduces each by exactly four. A plot with both axes on a logarithmic scale therefore has slope , expressing order two with respect to panel refinement. This is an exact calculation for this polynomial, including , rather than an observed rate extrapolated from a few computed answers.
Figure 2.
Exact absolute errors for midpoint and trapezoidal numerical integration of : slope and a factor-four reduction
. Details.
For a general integrand, the composite midpoint quadrature rule and composite trapezoidal rule give second-order quadrature error bounds when has two continuous derivatives on and a known bound on . These hypotheses describe behavior between samples. A formal error formula containing an unknown derivative is not a numerical accuracy certificate or a justified sample count. Finite samples do not certify quadrature accuracy makes the missing information explicit. Errors in the evaluations and roundoff error must also be considered; noise sensitivity of a quadrature rule treats the former.
More elaborate choices exploit other information: Gaussian quadrature obtains high polynomial exactness from carefully chosen quadrature nodes, and Simpson's rule uses a quadratic interpolant. Adaptive numerical integration compares approximations and concentrates samples where they disagree, often saving evaluations. Such a difference is an error estimate, not a certified bound without further assumptions: both approximations can miss the same feature.[ref]
Model a finite solenoid as a continuum of coaxial turns shaped as circles of radius , uniformly distributed over length with solenoid turn density . Put its centre at , so its ends are . With the same electric current orientation as in the long-solenoid approximation, its axial magnetic field is
This formula applies only on the axis, where symmetry cancels the transverse magnetic field. It does not describe points off the axis. It is exact for the continuum circular-turn model, which neglects winding thickness, discrete wire spacing, and helical advance. [ref].
The derivation is an especially direct use of the superposition principle. The on-axis magnetic field of a circular current loop at source position is . There are turns in an axial slice, so
Substitute and use the antiderivative to obtain the displayed expression. If the centre is instead at , replace every in that expression by .
At the centre and at either end, respectively,
For aspect ratios , the centre ratios are approximately . The end ratio tends to as becomes large, even though the centre ratio tends to . Thus a long coil can have an excellent central magnetic field while the ends still differ strongly from that value. Convergence to the long-solenoid approximation is not uniform across the end region.
Figure 1.
Finite solenoid axial magnetic fields compared with the ideal interior value
. Original profiles for on the axis, normalized by . The dashed step is the approximation that assigns the ideal interior value within the coil and zero outside; an infinite solenoid itself has no ends. The finite profiles stay smooth through the end planes and remain nonzero beyond them. These curves describe no off-axis points. Details.
For a concrete geometry, give the earlier coil radius , so . Its central magnetic field is approximately , its end value is , and at its axial magnetic field is still . The last point is outside the coil: finite length does not permit the zero-exterior conclusion of the infinite model. Off the axis, the magnetic field lines bend around to form the return field. A central axial value alone also does not determine the total magnetic flux through every turn of a short coil.
A closed curve has . A simple curve has no repeated points apart from the permitted equality of its two endpoints when it is closed. A smooth curve, in the regular contour-integration convention, has a continuous nonzero tangent ; piecewise smooth contours are treated by adding the integrals over their smooth pieces. For a continuous integrand, its contour integral is defined by
For the positively oriented circle, and . Direct parameter integration therefore gives
For , an elementary antiderivative is and its endpoint values agree because is an integer. For , the integrand of the parameter integral is the constant . No integral theorem is needed.
An entire antiderivative is , since differentiation cancels the sine terms and leaves . The curve runs from to . Both terms of are even, so , and the complex line integral gives
The complex fundamental theorem of calculus says that for a holomorphic antiderivative and a piecewise path from to , one has . The integral is therefore zero on a closed path; the antiderivative need only be defined on a neighborhood of that path, rather than on all its interior.
The assumptions make holomorphic near . Differentiate:
Integrate this derivative around the closed path to obtain
To construct the regular open dust linear growth mode, use reduction of order, writing and denoting the coefficient of by . Since solves the homogeneous linear differential equation, its terms cancel and leave
The integrating factor for this first-order equation in is , so
Choose and the lower integration endpoint zero. This selects the mode regular at early times without adding a multiple of :
Its Wronskian with is , proving linear independence.
No explicit antiderivative is needed for the limits. For , the integrand is , whence its integral is . For , the integrand tends to one, so its integral divided by tends to one, while . Consequently
Early matter domination permits gravitational instability to amplify the density contrast in proportion to the scale factor. Later, the matter density parameter tends to zero and Hubble friction suppresses further amplification. Indeed, for , neglecting the matter source in the linear matter perturbation growth equation gives , whose modes are a constant and . These agree with the late limits of the two exact modes.
Figure 1.
Linear density growth saturates when spatial curvature dominates
. The regular mode tends to during matter domination and to one during curvature-dominated universe. Here marks equal contributions of matter and spatial curvature of an FLRW universe to the Friedmann equation. The normalization is the one in part (d). Details.
In the integral from part (d), set . Its upper endpoint is , equal to in part (b). The hyperbolic function identity
gives the antiderivative
Multiplication by therefore yields
At small , cancellation between the terms leaves the Taylor series . At large , , so the correction to one is . Both checks agree with part (d); the integral or the small- Taylor series is preferable to subtracting large nearly equal terms in a numerical evaluation near zero.
Integrate the radial equilibrium equation across the thickness, retaining the integral rather than evaluating its antiderivative. The traction conditions give . Hence must satisfy
All endpoints and coefficients here depend only on and the specified material and reference geometry. This is the required implicit pressure–radius relation for inflation and extension of an incompressible tube with unit axial stretch. In particular gives zero integrand and . Once an admissible root is selected, the radial stress follows by integrating from the outer face, , and the remaining stress components follow from the constitutive equation.
Joseph Fourier's Théorie analytique de la chaleur by Joseph Fourier (1822) makes trigonometric series instruments for solving problems of heat conduction. A prescribed temperature distribution need not be given by one power series: it may describe different heating on different parts of a body. The extract occurs in Chapter III, §233, where the earlier assumption of an odd-power expansion is relaxed. The innovation concerns both representation and what can count as a function in an analytical calculation.[ref]
Use a separate integration variable to unpack the printed notation. The proposed Fourier sine series has coefficients
The integral signs in the extract denote definite integrals over , not antiderivatives; the author explicitly supplies these bounds in the surrounding sentence. Their absent printed bounds are a notational convention, not permission to choose arbitrary constants of integration.
The key calculation is the orthogonality relation
The product-to-sum formulas prove this by integrating cosines of integer multiples of . If an expansion can be integrated term by term, multiplication by followed by integration selects exactly one coefficient. This derives the only possible coefficients, but does not by itself prove the expansion converges to the proposed function. That distinction is central to assessing the extract's claim.
For a revealing example take on . Direct integration gives , and therefore
Every term is zero at and , so the series cannot take the value at those endpoints. Its natural interpretation uses the odd extension followed by periodic extension; the endpoints become jump discontinuities. More generally, for a piecewise continuously differentiable function, the Fourier series converges at an interior jump to the average of the two one-sided limits, irrespective of an individually assigned value there. Changing one value also leaves the integrals unchanged. Consequently the unqualified assertion of representation for every arbitrary function cannot be a modern pointwise theorem. Dirichlet's theorem on Fourier series supplies sufficient conditions and the correct distinction between continuity points and jumps; its 1829 source explicitly addresses the proof problem.[ref]
The physical payoff is explicit. For a rod scaled to with zero end temperature, separation of variables in the heat equation produces
Each mode solves and the end boundary conditions; the Fourier sine coefficients encode the initial temperature. This rod is an explanatory example, distinct from the stationary rectangular-solid problem opening Joseph Fourier's Chapter III. The factor damps high modes rapidly for positive time. The representation of arbitrary data makes the physical solution possible; the proof of that representation remains a separate task.
Extend the integrand by zero to all of :
For each fixed , eventually the indicator function is one and . Hence pointwise. On its support, , so for gives
The final bound is Lebesgue integrable on and independent of . The dominated convergence theorem therefore gives
The last integral follows from the antiderivative .
Again the function is continuous on its domain and therefore a measurable function. For , , and
This standard improper integral follows from the antiderivative and at zero. For , , and integration by parts gives . Thus
The logarithmic singularity is integrable and the exponential factor controls the tail, so this too is a Lebesgue integrable function.
An integrating factor for the first-order linear differential equation is . Multiplication gives
Substitute in the antiderivative: . Therefore
Differentiating verifies the equation everywhere on the real line; no division by restricts the solution.
Interpret the cube root as the real cube root. The curved boundary is , so the bounded region is , . In particular is negative inside it. The double integral is the convergent improper integral
For negative real , an antiderivative is . The inner integral is therefore . Hence
The negative sign is essential. Absolute convergence follows by the same calculation with the sign removed, so the singular edge at causes no ambiguity.
Define a candidate antiderivative by integration along the straight segment from zero:
For in the open unit disc and sufficiently small , the triangle with vertices lies within the disc, since the disc is convex. By the Cauchy integral theorem, its boundary contour integral vanishes. Consequently
For , subtract after division by . The absolute value of the remainder is at most , which tends to zero by continuity of the holomorphic function at . Hence the complex derivative exists and for every point of the disc. This proves that is a holomorphic function and supplies the requested primitive directly from the Cauchy integral theorem.
The canonical momentum is , so the Hamiltonian density and total energy are
The Euler-Lagrange field equation is . Multiplication by gives the local conservation of energy identity
Thus is conserved when the energy flux vanishes at spatial infinity. For finite energy with asymptotically constant fields, the endpoints must be scalar-field vacua, where .
Choose an antiderivative . For either sign , completing the square gives
Choosing to make the boundary term nonnegative proves the Bogomolny bound
These Bogomolny equations obtained by square completion for a one-dimensional kink describe minima within a fixed endpoint sector when a saturating configuration exists. Differentiating the spatial equation gives wherever , with smooth extension to its limiting scalar-field vacua. The absolute minimum across all sectors is a constant zero-potential scalar-field vacuum when one exists; the nontrivial minima are sector-specific kinks.
For , write . The scalar-field vacua are . A static finite-energy solution has the first integral
because differentiating its left side gives , and its value is zero at infinity. In either adjacent interval, . Set . The first-order equation becomes , with , and separation gives . Hence
For the endpoints are ; for they are . Thus there are four oriented static kink families, up to translation, namely two increasing kinks and two decreasing antikinks. Each has rest energy
A static field joining directly to would have to pass through at finite . The first integral then gives , and the Picard-Lindelöf theorem applied to the smooth second-order equation with those initial conditions forces . Therefore there is no such additional kink; this is the intermediate-vacuum obstruction to a kink. The Bogomolny classification of a rescaled phi-six kink also shows that if , only the scalar-field vacuum remains and there is no nontrivial finite-energy static kink. Indeed the first integral gives a monotone field wherever it is nonzero, precluding a return to the same scalar-field vacuum.
Figure 1.
Four oriented elementary phi-six kink profiles connecting adjacent vacua, with equal rest energy
. Details.
A Lorentz boost of the profile gives a moving solution with arbitrary :
If denotes the static profile and , then , proving the Euler-Lagrange field equation directly. Its energy is : since , changing variable to in the energy integral gives the factor . Reversing or yields the other moving elementary profiles.
Outside the emitting layer, take , and . The Kramers' opacity law then reads . Division of the radiative diffusion in a star equation by the stellar hydrostatic equation gives
With the outer pressure constant of integration neglected, integration yields
Substitute this into hydrostatic equilibrium:
Define . The general antiderivative is . The Kramers radiative-zero envelope around a stellar core sets , giving
This is exact for the idealized boundary as . With a finite outer radius and temperature , instead ; the displayed profile is the deep-envelope approximation when and . Small outer pressure alone does not eliminate this temperature constant of integration.
The specific hydrogen burning rate becomes
Consequently
Its local radial e-folding length is , so burning is concentrated within a small fraction of the stellar core radius. The volume heating is even steeper: . Using the exterior envelope profile to estimate the thin shell's luminosity gives
A finite but very extended upper limit changes the factor by . The large exponent makes this correction small and further verifies the hydrogen burning thin-shell approximation. Since and , the integral implies . Hence
This is the fixed-radius-core shell-burning luminosity relation. The proportionality coefficient is a thin-shell estimate: luminosity rises from its value beneath the shell to through the emitting layer, so treating it as constant there uses the exterior profile rather than resolving the burning region. The scaling holds while its dimensionless shell structure and stellar composition remain fixed.
For consistency, must provide a hot hydrogen burning shell while the stellar core remains inert to core helium burning; the radiative envelope mass must be much less than , and must be well inside an extended radiative envelope. At the shell base the gas must remain a nondegenerate gas and dominated by gas pressure, in particular with . The assumed stellar core sequence must genuinely have nearly fixed over the mass interval considered. A cold helium stellar core supported by a nonrelativistic degenerate electron gas instead has the mass-radius law from part (a), so substituting that law would describe a different model and change the luminosity exponent.
The compact support just established and permit differentiation of the antiderivative and integration of the scalar conservation law from :
This is a Hamilton-Jacobi equation. There is no arbitrary function of time: the normalization at and the zero exterior flux determine it.
Choose a star centre of the open star-shaped set and define the candidate antiderivative by a straight-segment contour integral:
For each fixed and all sufficiently small , the filled triangle with vertices lies in . Indeed, the compact segment has a neighbourhood of some positive radius contained in the open set , and every point of this triangle lies within of that segment. The zero triangle integral consequently gives
By continuity, the last integral tends to as . Hence
In particular, this proves the existence of the antiderivative without incorrectly assuming the star-shaped set is convex.
On a general domain, the conclusion can fail. Take and . Every filled triangle contained in has zero boundary integral by Cauchy integral theorem, but the unit circle has integral . An antiderivative would make every closed contour integral zero. This is the period obstruction to a holomorphic antiderivative: the local conclusion of Morera's theorem does not remove the global obstruction.
The Wirtinger derivative is holomorphic, since by the Laplace equation. The conformal map takes the quadrant to the complex upper half-plane. Integrating the prescribed tangential boundary derivatives, choose a common corner value and define the real boundary function
The decaying data are bounded under the usual regularity at the corner, so . Thus its Poisson integral converges. A holomorphic function whose real part is that Poisson integral is supplied by the regularized Schwarz integral formula:
For , the chain rule gives . Apply integration by parts to obtain
Substituting and gives the requested particular integral representation:
Both integrals converge absolutely for an interior point of the quadrant. The Sokhotski–Plemelj formula gives on the horizontal edge and on the vertical edge, verifying the prescribed derivatives.
The printed conditions alone do not determine uniquely. The general answer adds a holomorphic function satisfying
Equivalently, write , where is holomorphic in the complex upper half-plane with real boundary values on the nonzero real axis. An antiderivative of has a harmonic real part with zero tangential boundary derivatives. For example, contributes without changing either datum. If the two edge constants differ by , the angular harmonic function contributes . The boxed expression selects the Poisson integral representative with equal edge constants; regularity and suitable growth conditions can be used to select that representative.
A point is ramified with multiplicity exactly when it is a zero of of multiplicity . Since has degree , the fundamental theorem of algebra gives .
Conversely, choose distinct complex numbers and put with . The assumption makes a polynomial of degree . Any antiderivative of has degree and precisely the prescribed ramification multiplicities.