# Double integral and variable change

I have to calculate $\int\int_D x dxdy$ where D is the parallelogram whose vertices are $(-\frac 23, -\frac 13),(\frac 23,\frac 13),(\frac 43,-\frac 13),(0,-1)$ using a linear variable change that transforms D into the square whose vertices are $(1,0),(1,1),(0,0),(0,1)$. I don't know how to find that variable change.

• HINT: Jacobian. – Don Larynx Oct 18 '13 at 0:41
• @DonLarynx your hint isn't very helpful. The OP is asking for how to obtain the change of variables. – Bill Cook Oct 18 '13 at 0:55
• You'll want to fit lines through each side of the parallelogram. For example: the line through $(-2/3,-1/3)$ and $(2/3,1/3)$ turns out to be $-x+2y=0$. If you get another line like $-x+2y=1$, then setting $u=-x+2y$ would yield bounds: $u=0$ and $u=1$. – Bill Cook Oct 18 '13 at 0:57
• Draw a picture first. – Felix Marin Oct 19 '13 at 10:04
• I have drawn a picture. – Cath Oct 19 '13 at 10:07

As already remarked in the comments above, it is important to have at least the sketch of a graph for such "change of variable" problems in order to sort out the vertices of the parallelogram, which is our domain $\ \mathsf{D} \$ . Since the boundaries of the region are straight lines, and the function we wish to integrate over $\ \mathsf{D} \$ is simply $\ x \$ , the integration would not be terribly difficult to perform, except that the oblique boundaries of the parallelogram make it necessary to break the integration into pieces in order to accommodate the changes in the "bounding functions" as we integrate along the $\ x-$ and $\ y-$ directions.

This is why we prefer to use a transformed coordinate system in which the edges of the parallelogram are parallel to the coordinate axes. To manage this, it is helpful to have the equations of the lines along which the sides lie. We can find these equations in "point-slope form" as, for instance,

$$\mathbf{\overline{AB}} \ : \quad y \ - \ (-1) \ = \ \frac{1}{2} \ (x \ - \ 0) \ \ , \quad \mathbf{\overline{DC}} \ : \quad y \ - \ (-\frac{1}{3}) \ = \ \frac{1}{2} \ (x \ - \ [-\frac{2}{3}] \ ) \ \ ;$$

$$\mathbf{\overline{DA}} \ : \quad y \ - \ (-\frac{1}{3}) \ = \ (-1) \ (x \ - \ [-\frac{2}{3}] \ ) \ \ , \quad \mathbf{\overline{CB}} \ : \quad y \ - \ \frac{1}{3} \ = \ (-1) \ (x \ - \ \frac{2}{3} \ ) \ \ .$$

As Bill Cook describes in his comment, if we re-write these linear equations in "general form", the appropriate coordinate transformation suggests itself:

$$\mathbf{\overline{AB}} \ : \quad \frac{1}{2} x \ - \ y \ = \ 1 , \quad \mathbf{\overline{DC}} \ : \quad \frac{1}{2} x \ - \ y \ = \ 0 \ \ ;$$

$$\mathbf{\overline{DA}} \ : \quad x \ + \ y \ = \ -1 \ \ , \quad \mathbf{\overline{CB}} \ : \quad x \ + \ y \ = \ +1 \ \ .$$

If we declare that we will use two new variables representing the left-hand sides of these equations, these variables will have constant values along the sides of the transformed parallelogram, making them parallel to these new coordinate axes. To attempt to reduce the use of fractions as much as possible, we can select $\ u \ = \ x \ - \ 2y \$ and $\ v \ = \ x \ + \ y \$ to bound our transformed region, now a rectangle (in fact, a square of side 2) with

$$\mathbf{\overline{A'B'}} \ : \quad u \ = \ 2 , \quad \mathbf{\overline{D'C'}} \ : \quad u \ = \ 0 \ \ , \quad \mathbf{\overline{D'A'}} \ : \quad v \ = \ -1 \ \ , \quad \mathbf{\overline{C'B'}} \ : \quad v \ = \ 1 \ \ .$$

The transformed domain is now as seen in the graph below:

Usually we would proceed to compute the integral from here. We can solve the variable-transformation equations to find $\ x \$ and $\ y \$ in terms of the new variables as $\ x \ = \ \frac{1}{3} (u \ + \ 2v) \$ and $\ y \ = \ \frac{1}{3} (-u \ + \ v) \$ . The Jacobian for this transformation is then

$$\mathfrak{J}_1 \ = \ \left[\begin{array}{cc}\ \ \frac{1}{3}&\frac{2}{3}\\-\frac{1}{3}&\frac{1}{3}\end{array}\right] \ \ \Rightarrow \ \ \det \ \mathfrak{J}_1 \ = \ \frac{1}{3} \ \ .$$

