BACKGROUND


Purpose | Background (with Examples) | Exercises

Computing double and triple integrals in Maple

Suppose that R is a rectangular region in the the x,y-plane, and that f is a continuous, non-negative function on R. Then the volume of the solid above R and below z = f(x,y) is given by the double integral

double intergral f(x,y)dA

We learned in class that such integrals can be evaluated by either of the iterated integrals

Int_a^b ( Int_c^d f(x,y) dy ) dx

or

Int_c^d ( Int_a^b f(x,y) dx ) dy

where the rectangle R is defined by the inequalities a < x < b and c < y < d.

Using Maple to evaluate double integrals proceeds in exactly the same fashion. For example, the following Maple commands show the computation of

Int_0^1 ( Int_-2^1 x^2 + y^2) dx ) dy

for both orders of integration.

  > int(int(x^2+y^2,x=-2..1),y=0..1);

4

> int(int(x^2+y^2,y=0..1),x=-2..1);

4

More complicated integrals are handled similarly. Suppose that we have f(x,y) = x2 + y2 and we want to know the volume of the solid between the region in the xy-plane bounded by the circle (x - 1)2 + y2 = 1 and the graph of f(x,y). Then an appropriate integral is

Int_0^1 ( Int_-sqrt(1-(x-1)2)^sqrt(1-(x-1)2) x^2 + y^2) dx ) dy

Using Maple, we calculate this as

  > int(int(x^2+y^2,y=-sqrt(1-(x-1)^2)..sqrt(1-(x-1)^2)),x=0..2);

(3/2)*Pi

Triple integrals

Computing triple integrals with Maple proceeds in a similar fashion. For example, the command to perform the following integral

is

  > int(int(int(exp(x)*y*z^2,x=0..1),y=1..2),z=-1..1);

e - 1

It is sometimes helpful when you aren't sure you have the correct command to use the Int command, which is an inert form of the int command. Inert means that Maple just displays the integral and does not try to evaluate it. Here is an example.

  > Int(Int(Int(exp(x)*y*z^2,x=0..1),y=1..2),z=-1..1);

Triple Integral

By using the inert Int command, you can easily check that the limits and the order of integration are correct.

More complicated triple integrals can also be done. For example, the volume of the region bounded by the paraboloid z = x2 + y2 and the plane z = y + 2 is given by the triple integral

This integral can be computed with the following Maple command.

  > int(int(int(1,x=-sqrt(z-y^2)..sqrt(z-y^2)),z=y^2..y+2),y=-1..2);

(81/32)*Pi



Purpose | Background (with Examples) | Exercises

Written by: JDF (E-Mail: bach@wpi.edu)
Last Updated: Friday, 5 October 2001
Copyright 2001, Joseph D. Fehribach