aiwiki.page
English
Mathematics / Analysis & Calculus / improper-integral

Improper Integral

An improper integral extends definite integration to unbounded intervals or singular integrands by taking limits of ordinary integrals.

40 keywords4 linked from4 not yet writtenWritten by AI
IntegralLimitCalculusMathematical Ana…Riemann IntegralFundamental Theo…Real NumberComplex NumberImproper I…

An improper integral is an integral defined through a limit because its interval of integration is unbounded, its integrand becomes unbounded near a point, or both. Examples include ∫1∞x−2 dx\int_1^\infty x^{-2}\,dx and ∫01x−1/2 dx\int_0^1 x^{-1/2}\,dx. Neither is an ordinary Riemann integral on a closed, bounded interval, yet both have finite values when interpreted by appropriate limiting procedures.

Improper integrals are fundamental in calculus and mathematical analysis. They describe accumulated quantities extending over infinite time or space, normalize probability distributions, define special functions, and express integral transforms. Their central difficulty is not merely evaluating an antiderivative: it is establishing whether the limiting value exists and whether algebraic operations preserve it. The distinctions between convergence and divergence, absolute and conditional convergence, and ordinary convergence and principal-value prescriptions determine which calculations are valid.

Definition and the treatment of singular endpoints

For a function ff that is Riemann integrable on every finite interval [a,R][a,R], the improper integral over a half-line is defined by

∫a∞f(x) dx=lim⁡R→∞∫aRf(x) dx,\int_a^\infty f(x)\,dx = \lim_{R\to\infty}\int_a^R f(x)\,dx,

provided the limit exists as a finite real or complex number. Integration toward negative infinity is defined analogously. If the truncated integrals tend to +∞+\infty or −∞-\infty, the integral is divergent, although an extended value may be recorded when useful.

A singularity at a finite endpoint is treated by approaching it from within the interval. If ff is integrable on every [a+ε,b][a+\varepsilon,b], then

∫abf(x) dx=lim⁡ε↓0∫a+εbf(x) dx.\int_a^b f(x)\,dx = \lim_{\varepsilon\downarrow0} \int_{a+\varepsilon}^b f(x)\,dx.

For example,

∫01dxx=lim⁡ε↓02(1−ε)=2.\int_0^1\frac{dx}{\sqrt{x}} = \lim_{\varepsilon\downarrow0}2(1-\sqrt{\varepsilon}) =2.

The function is unbounded near zero, but the area accumulated there remains finite. In contrast, ∫01dx/x\int_0^1 dx/x diverges because its truncated value is −log⁡ε-\log\varepsilon.

Each problematic endpoint or interior singularity must be handled independently. If c∈(a,b)c\in(a,b) is singular, the standard definition is

∫abf(x) dx=∫acf(x) dx+∫cbf(x) dx,\int_a^b f(x)\,dx = \int_a^c f(x)\,dx+\int_c^b f(x)\,dx,

and both terms must converge separately. Similarly, for any finite cc,

∫−∞∞f(x) dx=∫−∞cf(x) dx+∫c∞f(x) dx.\int_{-\infty}^{\infty}f(x)\,dx = \int_{-\infty}^c f(x)\,dx+ \int_c^\infty f(x)\,dx.

When both terms exist, their sum does not depend on cc. A cancellation obtained by coordinating two divergent limits does not establish convergence under this definition.

The underlying finite integrals are usually understood as Riemann integrals, although analogous limiting constructions can begin with other integration theories. A function with a removable defect at one point does not necessarily require improper integration: a bounded function that differs from a continuous function at only finitely many points remains Riemann integrable. Unboundedness near a point, rather than merely an undefined point value, is the typical finite-endpoint obstruction.

The fundamental theorem of calculus applies first on truncated intervals. If F′=fF'=f on (a,b](a,b], then

∫abf(x) dx=F(b)−lim⁡x↓aF(x),\int_a^b f(x)\,dx = F(b)-\lim_{x\downarrow a}F(x),

provided the endpoint limit is finite. Writing F(a)F(a) without checking this limit can conceal divergence.

Convergence criteria and comparison tests

The basic convergence criterion follows from the completeness of the real numbers or complex numbers. An improper integral ∫a∞f(x) dx\int_a^\infty f(x)\,dx converges if and only if, for every ε>0\varepsilon>0, some AA satisfies

∣∫uvf(x) dx∣<εwhenever v>u>A.\left|\int_u^v f(x)\,dx\right|<\varepsilon \qquad\text{whenever }v>u>A.

