Lesson 12 of 18
Double Integral
Double Integrals
A double integral integrates a function of two variables over a 2D region:
Over a rectangular region .
The Midpoint Rule in 2D
Divide the region into small rectangles. Evaluate at each midpoint:
Where and .
Geometric Meaning
- = area of the region
- = signed volume between and the -plane
Examples
over (area of rectangle)
over (by exact integration: )
over
Fubini's Theorem
For continuous , you can integrate one variable at a time:
Your Task
Implement double double_integral(double (*f)(double, double), double xa, double xb, double ya, double yb, int nx, int ny) using the 2D midpoint rule.
TCC compiler loading...
Loading...
Click "Run" to execute your code.