Skip to content
Sahithyan's S2
Sahithyan's S2 — Methods of Mathematics

Numerical Integration

Based on the strategy of replacing a complicated function or tabulated data with an approximating function that is easy to integrate.

Numerical quadrature

The basic method involved in approximating:

abf(x)dx\int_a^b f(x)\,\text{d}x

Degree of Accuracy

Aka. precision. The largest positive integer nn such that the quadrature formula is exact for xkx^k for all kZ[0,n]k \in \mathbb{Z}\cap [0,n].

Trapezoidal Rule

Equivalent to approximating the trapezoidal area under the straight line connecting f(a)f(a) and f(b)f(b). Degree of accuracy is 11.

x0x1f(x)dx=h2(f(x0)+f(x1))h312f(2)(ξ)\int_{x_0}^{x_1} f(x)\,\text{d}x = \frac{h}{2} \left( f(x_0) + f(x_1) \right) - \frac{h^3}{12} f^{(2)}(\xi)

Here h=x1x0h = x_1 - x_0.

Simpson’s Rules

A more accurate method of approximating the integral of a function, is to use higher-order polynomials to connect the points.

Degree of accuracy is 33.

Simpson’s 1/3 Rule

Resulted when a second-order interpolating polynomial with 3 equally-spaced points is used to approximate the integral.

x0x2f(x)dx=h3(f(x0)+4f(x1)+f(x2))h590f(4)(ξ)\int_{x_0}^{x_2} f(x)\,\text{d}x = \frac{h}{3} \big( f(x_0) + 4f(x_1) + f(x_2) \big) - \frac{h^5}{90} f^{(4)}(\xi)

Here ξ\xi is between x0x_0 and x2x_2 and h=(x2x0)/2h={(x_2-x_0)}/{2}. Preferred method because, third-order accuracy is attained with 3 points.

Simpson’s 3/8 Rule

Resulted when a third-order interpolating polynomial with 4 equally-spaced points is used to approximate the integral.

x0x3f(x)dx=3h8(f(x0)+3f(x1)+3f(x2)+f(x3))3h580f(4)(ξ)\int_{x_0}^{x_3} f(x)\,\text{d}x = \frac{3h}{8} \big( f(x_0) + 3f(x_1) + 3f(x_2) + f(x_3) \big) - \frac{3h^5}{80} f^{(4)}(\xi)

Here ξ\xi is between x0x_0 and x3x_3 and h=(x3x0)/3h={(x_3-x_0)}/{3}.

Composite Rules

Composite Trapezoidal Rule

An improved version of the trapezoidal rule. Uses multiple intervals (say nn) to approximate the integral.

x0xnf(x)dx=h2(f(x0)+f(xn)+2i=1n1f(xi))ba12h2f(2)(ξi)\int_{x_0}^{x_n} f(x)\,\text{d}x = \frac{h}{2} \left( f(x_0) + f(x_n) + 2\sum_{i=1}^{n-1} {f(x_i)} \right) - \frac{b-a}{12} h^2 f^{(2)}(\xi_i)

Here h=(ba)/nh = (b-a)/n and ξi\xi_i is between xi1x_{i-1} and xix_i for i=1,2,3,,ni=1,2,3,\dots,n.

Composite Simpson’s Rule

An improved version of Simpson’s 1/3 rule. Uses even number (n=2kn=2k) of multiple intervals to approximate the integral.

abf(x)dx=h3[f(x0)+f(xn)+2j=1k1f(x2j)+4j=1kf(x2j1)]ba180h4f(4)(μ)\int_a^b f(x)\,\text{d}x = \frac{h}{3} \left[ f(x_0)+f(x_n)+ 2\sum_{j=1}^{k - 1}{f(x_{2j})}+ 4\sum_{j=1}^{k}{f(x_{2j - 1})} \right] -\frac{b-a}{180}h^4 f^{(4)}(\mu)

Here h=(ba)/nh = (b-a)/n and μ\mu is between x0x_0 and xnx_n.