Q:

Determining the limits of an integral

In Griffiths' Introduction to Electrodynamics, Problem 1.28 (the triangular prism question) is especially challenging for me. I do not know how the limits of x are 0 to (1-y). 
My concern is the latter limit, 1-y. Can you explain systemically how this is arrived at?
On the face of it, I'm inclined to say the limits of x are 0 and 1. I can see it's the diagonal across the x- and y-axes that's presenting the extra challenge, but I do not know how to go about establishing that indeed the limit is 1-y.

A:

I don't know the problem specifically, but I can easily imagine how 1-y came up.
Just try to draw a prism using the three points (0,0), (0,1) and (1,0) on the xy-plane. Now try to figure out the linear equation that governs the line between (0,1) and (1,0), and you'll see that the line's equation is $x=1-y$.
By doing a surface integral on surface that is limited by the points I mentioned, and the integral will be (in the simplest case for calculating the area):
$$\iint_S dS = \int_0^1dy\int_0^{1-y}dx$$
I hope this helps.