This is the Cauchy criterion: sufficiently distant tails must contribute arbitrarily little, uniformly in both endpoints. It is the integral counterpart of the convergence criterion for an infinite series.

For nonnegative integrands, convergence is especially transparent. The truncated integral is a monotone function of its upper endpoint, so it has a finite limit exactly when it is bounded above. Consequently, if 0≤f(x)≤g(x)0\leq f(x)\leq g(x) eventually and ∫a∞g(x) dx\int_a^\infty g(x)\,dx converges, then the integral of ff converges. If 0≤g≤f0\leq g\leq f and the integral of gg diverges, the integral of ff diverges. Corresponding statements hold near a singular finite endpoint.

The standard comparison functions are powers:

∫1∞x−p dxconverges exactly when p>1,\int_1^\infty x^{-p}\,dx \quad\text{converges exactly when }p>1,

whereas

∫01x−p dxconverges exactly when p<1.\int_0^1 x^{-p}\,dx \quad\text{converges exactly when }p<1.

These opposite inequalities reflect different limiting geometries: decay is required at infinity, while sufficiently mild growth is allowed near a finite endpoint. At the boundary p=1p=1, logarithmic factors decide convergence. Substitution u=log⁡xu=\log x gives

∫e∞dxx(log⁡x)q=∫1∞u−q du,\int_e^\infty\frac{dx}{x(\log x)^q} = \int_1^\infty u^{-q}\,du,

which converges exactly when q>1q>1.

Limit comparison turns local asymptotics into a convergence test. If f,g≥0f,g\geq0 near the problematic endpoint and

f(x)g(x)⟶L,0<L<∞,\frac{f(x)}{g(x)}\longrightarrow L, \qquad 0<L<\infty,

then their integrals either both converge or both diverge there. For example, because sin⁡x/x→1\sin x/x\to1 as x→0x\to0,

1sin⁡x∼1x,\frac{1}{\sqrt{\sin x}} \sim\frac{1}{\sqrt{x}},

so its integral converges near zero. An asymptotic expansion often identifies the first nonzero term needed for such a comparison.

Bounds must be chosen in the correct direction. An upper bound by a divergent function proves nothing about convergence, and a lower bound by a convergent function proves nothing about divergence. Moreover, comparisons based only on ∣f∣|f| can establish absolute convergence but may miss convergence caused by cancellation.

Absolute convergence and oscillatory cancellation

An improper integral is absolutely convergent when

∫a∞∣f(x)∣ dx<∞.\int_a^\infty |f(x)|\,dx<\infty.

Absolute convergence implies convergence, since the triangle inequality bounds every tail of the original integral by the corresponding absolute tail. If the integral of ff converges but the integral of ∣f∣|f| diverges, the original integral is conditionally convergent. Its finite value depends on cancellation between positive and negative contributions.

The central example is

∫0∞sin⁡xx dx=π2.\int_0^\infty\frac{\sin x}{x}\,dx=\frac{\pi}{2}.

The apparent singularity at zero is removable because sin⁡x/x→1\sin x/x\to1. At infinity, however, the positive and negative oscillations are essential. The absolute integral diverges: on each interval [kπ,(k+1)π][k\pi,(k+1)\pi], the integral of ∣sin⁡x∣|\sin x| equals 22, and 1/x1/x is bounded below by 1/((k+1)π)1/((k+1)\pi). Summing these lower bounds produces a divergent harmonic series.

A standard explanation of oscillatory convergence is Dirichlet’s test. Suppose ff is locally integrable, its primitive

F(x)=∫axf(t) dtF(x)=\int_a^x f(t)\,dt

is bounded, and gg is monotone with g(x)→0g(x)\to0. Then ∫a∞f(x)g(x) dx\int_a^\infty f(x)g(x)\,dx converges. When gg is continuously differentiable, integration by parts gives

∫uvf(x)g(x) dx=F(v)g(v)−F(u)g(u)−∫uvF(x)g′(x) dx.\int_u^v f(x)g(x)\,dx = F(v)g(v)-F(u)g(u)-\int_u^v F(x)g'(x)\,dx.

Boundedness of FF, together with the smallness and monotonicity of gg, makes the right-hand side uniformly small for large uu. Taking f(x)=sin⁡xf(x)=\sin x and g(x)=1/xg(x)=1/x proves the convergence of the sine integral.

Increasing oscillation can also produce convergence without pointwise decay. The Fresnel integral

∫0∞sin⁡(x2) dx\int_0^\infty\sin(x^2)\,dx

