# Writing a double integral from a graph

1. Nov 1, 2011

### arl146

1. The problem statement, all variables and given/known data
A region R is given. (ill just tell you that it is a triangle, given by lines x = -2, y = 2, and y = x).
Decide whether to use polar coordinates or rectangular coordinates and write $\int$$\int f(x,y)dA$ as an iterated intergal, where f is an arbitrary continuous function.

3. The attempt at a solution
so, i already know to use polar coordinates. i have the answer for the problem which is :

$\int$$\int f(x,y)dydx$ where the x's boundaries are -2 to 2 and the y's boundaries are x to 2.

i understand why the lower x boundary is -2, and why the upper y is 2. but why is the x upper 2 and the y lower x? why cant it be like the x boundaries are -2 to y and the y boundaries are x to 2 ?

2. Nov 1, 2011

### Staff: Mentor

The region R is expressed in the limits of integration in this integral.
$$\int_{x = -2}^2\int_{y = x}^2 f(x, y)~dy~dx$$

The inner integration takes place in a thin vertical strip of width dx, that runs from the line y = x to the horizontal line y = 2. Every vertical strip is exactly the same in this regard. The integration adds up the rectangles from bottom to top, where each rectangle has an area of dx*dy.

The outer integration takes place by adding up the vertical strips of the inner integration, in essesnce sweeping from left to right. The strips run from x = -2 on the left to x = 2 on the right.

3. Nov 1, 2011

### tjackson3

I think you mean that you know to use rectangular coordinates (since that's what you used, and I think polar would be inadvisable here anyway). As to your question, you do have a choice in the matter. Suppose we fix some value of y (see the green strip in picture below). Then for that y, x would be integrated from -2 to the x value corresponding to where that fixed y touches the other boundary (in this case, it's the line y = x), which in this case is at the point x = y. So you're integrating x from -2 to y first. Then you want to integrate over all relevant values of y, which would be from the bottom of the triangle (y = -2) to the top (y = 2). Thus the integral is

$$\int_{-2}^2\ \int_{-2}^y\ f(x,y)\ dx\ dy$$

Note that the order of the differentials is important here, since you have to integrate with respect to x first.

Alternatively, you could integrate with respect to y first. Here you would pick some fixed value of x (see the yellow strip in the picture). Then you would integrate y from the y-coordinate corresponding to wherever that x touched the bottom boundary (in this case, y = x) to the top (y=2). Then you would integrate over all relevant values of x. In this case, the integral becomes

$$\int_{-2}^2\ \int_x^2\ f(x,y)\ dy\ dx$$

In practice, which you choose depends upon the function itself. Since you're looking at an arbitrary function, just choose one.

http://img844.imageshack.us/img844/6977/changeofvars.png [Broken]

Last edited by a moderator: May 5, 2017
4. Nov 1, 2011

### arl146

ok i get the 'inner integration' but i still dont get the outer one .. yea, youre going from x=-2 but it still hits the line y=x there is no line thats x=2.. i dont get that one

5. Nov 1, 2011

### arl146

i dont get it, your green line still hits y=x -____-

Last edited by a moderator: May 5, 2017
6. Nov 1, 2011

### Staff: Mentor

Where do the vertical strips run from and to in the outer integral? From x = -2 on the left to x = 2 on the right.

7. Nov 1, 2011

### arl146

ok i guess i see it but then why dont you look at the outer integration in the same way as the inner... like why do you say, oh the vertical strips from the inner integration run from x=-2 to x=2.. why cant it be independent of the inner integration strips

8. Nov 1, 2011

### Staff: Mentor

Because in the inner integration, the strips are different lengths. In the outer integration you're just adding all the strips going from left to right. Having the lower limit of integration being a variable for the inner integral takes into account that the strips are different lengths.

9. Nov 1, 2011

### arl146

ok! thanks

10. Nov 2, 2011

### Staff: Mentor

The green line would be a horizontal strip if the integration happened in the opposite order.

In that case the inner integral would look at horizontal strips (like the green line), that run from x = -2 to x = y. The outer integral would essentially add all the horizontal strips, from y = -2 to y = 2. The integral would look like the first one in post #3.
$$\int_{y = -2}^2\ \int_{x = -2}^y\ f(x,y)\ dx\ dy$$