Vanderbei’s applications · Princeton University

Numerical Integration

Compare midpoint rectangles and trapezoids. Change the interval or the number of panels to see how each method approximates the signed area.

Compare approximations

Loading Python…
  • Function
  • Midpoint rectangles
  • Trapezoids
Midpoint rule
—
Trapezoidal rule
—

f(x) = a xk e−x²/b

Integration parameters

Loading the calculation engine…