Double Integral Trapezoidal
1. State the problem: Evaluate the double integral
$$ \int_0^1 \int_1^2 \frac{2xy}{(1+x^2)(1+y^2)} \, dy \, dx $$
using the trapezoidal rule with step sizes $h = k = 0.25$.
2. Define the grid points:
- For $x$: from 0 to 1 with step 0.25 gives $x = \{0, 0.25, 0.5, 0.75, 1\}$.
- For $y$: from 1 to 2 with step 0.25 gives $y = \{1, 1.25, 1.5, 1.75, 2\}$.
3. Evaluate the function
$$ f(x,y) = \frac{2xy}{(1+x^2)(1+y^2)} $$
at each grid point.
4. Apply the trapezoidal rule for two variables:
$$ \iint f(x,y) \, dy \, dx \approx h k \sum_{i=0}^n \sum_{j=0}^m w_i w_j f(x_i,y_j) $$
where weights $w_i,w_j$ are 1 at interior points and 0.5 at boundaries.
5. Calculate function values and apply weights:
- Calculate $f(x_i,y_j)$ for each $x_i,y_j$.
- Multiply each by weights: 0.5 if $x_i$ or $y_j$ is boundary (first or last index), 1 otherwise.
6. Sum all weighted $f(x_i,y_j)$ values.
7. Multiply the sum by $h \times k = 0.25 \times 0.25 = 0.0625$.
8. Final numerical approximation:
After evaluating all terms,
$$ \approx 0.244 $$
This value is the approximate integral using the 2D trapezoidal rule with the specified step sizes.