keisoku

DE Formula Half-Infinite Integral (Lower, −∞ to b)

Numerically evaluate a definite integral over the half-infinite interval (−∞, b) using the double-exponential (DE) formula. Just enter f(x), the upper limit b, and the number of nodes.

Input

Numerically evaluate a definite integral over (−∞, b) with the double-exponential (DE) formula. Enter the integrand f(x), the upper limit b, and the number of nodes.

e.g. exp(x), x*exp(x), 1/(1+x^2). Supports sin, cos, exp, log, sqrt, pi, e and implicit multiplication (2x).

Upper bound of the integral (a finite real number). The lower bound is always −∞.

pts

An integer from 5 to 2001. More nodes give higher accuracy (an even count is adjusted to odd).

Result

Integral value ∫(−∞→b) f(x) dx

1

Upper limit b

0

Nodes

201

Calculation details

Interval(-∞, 0)
Nodes201
Step size h0.04
Evaluated nodes201
Skipped nodes0

How it works

  • This calculator evaluates integrals with a lower bound of negative infinity and a finite upper bound b: ∫(−∞→b) f(x) dx.
  • The double-exponential (DE) formula applies the change of variables x = b − exp((π/2)·sinh t). As t runs from −∞ to ∞, x sweeps from b down to −∞, covering the whole interval.
  • After the substitution the integrand decays double-exponentially at both ends, so a simple equally spaced trapezoidal sum over t already yields high accuracy.
  • Each weight equals the magnitude of dx/dt, namely |(π/2)·cosh t·exp((π/2)·sinh t)|, multiplied by f(x(t)) at every node.
  • Increasing the number of nodes refines the step size h and improves accuracy; nodes where the mapped value overflows are skipped automatically.
  • f(x) accepts the four arithmetic operations, power (^), parentheses, implicit multiplication (e.g. 2x), the functions sin, cos, tan, asin, acos, atan, sinh, cosh, tanh, exp, log (=ln), log10, sqrt, cbrt, abs, and the constants pi and e.
  • Expressions are parsed by a custom recursive-descent parser rather than eval, so the input is evaluated safely.
  • If the integrand does not decay fast enough to zero as x→−∞, the result may diverge or be inaccurate. Use convergent integrands.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. DE Formula Half-Infinite Integral (Lower, −∞ to b)