Introduction to Numerical Integration
Numerical integration is a fundamental technique used when an antiderivative of a function is either difficult to find or impossible to express in elementary functions. The Trapezoidal Rule approximates the area under a curve by dividing the region into vertical trapezoids rather than rectangles.
The Trapezoidal Rule Formula
To approximate $\int_{a}^{b} f(x) dx$ with $n$ subintervals:
- Calculate the width of each subinterval: $\Delta x = \frac{b-a}{n}$
- Identify the partition points: $x_0, x_1, ..., x_n$
- Use the formula: $T_n = \frac{\Delta x}{2} [f(x_0) + 2f(x_1) + ... + 2f(x_{n-1}) + f(x_n)]$
Step-by-Step Solution
Problem: Evaluate $\int_{0}^{1} \frac{1}{1+x^2} dx$ using $n=2$.
1. Identify parameters:
- $a = 0, b = 1, n = 2$
- $f(x) = \frac{1}{1+x^2}$
- $\Delta x = \frac{1-0}{2} = 0.5$
2. Determine partition points:
- $x_0 = 0$
- $x_1 = 0.5$
- $x_2 = 1$
3. Calculate function values:
- $f(x_0) = f(0) = \frac{1}{1+0^2} = 1$
- $f(x_1) = f(0.5) = \frac{1}{1+0.5^2} = \frac{1}{1.25} = 0.8$
- $f(x_2) = f(1) = \frac{1}{1+1^2} = 0.5$
4. Apply the Trapezoidal Rule: $T_2 = \frac{0.5}{2} [f(0) + 2f(0.5) + f(1)]$ $T_2 = 0.25 [1 + 2(0.8) + 0.5]$ $T_2 = 0.25 [1 + 1.6 + 0.5]$ $T_2 = 0.25 [3.1] = 0.775$
Conclusion: The approximate value of the integral is $0.775$.