keisoku

Gauss-Laguerre Quadrature Calculator

Enter an integrand f(x) and an order n to numerically evaluate the semi-infinite integral ∫₀^∞ f(x)e^(−x)dx by Gauss-Laguerre quadrature.

Input

Enter an integrand f(x) and an order n to compute the semi-infinite integral ∫₀^∞ f(x)e^(−x)dx by Gauss-Laguerre quadrature. The weight e^(−x) is built in, so don''t include it in f(x).

e.g. x^2, sin(x), 1/(1+x). Do not include e^(−x). See the notes for available functions, constants, and operators.

Number of nodes (1–128)

Result

Integral ∫₀^∞ f(x)e^(−x)dx

2

Interval [0, ∞) with weight e^(−x)

Order n

8

Nodes

8

Nodes, weights, and function values

Shows the Laguerre roots x_i, weights w_i, function values f(x_i), and contributions w_i·f(x_i).

#Node x_iWeight w_if(x_i)w_i·f(x_i)
10.170279630.369188590.028995150.01070468
20.903701780.418786780.81667690.34201349
32.251086630.175794995.067391020.89082194
44.266700170.0333434918.204730340.60700929
57.04590540.0027945449.644782940.13873414
610.758516019.076509e-5115.745666740.01050567
715.740678648.485747e-7247.768964090.00021025
822.863131741.048001e-9522.722792825.478141e-7

How it works

  • Gauss-Laguerre quadrature approximates integrals over the half-line with weight e^(−x), ∫₀^∞ f(x)e^(−x)dx ≈ ∑ᵢ wᵢ f(xᵢ). The weight e^(−x) is built into the rule, so do NOT include e^(−x) in your f(x) (e.g. to evaluate ∫₀^∞ x²e^(−x)dx, enter x^2 for f(x)).
  • The nodes xᵢ are the roots of the degree-n Laguerre polynomial Lₙ(x). This tool evaluates the polynomial with the recurrence (k+1)L_{k+1}(x) = (2k+1−x)Lₖ(x) − kL_{k−1}(x) and locates the roots by Newton's method.
  • Weights are computed from wᵢ = xᵢ / ((n+1)² L_{n+1}(xᵢ)²). The weights sum to ∫₀^∞ e^(−x)dx = 1.
  • An order-n rule is exact in theory when f(x) is a polynomial of degree at most 2n−1 (e.g. f(x)=x^k matches ∫₀^∞ x^k e^(−x)dx = k!).
  • For safety the integrand is evaluated by a custom expression parser instead of eval. The only variable is x; functions such as sin, cos, tan, exp, log, ln, sqrt, abs, the constants pi and e, the four basic operations, and exponentiation ^ are supported.
  • If f(x) grows faster than e^(−x) decays, the integral diverges and the quadrature will not converge. Results are approximate, with accuracy depending on the integrand and the chosen order n.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Gauss-Laguerre Quadrature Calculator