Evaluating numerical algorithm
The Trapezoidal Rule approximates a definite integral by connecting neighboring function evaluations with straight lines, forming a series of trapezoids whose areas sum to the total definite integral!
Evaluate the classic definite integral:
Using subintervals!
With integration limits and subintervals:
| i | x_i | f(x_i) = 1 / (1 + x_i²) | Category |
|---|---|---|---|
| 0 | 0.00000 | 1.00000 (y_0) | Boundary End |
| 1 | 0.16667 | 0.97297 (y_1) | Interior (×2) |
| 2 | 0.33333 | 0.90000 (y_2) | Interior (×2) |
| 3 | 0.50000 | 0.80000 (y_3) | Interior (×2) |
| 4 | 0.66667 | 0.69231 (y_4) | Interior (×2) |
| 5 | 0.83333 | 0.59016 (y_5) | Interior (×2) |
| 6 | 1.00000 | 0.50000 (y_6) | Boundary End |
Trapezoidal Integration Formula:
Substituting values:
With trapezoidal strips, the numerical integral 0.78424 matches the analytical value to 3 decimal places!