A way to generalize the trapezoid integration method for a double integral of a function f(x, y)
Question:
A way to generalize the trapezoid integration method for a double integral of a function f(x, y) consists of dividing the xy plane into a grid of equal squares and calculate the average of the value of the function of each of the 4 vertices of each square small of the grid. Numerically calculate the volume of a hemisphere
f(0) = a0 + a10 + a20 2 + ...
f 0 (0) = a1 + 2a20 + ...
f 00(0) = 2a2 + 3 × 2a30 + ...
of radius
R = 1 as follows:
a) Create a grid between −R and R in the xy plane, where the number of squares in each
side of the grid be n. That is, the grid would have n + 1 points on each axis, and n 2 small squares.
b) For each small square I calculate the average of the function in the four vertices
and multiply by the area of the small square. If the point is outside the sphere
Assume that the value of the function f(x, y) is zero.