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_i | Weight w_i | f(x_i) | w_i·f(x_i) |
|---|---|---|---|---|
| 1 | 0.17027963 | 0.36918859 | 0.02899515 | 0.01070468 |
| 2 | 0.90370178 | 0.41878678 | 0.8166769 | 0.34201349 |
| 3 | 2.25108663 | 0.17579499 | 5.06739102 | 0.89082194 |
| 4 | 4.26670017 | 0.03334349 | 18.20473034 | 0.60700929 |
| 5 | 7.0459054 | 0.00279454 | 49.64478294 | 0.13873414 |
| 6 | 10.75851601 | 9.076509e-5 | 115.74566674 | 0.01050567 |
| 7 | 15.74067864 | 8.485747e-7 | 247.76896409 | 0.00021025 |
| 8 | 22.86313174 | 1.048001e-9 | 522.72279282 | 5.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
- Home
Gauss-Laguerre Quadrature Calculator