Navigation

Concept Review

Integral Calculus

Numerical Integration

πŸ”Ή Riemann Sum

Approximate area under f(x)f(x) using rectangles.

General form:

∫abf(x) dxβ‰ˆf(x1βˆ—)Ξ”x+f(x2βˆ—)Ξ”x+β‹―+f(xnβˆ—)Ξ”x\int_a^b f(x)\,dx \approx f(x_1^*)\Delta x + f(x_2^*)\Delta x + \cdots + f(x_n^*)\Delta x
  • Ξ”x=bβˆ’an\Delta x = \frac{b-a}{n}
  • xiβˆ—x_i^* can be:
    • Left: x1=ax_1 = a, x2=a+Ξ”xx_2 = a+\Delta x, ..., xn=a+(nβˆ’1)Ξ”xx_n = a+(n-1)\Delta x
    • Right: x1=a+Ξ”xx_1 = a+\Delta x, x2=a+2Ξ”xx_2 = a+2\Delta x, ..., xn=bx_n = b
    • Midpoint: x1=a+12Ξ”xx_1 = a+\tfrac{1}{2}\Delta x, x2=a+32Ξ”xx_2 = a+\tfrac{3}{2}\Delta x, ..., xn=bβˆ’12Ξ”xx_n = b-\tfrac{1}{2}\Delta x

πŸ”Ή Trapezoidal Rule

Approximate area using trapezoids.

Formula:

∫abf(x) dxβ‰ˆΞ”x2[f(x0)+2f(x1)+2f(x2)+β‹―+2f(xnβˆ’1)+f(xn)]\int_a^b f(x)\,dx \approx \frac{\Delta x}{2} \big[ f(x_0) + 2f(x_1) + 2f(x_2) + \cdots + 2f(x_{n-1}) + f(x_n) \big]
  • Points: x0=ax_0 = a, x1=a+Ξ”xx_1 = a+\Delta x, ..., xn=bx_n = b
  • More accurate than basic Riemann sums
  • Uses linear approximation

πŸ”Ή Simpson’s Rule

Uses parabolas (quadratics) for better accuracy.

Formula (n must be even):

∫abf(x) dxβ‰ˆΞ”x3[f(x0)+4f(x1)+2f(x2)+4f(x3)+β‹―+2f(xnβˆ’2)+4f(xnβˆ’1)+f(xn)]\int_a^b f(x)\,dx \approx \frac{\Delta x}{3} \big[ f(x_0) + 4f(x_1) + 2f(x_2) + 4f(x_3) + \cdots + 2f(x_{n-2}) + 4f(x_{n-1}) + f(x_n) \big]
  • Points: x0=ax_0 = a, x1=a+Ξ”xx_1 = a+\Delta x, ..., xn=bx_n = b
  • Pattern: 1,4,2,4,2,…,4,11,4,2,4,2,\dots,4,1
  • Very accurate for smooth functions

πŸ”Ή Quick Comparison

MethodShape UsedAccuracyKey Idea
RiemannRectanglesLow–MediumSample points
TrapezoidalTrapezoidsMediumLinear interpolation
SimpsonParabolasHighQuadratic interpolation

πŸ”Ή Pro Tip

  • If function is linear β†’ trapezoidal is exact
  • If function is quadratic β†’ Simpson is exact
  • Increasing nn β†’ improves all methods