Change of variable in double integrals I need help to solve the following question(s).
a) Evaulate the integral
$$\iint_D (x-y) \, dx \, dy,$$
where $D$ is the triangle with vertices $(0,0)$, $(-1,1)$ och $(4,2)$.
b) Evaulate the integral
$$ \iint_D (y-x) dx \, dy,$$
where $D$ is the triangle with vertices $(0,0)$, $(4,1)$ och $(2,2)$.
My attempt
a) 
Actually, I am not very sure where to correctly start. A suggestion would be to first find out that the lines (i.e. the lines of the triangle) can be described as
$y=-x \Leftrightarrow y-x=0$,
$y=x/5+6/5 \Leftrightarrow y-x/5=6/5$,
$y=x/2 \Leftrightarrow y - x/2 = 0$.
I suppose the change of variables should be found out in light of this. But I dont know how to continue. According to the (very short) solution, the substitution is supposed to be
$u = x+y$,
$v = x−2y$,
but this makes no sense to me.
 A: So I may have found an method. Please comment if you have any suggestions of how it can be improved. So my remaining question is why the other change of variables (i.e. the change I mentioned in my first post) differ slightly from the following change of variables.
a) Evaulate the integral
$ \int \int_D (x-y) \, dx \, dy,$
where D is the triangle with vertices (0,0), (-1,1) och (4,2).
Solution
Let
$$
\left(\begin{array}{r}
x
\\
y
\end{array}\right)=
\left(\begin{array}{rr}
4 & -1
\\
2 & 1
\end{array}\right)
\left(\begin{array}{r}
u
\\
v
\end{array}\right) =
\left(\begin{array}{r}
4u-v
\\
2u+v
\end{array}\right),
$$
which is equivalent to
$$
\left(\begin{array}{r}
u
\\
v
\end{array}\right)=
\left(\begin{array}{r}
\frac{1}{6}(x+y)
\\
\frac{1}{3}(2y-x)
\end{array}\right).
$$
Plugging in the vertices gives us
$$(x,y)=(0,0) \Leftrightarrow (u,v)=(0,0), $$
$$(x,y)=(4,2) \Leftrightarrow (u,v)=(1,0), $$
$$(x,y)=(-1,1) \Leftrightarrow (u,v)=(0,1). $$
Jacobian $\ldots$
$$ \frac{d(x,y)}{d(u,v)} = 6 \Rightarrow dx \, dy = |6| \, du\, dv =6 \, du\, dv $$
Finally $\ldots$
$$\iint_D (x-y) \, dx \, dy =  6 \int^1_0 \int^{1-u}_0 (2v-2u) \, du\, dv = 0.$$