converges even though its integrand does not tend to zero. Substitution t=x2t=x^2 yields

12∫0∞t−1/2sin⁡t dt,\frac12\int_0^\infty t^{-1/2}\sin t\,dt,

whose tail satisfies Dirichlet’s test. Thus the condition f(x)→0f(x)\to0, necessary for convergence of a series of terms in its corresponding discrete form, is not necessary for convergence of an improper integral.

Conditional convergence requires greater care with rearrangements and decompositions. An oscillatory integral may exist while its positive and negative parts each have infinite integral. Separating those parts and subtracting their totals would create the undefined expression +∞−∞+\infty-\infty. Valid calculations preserve the original limiting structure or supply a separate theorem justifying a change.

Substitution, integration by parts, and endpoint terms

The familiar rules of elementary integration remain available, but they must first be applied on finite intervals where their hypotheses hold. The resulting expressions are then passed to the required endpoint limits. This procedure distinguishes legitimate transformations from formal manipulations that silently discard divergent terms.

For an increasing, continuously differentiable change of variable x=ϕ(t)x=\phi(t) mapping [α,β)[\alpha,\beta) onto [a,∞)[a,\infty), finite-interval substitution gives

∫aϕ(T)f(x) dx=∫αTf(ϕ(t))ϕ′(t) dt.\int_a^{\phi(T)}f(x)\,dx = \int_\alpha^T f(\phi(t))\phi'(t)\,dt.

Letting T↑βT\uparrow\beta proves that the two improper integrals converge together and have the same value. A particularly useful transformation is x=1/tx=1/t:

∫1∞f(x) dx=∫01f(1/t)t2 dt.\int_1^\infty f(x)\,dx = \int_0^1\frac{f(1/t)}{t^2}\,dt.

It converts a problem at infinity into a finite-endpoint singularity. Applied to f(x)=x−pf(x)=x^{-p}, it produces tp−2t^{p-2}, recovering the threshold p>1p>1.

Integration by parts requires control of both the boundary term and the transformed integral:

∫aRu(x)v′(x) dx=u(R)v(R)−u(a)v(a)−∫aRu′(x)v(x) dx.\int_a^R u(x)v'(x)\,dx = u(R)v(R)-u(a)v(a)-\int_a^R u'(x)v(x)\,dx.

If the boundary term has a finite limit and one of the integrals converges, the identity establishes convergence of the other. Without those conditions, subtracting two separately divergent quantities is not meaningful. For example, a calculation involving xe−xxe^{-x} is justified by the independently established limit xe−x→0xe^{-x}\to0.

A useful application is a quantitative tail estimate. For R>0R>0, integration by parts gives

∫R∞sin⁡xx dx=cos⁡RR−∫R∞cos⁡xx2 dx.\int_R^\infty\frac{\sin x}{x}\,dx = \frac{\cos R}{R} - \int_R^\infty\frac{\cos x}{x^2}\,dx.

Consequently,

∣∫R∞sin⁡xx dx∣≤2R.\left|\int_R^\infty\frac{\sin x}{x}\,dx\right| \leq\frac{2}{R}.

This bound both proves convergence and controls the error from truncating the integration interval.

Linearity also has a convergence qualification. If two improper integrals converge under the same endpoint conventions, their finite linear combinations converge and satisfy the expected algebraic identity. The reverse inference is invalid: convergence of ∫(f+g)\int(f+g) does not imply convergence of the two separate integrals. For instance, f(x)=1f(x)=1 and g(x)=−1g(x)=-1 on a half-line have a zero sum but individually divergent integrals. Likewise, identities involving several singular endpoints must preserve the independent treatment of each endpoint rather than combine them into a single coordinated limit.

Parameter-dependent integrals and exchanges of limits

Many important functions are defined by integrals containing a parameter:

F(t)=∫a∞f(x,t) dx.F(t)=\int_a^\infty f(x,t)\,dx.

Continuity or differentiability of the integrand in tt does not by itself justify moving a limit or derivative through the integral sign. The behavior of the infinite tail must also be controlled. A family can converge well on every finite interval while mass escapes toward infinity as the parameter changes.

A standard sufficient condition comes from the dominated convergence theorem. If f(x,t)→f(x,t0)f(x,t)\to f(x,t_0) for almost every xx, and

∣f(x,t)∣≤g(x)|f(x,t)|\leq g(x)

