# How am I screwing up these integrals?

1. Jun 22, 2006

### Maxwell

How am I screwing up this integral?

$f(x,y) = 1 - x;$

R is the triangle bounded with vertices (0,0),(1,1),(-2,1)

What I've done:

I drew out the picture, and I set up the following integral:

$\int_{0}^{1}\int_{-2}^{1} (1-x) dx dy$

Then I solved with respect to x,

I got (after plugging in the boundries):

INT_{0}^{1} [(1 - (1/2)) - (-2 - 2)] dy

Solving this with rt y,

(y/2) + 4y

With boundries applied,

(1/2) + 4

The answer in the book is 2.

What am I doing wrong?

Last edited: Jun 22, 2006
2. Jun 22, 2006

### siddharth

The limits of integration are wrong.

3. Jun 22, 2006

### nrqed

Notice that the y coordinate does NOT go from 0 to 1 everywhere inside the triangle! The lower limit of y depends on the position along x at which you are. So you must be careful with the *limits* of your y integral.
Just a comment...Saying "I *solved* with respect to x" is a very unconventional way to say things, it will confuse people a lot. You should say "I integrated x". And instead of saying "I applied the boundaries" it is more standard to say "I evaluated at the limits of integration"

4. Jun 22, 2006

### Maxwell

Thanks for the tips.

How do I find the limits of my y integral, then?

I assume the lower limit will be 0.

5. Jun 22, 2006

### nrqed

No. Look at your drawing. Do you see that the lower value of y is 0 *only* when x is zero!? when x is not zero, the lower value of y is not zero. Consider separately the "left" and "right" edges of the triangle (the right edge is the line connecting (0,0) to (1,1) for example). For those two edges, you have to work out an equation relating y and x (since these are straight lines, you will obviously have a form y = mx +b). Do this for the left and right edge. Those two equations will become your lower limits for y, depending on whether x is smaller or larger than 1. So you will get something of the form $$\int_{-2}^0 dx \int_{mx +b}^1 dy (1-x) + \int_{0}^1 dx \int_{m'x+ b'}^1 dy (1-x)$$

Hope this helps

Patrick
EDIT: one of my limites for x was wrong. I just corrected it

Last edited: Jun 22, 2006
6. Jun 22, 2006

### Maxwell

Oh, wow, now I see. Thanks a lot, that makes sense.

7. Jun 22, 2006

### nrqed

You are welcome.
(One of my limits on x was wrong, I had made a typo. I just corrected it)

Glad I could help.

Patrick