DGS Studio

Multiple Integrals

Unit Box Triple Integral

Integrate x + y + z over the unit cube. z is the innermost variable.

integrate(integrate(integrate(x+y+z,z,0,1),y,0,1),x,0,1) integrates z, then y, then x over the unit cube. The inner integral of x + y + z from z = 0 to 1 is x + y + 1/2. The middle integral from y = 0 to 1 is x + 1, and the outer integral from x = 0 to 1 is 3/2.

Every bound is constant, so the region is the unit cube. The value 3/2 is exact. Reversing one pair of limits changes the sign and is still a valid oriented integral.

Equation

integrate(integrate(integrate(x+y+z,z,0,1),y,0,1),x,0,1)

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

Try a change

Solve Equation shows the integration order, the bounds, the region, each intermediate integral, and the final value. A coordinate transformation states whether the Jacobian was applied once or was already present. A numerical result is marked as an approximation. A singular or divergent integral is an error.

Edit and generate

Solve Equation opens the studio homepage and runs this field. Open in DGS Studio loads the same text and waits for you to generate it. The equation is sent once, as a query parameter.

Related examples