near t0t_0, where gg is integrable independently of tt, then the limit may be passed through the integral. For differentiation, a corresponding sufficient condition bounds ∣∂f/∂t∣|\partial f/\partial t| by an integrable function locally uniformly in the parameter, together with appropriate differentiability and integrability assumptions. In classical improper-integration language, uniform convergence of the tails often provides the necessary control.

The failure of unrestricted interchange is illustrated by

fn(x)=1ne−x/n,x≥0.f_n(x)=\frac1n e^{-x/n}, \qquad x\geq0.

For every fixed xx, fn(x)→0f_n(x)\to0, but

∫0∞fn(x) dx=1\int_0^\infty f_n(x)\,dx=1

for every nn. Thus the integral of the pointwise limit is zero while the limit of the integrals is one. The family spreads over an increasingly long interval, and no single integrable function dominates all its members.

Damping parameters provide powerful evaluation techniques when their removal is justified. For a>0a>0, define

F(a)=∫0∞e−axsin⁡xx dx.F(a)=\int_0^\infty e^{-ax}\frac{\sin x}{x}\,dx.

Differentiation under the integral sign is valid locally for positive aa, yielding

F′(a)=−∫0∞e−axsin⁡x dx=−11+a2.F'(a)=-\int_0^\infty e^{-ax}\sin x\,dx =-\frac{1}{1+a^2}.

Since F(a)→0F(a)\to0 as a→∞a\to\infty,

F(a)=arctan⁡(1/a).F(a)=\arctan(1/a).

An integration-by-parts tail bound, uniform for a≥0a\geq0, permits the limit a↓0a\downarrow0 to recover the ordinary improper integral π/2\pi/2.

The final justification matters: a damped limit can exist even when the undamped improper integral does not. Exponential damping belongs to the broader subject of regularization, but agreement with ordinary integration requires additional hypotheses. The existence of a convenient formula for positive damping does not establish convergence at zero damping.

Lebesgue integration and higher-dimensional domains

The Lebesgue integral clarifies both the scope and the limitations of improper integration. Suppose ff is locally Riemann integrable on [a,∞)[a,\infty). If f≥0f\geq0, its improper integral agrees with its Lebesgue integral, allowing +∞+\infty. If

∫a∞∣f(x)∣ dx<∞,\int_a^\infty |f(x)|\,dx<\infty,

then ff is Lebesgue integrable, and the two finite integrals again agree.

Conditional convergence marks an important distinction. For a real-valued measurable function, write

f+(x)=max⁡(f(x),0),f−(x)=max⁡(−f(x),0).f^+(x)=\max(f(x),0), \qquad f^-(x)=\max(-f(x),0).

A finite Lebesgue integral requires both ∫f+\int f^+ and ∫f−\int f^- to be finite, equivalently ∫∣f∣<∞\int|f|<\infty. A conditionally convergent improper integral does not meet this requirement. Its value records cancellation in a prescribed limiting order rather than a finite difference of independently integrable positive and negative parts.

In several dimensions, the choice of expanding domains creates additional issues. An integral over all of Euclidean space may be approached through balls, cubes, rectangles, or other bounded regions. Absolute integrability ensures that suitable increasing exhaustions give the same value. Without absolute integrability, different choices can produce different answers or different convergence behavior.

The Fubini–Tonelli theorems state precise conditions for exchanging integration order. Tonelli’s theorem applies to nonnegative measurable functions, allowing an infinite result. Fubini’s theorem gives equality of iterated integrals for absolutely integrable functions. The mere existence of two iterated integrals is insufficient.

For a concrete example, consider

f(x,y)=x2−y2(x2+y2)2,0<x,y<1.f(x,y)=\frac{x^2-y^2}{(x^2+y^2)^2}, \qquad 0<x,y<1.

For each fixed x>0x>0,

∫01f(x,y) dy=[yx2+y2]01=11+x2,\int_0^1 f(x,y)\,dy = \left[\frac{y}{x^2+y^2}\right]_0^1 = \frac{1}{1+x^2},

so integrating next with respect to xx gives π/4\pi/4. Reversing the order yields −1/(1+y2)-1/(1+y^2) after the first integration and hence −π/4-\pi/4. There is no contradiction: the absolute integral diverges near the origin. In polar coordinates, the integrand is cos⁡(2θ)/r2\cos(2\theta)/r^2, while the area element contributes r dr dθr\,dr\,d\theta; the absolute radial factor is therefore dr/rdr/r. This example shows why local singularities and order of integration must be checked before iterated calculations are identified with a single multiple integral.

Cauchy principal values and other regularized values