[Side note 1 -- we can also use our equations for $\ u \$ and $\ v \$ in terms of the original variables, which gives us the inverse Jacobian matrix,

$$\mathfrak{J}_1^{-1} \ = \ \left[\begin{array}{cc}\ \frac{\partial u}{\partial x}&\frac{\partial u}{\partial y}\\\frac{\partial v}{\partial x}&\frac{\partial v}{\partial y}\end{array}\right]\ = \ \left[\begin{array}{cc}\ \ 1&-2\\ \ 1& \ 1\end{array}\right] \ \ ,$$

for which we can then use any preferred method of inverting a $\ 2 \times 2 \$ matrix to obtain $\ \mathfrak{J}_1 \$ . Incidentally, because the determinant of $\ \mathfrak{J}_1 \$ is positive, the direction of circulation from $\ A \$ to $\ B \$ to $\ C \$ to $\ D \$ remains counter-clockwise after the transformation.]

The integral we wish to perform is then transformed into

$$\iint_{\mathsf{D}} \ x \ \ dx \ dy \ \ = \ \ \int_{-1}^1 \int_0^2 \ x(u,v) \ \cdot \ | \det \ \mathfrak{J}_1 \ | \ \ du \ dv$$

$$= \ \ \int_{-1}^1 \int_0^2 \ \frac{1}{3} (u \ + \ 2v) \ \cdot \ \frac{1}{3} \ \ du \ dv \ \ = \ \ \frac{1}{9} \ \int_{-1}^1 \ (\frac{1}{2}u^2 \ + \ 2uv) \ \vert_{u=0}^{u=2} \ \ dv$$

$$= \ \ \frac{1}{9} \ \int_{-1}^1 \ (2 \ + \ 4v) \ \ dv \ \ = \ \frac{1}{9} \ (2v \ + \ 2v^2) \ \vert_{-1}^1 \ = \ \frac{1}{9} \ (2 + 2 - [-2] - 2) \ = \ \frac{4}{9} \ \ .$$

