> restart;

>

Double Integrals

IMPORTANT: This worksheet depends on some programs we have written in Maple. You have to execute these first. Click on the + in the box below, then follow the directions you see at the beginning of the hidden section.

>

Programs for double integrals

Part I, Rectangular Coordinates

Maple can calculate double integrals as iterated integrals, either numerically or by repeated use of the Fundamental Theorem of Calculus. The tricky part is providing the appropriate limits of integration, just as it is when doing such integrals by hand. For example, if R is the region, shown below, between the graphs of [Maple Math] and [Maple Math] , and [Maple Math] , we compute the integral of f over R as [Maple Math] as follows.

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

[Maple Math]

Region between y=x and [Maple Math]

[Maple Plot]

>

If the function f(x,y) were less simple, for example if [Maple Math] , we could compute the integral of f over the region R numerically as follows.

> evalf(Int(Int(x*sin(x+y),y = x^2 .. x),x = 0 .. 1));

[Maple Math]

>

Observe that the Maple command for integrals has the integration range after the function, so that the "outer" integration range occurs last instead of first as it does when we write the double integral using integral signs .

In this worksheet, our focus will be on setting up double integrals, not evaluating them. To help you gain skill in doing this we have devised some new Maple commands, programmed in the subsection above, that will draw the region corresponding to the integration ranges you specify. For example, the region R appearing above was actually drawn by the new command dydx(x=0..1, y=x^2..x):, although we haven't displayed the command.

>

Notice that in the command dydx(x=0..1, y=x^2..x): the range for the outer integral (the "dx" integral in this case) is given first, as it is when writing integrals, although it appears last in the Maple command above.

Naturally, we programmed a similar command dxdy(y=...,x=...) for double integrals where the outer integral is with respect to y. If we reverse the order of integration in the integral above, we obtain

[Maple Math]

Hence, we expect the command dxdy(y=0..1, x=y..sqrt(y)) to produce the same region R. It does, indeed, as shown below.

>

When drawing regions Maple may choose a viewing window that isn't exactly what we want. Another new command, setwindow , will allow us to specify maximum and minimum values for x and y when using the dxdy and dydx commands. For example, if you want the viewing window be x=-5..5 and y=0..4, you can enter setwindow(-5,5,0,4): before the dxdy or dydx command, using the colon as shown. To return to letting Maple decide on the viewing window, just enter the command setwindow( ): using the empty parentheses as shown. You should reset the window this way for each new example or problem.

Let's actually use the dxdy command to see that we get the same region R that we discussed above. We will specify a view window with the setwindow command as well.

> setwindow(-.5,1,-.5,1.5): dxdy(y=0..1, x=y..sqrt(y));

[Maple Math]

[Maple Plot]

>

As you see, the dydx command will display the double integral in usual printed form and then draw the region. It will also try to catch some common errors and tell you about them, but it isn't foolproof. If you make some unanticipated error you will get one of Maple's usual error messages, or some unexpected result. You should also note that if you switch the upper and lower limits of integration on one of the integral signs, the region will remain the same. However, making this switch changes the sign of the integral.

Here's the game. We give you a region, and you have to use the dxdy or dydx commands to specify the limits of integration in a double integral that will integrate a function F(x,y) over the given region. For some regions, you will have to express the integral over the region as the sum of double integrals over simpler regions. We have reduced the size of graphic displays in the worksheet to save space, so expect those you generate using the dydx and other commands to be larger.

Example 1. Find integration limits for a double integral to integrate a function F(x,y) over the region shown below.

[Maple Plot]

>

First of all, you should decide on the order of integration that will make the most sense for this region. Then see if you can describe the boundaries algebraically. Use the dxdy and/or dydx commands to try out your answers. Use setwindow( ): to have Maple decide on the view window.

You can get hints by clicking on the hidden sections below, but experiment yourself before peeking!!

> setwindow( ):

>

Hint 1

Hint 2

Hint 3

Solution

>

Example 2. To integrate over the L-shaped region below we might break the region into two rectangular regions and add the integrals over these rectangular regions. For example, the integral of F(x,y) over the region shown below can be written
[Maple Math] + [Maple Math] and we can draw the region by the command
display(dxdy(y=0..2,x=0..1), dxdy(y=2..4,x=0..3));

Note how the we use the display command to combine the results of the two dxdy commands.

How can you write the integral over the region as the sum of two "dydx" (rather than "dxdy") double integrals? How could you use the display command with two dydx commands to draw the region?


[Maple Plot]

>

Homework Problems, Part I

For each of the following regions and for an arbitrary function F(x,y), write a double integral of " dxdy" or " dydx" type (or both if specified) of F(x,y) over the region. Use the dxdy and dydx commands to experiment, check your work and produce your final answer. Remember that if you use the setwindow command, the view window will remain in effect until you release it by using the command: setwindow( ):.

Problem 1. Give both " dxdy" and "dydx" integrals of F(x,y) over the region:

. [Maple Plot]

>

Problem 2. The curved boundary is a parabola. Give both "dxdy" and "dydx" integrals of F(x,y) over the region:

[Maple Plot]

>

Problem 3. The curved part is an arc of a circle. Give both "dxdy" and "dydx" integrals.

[Maple Plot]

>

Problem 4. Give both "dxdy" and "dydx" integrals.
[Maple Plot]

Part II, Polar Coordinates

In the subsection at the beginning of this worksheet, we have programmed two other commands, drdtheta , and dthetadr, that draw regions corresponding to double integrals in polar coordinates. The setwindow command has no effect on these polar coordinate commands. You will find it helpful to know a little more about plotting certain curves in polar coordinates, especially in example 2 below. Click the + below for more on polar plotting.

>

Polar plotting in brief

>

Example 3.

> drdtheta(theta= 0..Pi/2, r=1..2);

[Maple Math]

[Maple Plot]

>

Example 4.

> drdtheta(theta=0..Pi/2, r =0.. 2*cos(theta));

[Maple Math]

[Maple Plot]

>

Example 5. We can integrate over the region in Example 1 with a "d [Maple Math] dr" integral:

> dthetadr(r=1..2, theta=0..Pi/2);

[Maple Math]

[Maple Plot]

>

Example 6. You might have to think a bit about why the region looks the way it does here:

> dthetadr(r=1..2, theta=-r/2..r/2);

[Maple Math]

[Maple Plot]

>

Homework Problems, Part II

For each of the following regions, write a double integral of "drd [Maple Math] " or "d [Maple Math] dr" type, or both if specified, for an function F(r, [Maple Math] ). Use the drdtheta and dthetadr commands to experiment and check your work.

Problem 5. Do both ways.
[Maple Plot]

>

Problem 6.
[Maple Plot]

>

Problem 7.
[Maple Plot]

>

Problem 8. Do some experiments!
[Maple Plot]

>

MTH 243 Worksheets written by B. Kaskosz and L. Pakula, Copyright 1999.

>