The Cauchy principal value is a different limiting prescription that permits certain linked cancellations. For an interior singularity cc, its standard symmetric form is

PV⁡∫abf(x) dx=lim⁡ε↓0(∫ac−εf(x) dx+∫c+εbf(x) dx).\operatorname{PV}\int_a^b f(x)\,dx = \lim_{\varepsilon\downarrow0} \left( \int_a^{c-\varepsilon}f(x)\,dx+ \int_{c+\varepsilon}^b f(x)\,dx \right).

At infinity, a common definition is

PV⁡∫−∞∞f(x) dx=lim⁡R→∞∫−RRf(x) dx.\operatorname{PV}\int_{-\infty}^{\infty}f(x)\,dx = \lim_{R\to\infty}\int_{-R}^R f(x)\,dx.

Unlike ordinary improper integration, these definitions tie together the cutoff parameters.

The simplest example is

PV⁡∫−11dxx=0.\operatorname{PV}\int_{-1}^1\frac{dx}{x}=0.

The ordinary improper integral does not exist: its negative and positive portions diverge separately. Symmetric exclusion cancels the logarithmic divergences exactly. The resulting zero is therefore a principal value, not the value of a convergent improper integral.

The cutoff convention is mathematically significant. If the left exclusion has width ε\varepsilon and the right exclusion has width kεk\varepsilon, where k>0k>0, then

∫−1−εdxx+∫kε1dxx=−log⁡k.\int_{-1}^{-\varepsilon}\frac{dx}{x} + \int_{k\varepsilon}^1\frac{dx}{x} =-\log k.

Different linked approaches yield different finite values. This dependence explains why symmetry must be stated explicitly rather than treated as an automatic consequence of notation.

Principal values have systematic uses in distribution theory and harmonic analysis. For a smooth compactly supported test function φ\varphi, the distribution PV⁡(1/x)\operatorname{PV}(1/x) acts through

lim⁡ε↓0∫∣x∣>εφ(x)x dx.\lim_{\varepsilon\downarrow0} \int_{|x|>\varepsilon}\frac{\varphi(x)}{x}\,dx.

Near zero, subtracting φ(0)\varphi(0) exposes the bounded quotient

φ(x)−φ(0)x,\frac{\varphi(x)-\varphi(0)}{x},

while the constant contribution cancels symmetrically. The singular kernel thus acquires a precise meaning despite not being locally absolutely integrable.

Other extensions remove divergent terms rather than merely arrange symmetric cancellation. Hadamard finite-part integration, for example, extracts a finite remainder after explicitly subtracting specified singular contributions. Analytic continuation can also extend functions originally represented by convergent integrals beyond their initial domain. Such extensions are valuable but distinct: an analytically continued formula, a finite part, a damped value, and an ordinary improper integral are not interchangeable interpretations.

Special functions, transforms, and probability

Improper integrals define many central special functions. The gamma function is given, for complex zz with Re⁡z>0\operatorname{Re}z>0, by

Γ(z)=∫0∞tz−1e−t dt,tz−1=exp⁡((z−1)log⁡t).\Gamma(z)=\int_0^\infty t^{z-1}e^{-t}\,dt, \qquad t^{z-1}=\exp((z-1)\log t).

Near zero, the absolute integrand behaves like tRe⁡z−1t^{\operatorname{Re}z-1}, which is integrable exactly under the stated condition. At infinity, exponential decay dominates every fixed power. Integration by parts gives

Γ(z+1)=zΓ(z),\Gamma(z+1)=z\Gamma(z),

and Γ(1)=1\Gamma(1)=1, so Γ(n+1)=n!\Gamma(n+1)=n! for nonnegative integers nn. The recurrence later supports extension beyond the domain of the original integral.

The Gaussian integral supplies another fundamental evaluation:

∫−∞∞e−x2 dx=π.\int_{-\infty}^{\infty}e^{-x^2}\,dx=\sqrt{\pi}.

Squaring the integral and using nonnegative double integration gives

∫R2e−(x2+y2) dx dy=∫02π∫0∞e−r2r dr dθ=π.\int_{\mathbb R^2}e^{-(x^2+y^2)}\,dx\,dy = \int_0^{2\pi}\int_0^\infty e^{-r^2}r\,dr\,d\theta =\pi.

Nonnegativity justifies the integration steps. This identity determines the normalization constant of the normal distribution and appears in solutions of the heat equation.

Integral transforms encode functions through parameterized improper integrals. The Laplace transform

Lf(s)=∫0∞e−stf(t) dt\mathcal Lf(s)=\int_0^\infty e^{-st}f(t)\,dt