[Side note 2 -- Were we asked to find $\iint_D \ y \ \ dx \ dy \$ , we would obtain

$$\rightarrow \ \ \int_{-1}^1 \int_0^2 \ \frac{1}{3} (-u \ + \ v) \ \cdot \ \frac{1}{3} \ \ du \ dv \ \ = \ -\frac{4}{9} \ \ .$$

In the second graph above, we can see that because this square is symmetrical about the $\ u-$ axis, we will have $\iint_{D'} \ v \ \ du \ dv \ \ = \ 0 \$ . Applying our transformation, we obtain

$$\iint_{\mathsf{D'}} \ v(x,y) \ \cdot \ | \det \ \mathfrak{J}_1 \ | \ \ du \ dv \ \ = \ \frac{4}{3} \cdot 0 \ = \ \ \iint_{\mathsf{D}} \ (x \ + \ y) \ \ dx \ dy$$

$$= \ \ \iint_{\mathsf{D}} \ x \ \ dx \ dy \ \ + \ \ \iint_{\mathsf{D}} \ y \ \ dx \ dy \ = \ \frac{4}{9} \ + \ \left( -\frac{4}{9} \right) \ = \ 0 \ \ ,$$

which serves as a check on our results. We will return to this approach again below.]

$$\ \$$

However, this is not exactly what the problem asks for: we are supposed to transform the parallelogram $\ ABCD \$ into a unit square lying in the first quadrant of the plane. We can use our initial effort on this integral as a guide; we would like to find a further linear transformation that performs the following:

A : $\quad (0, \ -1) \ \ \rightarrow \ \ (2, \ -1) \ \ \rightarrow \ \ (1, \ 0) \ \ , \quad$ B : $\quad (\frac{4}{3}, \ -\frac{1}{3}) \ \ \rightarrow \ \ (2, \ 1) \ \ \rightarrow \ \ (1, \ 1) \ \ ,$

C : $\quad (\frac{2}{3}, \ \frac{1}{3}) \ \ \rightarrow \ \ (0, \ 1) \ \ \rightarrow \ \ (0, \ 1) \ \ , \quad$ D : $\quad (-\frac{2}{3}, \ -\frac{1}{3}) \ \ \rightarrow \ \ (0, \ -1) \ \ \rightarrow \ \ (0, \ 0) \ \ .$

We can accomplish this by "compressing" both dimensions of our square by a factor of 2 and "shifting it upward" by $\ \frac{1}{2} \$ unit, thus, $\ s \ = \ \frac{1}{2} u \ \ , \ \ t \ = \ \frac{1}{2} v \ + \ \frac{1}{2} \$ .

Solving these new transformation equations as $\ u \ = \ 2s \$ and $\ v \ = \ 2t \ - \ 1 \$ produces a second Jacobian matrix

$$\mathfrak{J}_2 \ = \ \left[\begin{array}{cc}\ 2&0\\0&2\end{array}\right] \ \ \Rightarrow \ \ \det \ \mathfrak{J}_2 \ = \ 4 \ \ .$$

(This determinant is again positive, so the direction of circulation around the vertices of the transformed square remains counter-clockwise.)

Alternatively, we can insert our earlier expressions for $\ u \$ and $\ v \$ into the latest transformation equations to obtain

$$\ s \ = \ \frac{1}{2} ( \ x \ - \ 2y \ ) \ = \ \frac{1}{2} x \ - \ y \ \ , \quad t \ = \ \frac{1}{2} ( \ x \ + \ y \ ) \ + \ \frac{1}{2} \ = \ \frac{1}{2} x \ + \ \frac{1}{2} y \ + \ \frac{1}{2}$$

$$\Rightarrow \ \ x \ = \ \frac{2}{3} \ (s \ + \ 2t \ - \ 1) \ \ , \quad y \ = \ \frac{2}{3} \ (-s \ + \ t \ - \ \frac{1}{2} ) \ \ .$$

The Jacobian matrix for the full transformation from $\ (x, \ y) \ \rightarrow \ (s, \ t) \$ is then

$$\mathfrak{J} \ = \ \left[\begin{array}{cc}\ \frac{2}{3}&\frac{4}{3}\\ -\frac{2}{3}&\frac{2}{3}\end{array}\right] \ \ \Rightarrow \ \ \det \ \mathfrak{J} \ = \ \frac{4}{3} \ \ .$$

Note that we can also produce this from

$$\mathfrak{J}_1 \ \mathfrak{J}_2 \ = \ \left[\begin{array}{cc}\ \ \frac{1}{3}&\frac{2}{3}\\-\frac{1}{3}&\frac{1}{3}\end{array}\right] \ \left[\begin{array}{cc}\ 2&0\\0&2\end{array}\right] \ = \ \left[\begin{array}{cc}\ \frac{2}{3}&\frac{4}{3}\\ -\frac{2}{3}&\frac{2}{3}\end{array}\right] \ = \ \mathfrak{J} \ \ .$$

[Side note 3 -- We can show that the value of this determinant is reasonable. The area of our square $\ A''B''C''D'' \$ is 1 , since it is a unit square. The original parallelogram has sides of length $\ \sqrt{ \left(\frac{2}{3}\right)^2 \ + \ \left(\frac{2}{3}\right)^2} \ = \ \frac{2 \sqrt{2}}{3} \$ and $\ \sqrt{ \left(\frac{4}{3}\right)^2 \ + \ \left(\frac{2}{3}\right)^2} \ = \ \frac{2 \sqrt{5}}{3} \$ . Since the slopes of its sides are $\ -1 \$ and $\ \frac{1}{2} \$ , the cosine of the angle between, say, sides $\ \mathbf{\overline{DA}} \$ and $\ \mathbf{\overline{DC}} \$ is

$$\cos \ \theta \ = \ \frac{\langle \ 1, \ -1 \ \rangle \ \cdot \ \langle \ 2, \ 1 \ \rangle}{\sqrt{ 1^2 \ + \ (-1)^2} \ \cdot \ \sqrt{ 2^2 \ + \ 1^2}} \ = \ \frac{1}{\sqrt{ 10}} \ \ ,$$

from which we compute $\ \sin \ \theta \ = \ \frac{3}{\sqrt{ 10}} \$ and the area of parallelogram $\ ABCD \$ as $\ \frac{2 \sqrt{2}}{3} \ \cdot \ \frac{2 \sqrt{5}}{3} \ \cdot \ \frac{3}{\sqrt{ 10}} \ = \ \frac{4}{3} \$ . So the Jacobian $\ \mathfrak{J} \$ for the full transformation has been determined correctly.]

Our integral over the desired transformed square becomes

$$\iint_{\mathsf{D}} \ x \ \ dx \ dy \ \ = \ \ \int_0^1 \int_0^1 \ x(s,t) \ \cdot \ | \det \ \mathfrak{J} \ | \ \ ds \ dt$$

$$= \ \ \int_0^1 \int_0^1 \ \frac{2}{3} \ (s \ + \ 2t \ - \ 1) \ \cdot \ \frac{4}{3} \ \ ds \ dt \ \ = \ \ \frac{8}{9} \ \int_0^1 \ (\frac{1}{2}s^2 \ + \ 2st \ - \ s) \ \vert_{s=0}^{s=1} \ \ dt$$

$$= \ \ \frac{8}{9} \ \int_0^1 \ (\frac{1}{2} \ + \ 2t \ - \ 1) \ \ dt \ \ = \ \frac{8}{9} \ (-\frac{1}{2} t \ + \ t^2) \ \vert_0^1 \ = \ \frac{8}{9} \ (-\frac{1}{2} + 1 + 0 - 0) \ = \ \frac{4}{9} \ \ ,$$

as we found above.

[Side note 4 -- Computing $\ \iint_{\mathsf{D}} \ y \ \ dx \ dy \$ yields

$$\int_0^1 \int_0^1 \ \frac{2}{3} \ (-s \ + \ t \ - \ \frac{1}{2} ) \ \cdot \ \frac{4}{3} \ \ ds \ dt \ \ = \ -\frac{4}{9} \ \ .$$

We can check on our efforts in the following manner. The centroid of our unit square $\ A''B''C''D'' \$ lies at $\ \left(\frac{1}{2}, \ \frac{1}{2} \right) \$ . This tells us that

$$\ \overline{s} \ = \ \frac{\iint_{\mathsf{D''}} \ s \ \ ds \ dt}{\text{area of} \ \mathsf{D''}} \ = \ \frac{\frac{1}{2}}{1} \ \ , \quad \overline{t} \ = \ \frac{\iint_{\mathsf{D''}} \ t \ \ ds \ dt}{\text{area of} \ \mathsf{D''}} \ = \ \frac{\frac{1}{2}}{1}$$

$$\Rightarrow \ \ \iint_{\mathsf{D''}} \ s \ \ ds \ dt \ \ = \ \frac{1}{2} \ \ , \ \ \iint_{\mathsf{D''}} \ t \ \ ds \ dt \ = \ \frac{1}{2} \ \ .$$

We therefore have

$$\iint_{\mathsf{D''}} \ s \ \cdot \ \frac{4}{3} \ \ ds \ dt \ = \ \frac{4}{3} \ \cdot \ \frac{1}{2} \ = \ \iint_{\mathsf{D}} \ \frac{1}{2} ( \ x \ - \ 2y \ ) \ \ dx \ dy$$

$$= \ \ \frac{1}{2} \ \iint_{\mathsf{D}} \ x \ \ dx \ dy \ \ - \ \ \iint_{\mathsf{D}} \ y \ \ dx \ dy \ = \ \frac{1}{2} \cdot \frac{4}{9} \ - \ \left(-\frac{4}{9}\right) \ = \ \frac{2}{3}$$

and

$$\iint_{\mathsf{D''}} \ t \ \cdot \ \frac{4}{3} \ \ ds \ dt \ = \ \frac{4}{3} \ \cdot \ \frac{1}{2} \ = \ \iint_{\mathsf{D}} \ \frac{1}{2} ( \ x \ + \ y \ + \ 1 \ ) \ \ dx \ dy$$

$$= \ \ \frac{1}{2} \ \iint_{\mathsf{D}} \ x \ \ dx \ dy \ \ + \ \ \frac{1}{2} \ \iint_{\mathsf{D}} \ y \ \ dx \ dy \ \ + \ \ \frac{1}{2} \ \iint_{\mathsf{D}} \ \ dx \ dy$$

$$= \ \frac{1}{2} \cdot \frac{4}{9} \ + \ \frac{1}{2} \ \left(-\frac{4}{9}\right) \ + \ \frac{1}{2} \cdot \frac{4}{3} \ = \ \frac{2}{3} \ \ ,$$

the third integral being the area of parallelogram $\ ABCD \$ . ]

[EDIT (7/23) -- From the graph of the original parallelogram, we could have immediately surmised that $\iint_{\mathsf{D}} \ x \ \ dx \ dy \ \ > \ 0 \$ and $\ \iint_{\mathsf{D}} \ y \ \ dx \ dy \ \ < \ 0 \$ , since the figure lies mostly to the right of the $\ x-$ axis, but mostly below the $\ y-$ axis. We have developed in the course of this discussion all of the information we need to locate the centroid of parallelogram $\ ABCD \$ :

$$\overline{x} \ = \ \frac{\iint_{\mathsf{D}} \ x \ \ dx \ dy}{\text{area of} \ \mathsf{D}} \ = \ \frac{4/9}{4/3} \ = \ \frac{1}{3} \ \ , \frac{\iint_{\mathsf{D}} \ y \ \ dx \ dy}{\text{area of} \ \mathsf{D}} \ = \ \frac{-4/9}{4/3} \ = \ -\frac{1}{3} \ \ .$$

So the centroid is located at $\ \left( \frac{1}{3}, \ -\frac{1}{3} \right) \$ , which can be confirmed by examining the geometrical symmetry of the parallelogram in the graph above.]