Lesson 13 of 18
Polar Double Integral
Integration in Polar Coordinates
Some regions are naturally described in polar coordinates rather than Cartesian .
The Polar Jacobian
When converting to polar coordinates , , the area element becomes:
The extra factor (the Jacobian) accounts for the stretching near the origin.
The Formula
Midpoint Rule in Polar Coordinates
Divide into strips and into angular sectors:
Classic Example: Area of a Disk
For a disk of radius :
Applications
- Area of circles, sectors, rings
- Volume of cylinders and cones
- Integrals with in them (naturally round)
Your Task
Implement double polar_double_integral(double (*f)(double, double), double r0, double r1, double a, double b, int nr, int ntheta).
The function takes Cartesian coordinates. Inside, convert to and include the factor.
Use #include <math.h> for cos and sin.
TCC compiler loading...
Loading...
Click "Run" to execute your code.