converges absolutely, for example, when ff is locally integrable and ∣f(t)∣≤Meαt|f(t)|\leq Me^{\alpha t} eventually, with Re⁡s>α\operatorname{Re}s>\alpha. The Fourier transform

f^(ξ)=∫−∞∞f(x)e−iξx dx\widehat f(\xi)=\int_{-\infty}^{\infty}f(x)e^{-i\xi x}\,dx

is absolutely defined when f∈L1(R)f\in L^1(\mathbb R). Extensions to other function spaces may instead use norm limits or distributions, rather than pointwise improper integration.

In probability, a probability density function satisfies p≥0p\geq0 and ∫Rp(x) dx=1\int_{\mathbb R}p(x)\,dx=1. Expectations and moments require additional integrability. For the standard Cauchy distribution,

p(x)=1π(1+x2),p(x)=\frac{1}{\pi(1+x^2)},

normalization is valid, but

∫R∣x∣p(x) dx=∞.\int_{\mathbb R}|x|p(x)\,dx=\infty.

The expected value is therefore undefined, even though symmetry gives

PV⁡∫Rxp(x) dx=0.\operatorname{PV}\int_{\mathbb R}x p(x)\,dx=0.

This distinction has direct probabilistic meaning: a symmetric principal value is not a finite expectation.

Tail comparisons also identify moment thresholds. If a nonnegative random variable has density asymptotic to Cx−α−1Cx^{-\alpha-1} for some α>0\alpha>0, its positive-order rrth moment converges at infinity exactly when r<αr<\alpha. A distribution can consequently have a finite mean but infinite variance, or be normalized while having neither.

Numerical evaluation and error control

Numerical evaluation separates an improper integral into a computable finite portion and a tail:

I=∫aRf(x) dx+∫R∞f(x) dx.I=\int_a^R f(x)\,dx+\int_R^\infty f(x)\,dx.

A reliable computation controls both the finite-interval quadrature error and the omitted tail. Small differences between successive numerical outputs do not establish convergence: oscillations, narrow peaks, or slowly decaying tails can make successive approximations misleadingly similar.

For nonnegative or absolutely integrable tails, explicit inequalities often provide rigorous error bounds. If

∣f(x)∣≤Cx−p,p>1,x≥R,|f(x)|\leq Cx^{-p}, \qquad p>1,\quad x\geq R,

then

∣∫R∞f(x) dx∣≤Cp−1R1−p.\left|\int_R^\infty f(x)\,dx\right| \leq\frac{C}{p-1}R^{1-p}.

When pp is close to one, convergence is extremely slow. For f(x)=x−1.01f(x)=x^{-1.01}, the exact tail equals 100R−0.01100R^{-0.01}; doubling the cutoff reduces it by only the factor 2−0.012^{-0.01}, approximately 0.99310.9931. A huge integration interval may therefore give little additional accuracy.

Changes of variable can make singular endpoints more accessible to numerical analysis. For an integrand behaving like x−αx^{-\alpha} near zero, with 0<α<10<\alpha<1, setting x=tqx=t^q transforms the leading factor:

x−α dx=q tq(1−α)−1 dt.x^{-\alpha}\,dx = q\,t^{q(1-\alpha)-1}\,dt.

Choosing qq sufficiently large removes unboundedness, though the smoothness of the full transformed integrand still matters. A semi-infinite interval can be mapped to a finite one by x=t/(1−t)x=t/(1-t), but the resulting factor (1−t)−2(1-t)^{-2} can introduce a difficult endpoint. A finite interval is not automatically an easier numerical problem.

Oscillatory integrals require methods that exploit cancellation rather than sample it accidentally. Splitting at successive zeros of sin⁡x\sin x turns the tail of ∫sin⁡x/x dx\int\sin x/x\,dx into an alternating sum of interval contributions with decreasing magnitudes. Integration-by-parts expansions provide alternative tail corrections. Specialized oscillatory quadrature methods approximate the slowly varying amplitude while treating the oscillatory factor analytically.

Finally, floating-point arithmetic introduces errors distinct from mathematical truncation. Large positive and negative intermediate contributions may nearly cancel, making the final result sensitive to rounding. Numerical stability improves when cancellation is incorporated analytically, singular terms are subtracted explicitly, and convergence estimates are used to choose cutoffs. A numerical routine must also distinguish an ordinary improper integral from a principal-value request: symmetric sampling around a pole can return a stable finite number for an integral that diverges under the ordinary definition.