I'm studying in preparation for a Mathematical Analysis II examination and I'm solving past exam exercises. If it's any indicator of difficulty, the exercise is Exercise 4 of 4, part $a$ and graded for 10%.
Calculate the double integral $\iint_{D}xy\,{\rm d}x\,{\rm d}y$ where $D$ is the plane limited by the lines $y+x=1$, $y=0$, $x=0$ in the 1st Quadrant
Using Fubini's theorem, I noted that (possibly this is the source of my mistake) $D=\{(x, y): 0 \leq x \leq 1, 0\leq y \leq 1-x\}$ and $D = \{(x, y): 0 \leq y \leq 1, 0 \leq x \leq y\}$. Afterwards, I worked with the help of consecutive integrals and calculated $$\iint_D xy\,{\rm d}x\,{\rm d}y = \int^1_0 \int^{1-x}_0 xy\,{\rm d}y\,{\rm d}x ~~~~\text{ and }~~~~ \iint_D xy\,{\rm d}x\,{\rm d}y = \int^1_0 \int^y_0 xy\,{\rm d}x\,{\rm d}y.$$
These two consecutive integrals yields two different results, $\frac{1}{24}$ and $\frac{1}{8}$ respectively which means there was an error in my method.
Is my thought correct? Am I wrong in using Fubini's theorem to solve this? Any help would be greatly appreciated.
The image illustrate the domain of integration, that is a triangle with sides on the $x$ axis, the $y$ axis and the straight line $x+y=1$.
For a point $P$ on such line, given $x \in [0,1]$ we have $y=1-x$ and given $y \in[0,1]$ we have $x=1-y$, so integrating in the order $y,x$ we have $$ \int _0^1 \int_0^{1-x} xydydx $$ and in the order $x,y$ $$ \int _0^1 \int_0^{1-y} xydxdy $$ and it is easy to see that the the two integrals have the same value $=1/24$