Skip to main content

Gauss-Legendre 2-point: e^(-x²)

Short answer

Use two-point Gauss-Legendre with x = t + 3 on [2,4]. The approximation gives 0.0028, though the exact integral is about 0.0041, so two points is only rough here.

Evaluate ∫ from 2 to 4 of e^(-x²) dx using 2-point Gauss Legendre method.

Gauss–Legendre 2-point formula: ∫₋₁¹ F(t) dt ≈ F(−1/√3) + F(1/√3), nodes t = ±0.577350, weights 1, 1.

Change of limits

For [2, 4]: x = [(4−2)t + (4+2)]/2 = t + 3, dx = dt. So I = ∫₋₁¹ e^{−(t+3)²} dt.

tweightx = t+3f(x) = e^(−x²)w·f(x)
-0.57741.00002.42260.0028250.002825
0.57741.00003.57740.0000030.000003
I ≈ 1×0.002825 + 1×0.000003
  = 0.002828
  ≈ 0.0028

Answer: ∫₂⁴ e^(−x²) dx ≈ 0.0028 (values are very small because e^(−x²) decays fast; the exact value is 0.004146, so 2-point Gauss is only roughly accurate here).

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 5 questions →