Multiple Integrals
Polar Disk of Radius 2
Draw the disk of radius 2. The integrand r is integrated directly, so no extra Jacobian is applied. The value is 4*pi.
Generate Graph draws integrate(integrate(r,r,0,2),theta,0,2*pi) as a polar disk of radius 2. The integrand already contains r, so the Cartesian height is the integrand divided by r, which is 1. No second Jacobian is applied. The integral is 4*pi.
The map is x = r cos(theta) and y = r sin(theta). A direct integrand that cannot be divided by r at the origin shows the region instead of an infinite height, and the caption says that the Cartesian volume is not the integral.
Equation
integrate(integrate(r,r,0,2),theta,0,2*pi)
How an iterated integral is evaluated
A double integral adds a scalar over a plane region, and a triple integral adds it over a solid. DGS reads the nested integrate command from the inside out. The inner integral is evaluated before the outer one, and a bound may depend on a variable that has not yet been integrated. Constant bounds describe a rectangle or a box. A bound such as y = x or z = 1 - x - y describes a triangle or a tetrahedron. Reversing a pair of limits keeps that orientation and changes the sign. An exact antiderivative is preferred. A numerical value is shown only when quadrature stays inside its error tolerance, and the steps call that value an approximation.
Polar, cylindrical, and spherical commands are coordinate transformations, and they are separate from a bare nested integrate command. The polar area factor is r. The cylindrical volume factor is r. The spherical volume factor is rho^2 sin(phi), with phi measured from the positive z-axis and theta around from the positive x-axis. Each of those factors is applied once. If the integrand already contains the factor, it is not multiplied again. A nested integrate command, even one whose variables are named r and theta, uses the integrand as written and does not insert a Jacobian. The picture of a polar region may divide a finite integrand by r so the height is a Cartesian surface. That division is display geometry. It is not a second copy of the Jacobian, and a singular quotient is drawn as the region rather than as an invented volume.
Reading the input
integrate(integrate(r,r,0,2),theta,0,2*pi)— This is a command. The name selects the routine, and the items inside the parentheses are its arguments.
Try a change
- Compare integrate(integrate(1,r,0,1),theta,0,2*pi) with polar_integral(1,r,0,1,theta,0,2*pi). The first is direct and equals 2*pi. The second applies the factor r once and equals pi.
- Reverse one outer bound, such as integrate(integrate(integrate(1,z,0,1),y,0,1),x,1,0). The value changes from 1 to -1 because the orientation is kept.
- Try integrate(integrate(1/x,x,-1,1),y,0,1). The inner integral is singular, so no finite value is returned.
Generate Graph draws a double integral as a surface over its region in the existing 3D viewer, including variable bounds and a polar coordinate map. A triple integral draws the solid with transparent faces and the written limits. Orbit, zoom, pan, and the existing export stay on that viewer.