Tutorials › Calculus III › Mapping a Rectangle onto a Triangle

Jacobians and General Substitutions · Tutorial 688 of 999

Mapping a Rectangle onto a Triangle

Use the map from the unit square to a triangle to transform integrals, compute the Jacobian, and verify the resulting polynomial integrals.

Advanced 10 min read

What You'll Learn

  • Describe how the map \(x=u,\ y=(1-u)v\) sends the unit square to a triangle.
  • Find the Jacobian determinant and explain its geometric meaning.
  • Identify where the map is invertible and how its collapsed boundary is handled.
  • Set up transformed integrals using the absolute Jacobian factor.
  • Evaluate and check polynomial integrals over the triangle.

Why Map a Square onto a Triangle?

A triangular region has sloping bounds, so integrating over it directly can require keeping track of how one limit depends on another variable. A carefully chosen substitution can replace those sloping bounds with the fixed bounds of a rectangle. The cost of changing coordinates is a Jacobian factor, which accounts for the change in area.

For the triangle with vertices \((0,0)\), \((1,0)\), and \((0,1)\), the map \(x=u,\ y=(1-u)v\) has exactly this effect. The \(u\)-coordinate determines the horizontal position, and \(v\) determines the fraction of the available vertical height at that position.

Definition: Let \(S=[0,1]\times[0,1]\) be the unit square and define \(F:S\to\mathbb R^2\) by \(F(u,v)=(u,(1-u)v)\). Its image is the triangle \(T=\{(x,y):0\le x\le 1,\ 0\le y\le 1-x\}\).

Understanding the Map

Since \(x=u\), the horizontal coordinate ranges from \(0\) to \(1\). Once \(u\) is fixed, the coordinate \(y=(1-u)v\) ranges from \(0\) to \(1-u\) as \(v\) ranges from \(0\) to \(1\). Replacing \(u\) by \(x\), this gives \(0\le y\le 1-x\), precisely the vertical slice of \(T\) at \(x\).

The square’s edges also show how the boundary is mapped. The edge \(v=0\) maps to \(y=0\), the bottom of the triangle. The edge \(v=1\) maps to \(y=1-x\), its sloping edge. The edge \(u=0\) maps to \(x=0\), its left edge. Finally, when \(u=1\), \(y=0\) for every \(v\): the entire right edge of the square collapses to the vertex \((1,0)\).

That last feature matters. In the interiors, the map is one-to-one: if \(0\le x<1\), the inverse coordinates are \(u=x\) and \(v=y/(1-x)\). At \(x=1\), this inverse formula is undefined, but the corresponding part of the triangle is only one point. The collapsed square edge and that triangle vertex are boundary sets of area zero. Thus the map is one-to-one on the interiors, while its boundary behaviour does not add multiplicity to the area integral.

The Jacobian and the Change of Variables

The Jacobian matrix records the partial derivatives of the transformed coordinates with respect to \(u\) and \(v\). Its determinant gives the signed local area-scaling factor. For this map, the matrix and determinant are

$$ \frac{\partial(x,y)}{\partial(u,v)} = \begin{pmatrix} \frac{\partial x}{\partial u} & \frac{\partial x}{\partial v}\\ \frac{\partial y}{\partial u} & \frac{\partial y}{\partial v} \end{pmatrix} = \begin{pmatrix} 1 & 0\\ -v & 1-u \end{pmatrix}, \qquad \det\frac{\partial(x,y)}{\partial(u,v)}=1-u. $$

On the unit square, \(1-u\ge0\), so the absolute Jacobian is \(|1-u|=1-u\). It becomes zero at \(u=1\), exactly where the map collapses an edge to a point. At every interior point with \(u<1\), the determinant is positive.

Change-of-variables formula: For an integrable function \(f\) on \(T\), this map gives \(\iint_T f(x,y)\,dA=\int_0^1\int_0^1 f(u,(1-u)v)(1-u)\,dv\,du\). The map is continuously differentiable, one-to-one on the interiors, and has nonzero Jacobian there. The boundary where the Jacobian vanishes has area zero and does not affect the integral.

The factor \(1-u\) is essential: it measures how much area a small patch of the square contributes after mapping. At small \(u\), a vertical change in \(v\) is stretched by nearly \(1\); near \(u=1\), the available triangle height shrinks toward zero.

How to Set Up an Integral

1
Identify the triangle.
Write its bounds as \(0\le x\le1\) and \(0\le y\le1-x\).
2
Substitute the coordinates.
Use \(x=u\) and \(y=(1-u)v\) in the integrand.
3
Multiply by the absolute Jacobian.
Include the factor \(1-u\), not just the transformed integrand.
4
Integrate over the square.
Use \(0\le v\le1\) and \(0\le u\le1\), and check the result where practical.

Worked Polynomial Integrals

Worked Example: Integrating \(x+y\) over the Triangle

Evaluate \(\iint_T (x+y)\,dA\). First substitute \(x=u\) and \(y=(1-u)v\), then include the Jacobian:

$$ \iint_T(x+y)\,dA = \int_0^1\int_0^1 \bigl(u+(1-u)v\bigr)(1-u)\,dv\,du. $$

For the inner integral, treat \(u\) as constant and integrate in \(v\):

$$ \int_0^1 \bigl(u+(1-u)v\bigr)(1-u)\,dv =(1-u)\left[uv+\frac{1-u}{2}v^2\right]_0^1 =(1-u)\left(u+\frac{1-u}{2}\right) =\frac{1-u^2}{2}. $$

Now integrate in \(u\):

$$ \int_0^1\frac{1-u^2}{2}\,du =\left[\frac{u}{2}-\frac{u^3}{6}\right]_0^1 =\frac12-\frac16 =\frac13. $$

Check directly using the triangle’s vertical bounds. The inner integral is \(\int_0^{1-x}(x+y)\,dy=x(1-x)+(1-x)^2/2=(1-x^2)/2\). Therefore the original integral is \(\int_0^1(1-x^2)/2\,dx=1/3\), agreeing with the transformed result.

Worked Example: Integrating \(x^2y\) over the Triangle

Under the substitution, \(x^2y=u^2(1-u)v\). Multiplication by the Jacobian contributes another factor \(1-u\):

$$ \iint_T x^2y\,dA =\int_0^1\int_0^1 u^2(1-u)^2v\,dv\,du. $$

Integrate first in \(v\), then expand the remaining polynomial:

$$ \int_0^1 u^2(1-u)^2\left[\frac{v^2}{2}\right]_0^1\,du =\frac12\int_0^1 (u^2-2u^3+u^4)\,du =\frac12\left(\frac13-\frac12+\frac15\right) =\frac{1}{60}. $$

For a direct check, integrate \(x^2y\) over the triangle in its original bounds. The inner integral is \(\int_0^{1-x}x^2y\,dy=x^2(1-x)^2/2\), so the full integral is \(\frac12\int_0^1(x^2-2x^3+x^4)\,dx=\frac12(1/3-1/2+1/5)=1/60\). The two evaluations agree.

Worked Example: Integrating \(x^2+y^2\) over the Triangle

Transform each term separately. The integrand, including the Jacobian, becomes \(\bigl(u^2+(1-u)^2v^2\bigr)(1-u)\):

$$ \iint_T(x^2+y^2)\,dA =\int_0^1\int_0^1 \left(u^2+(1-u)^2v^2\right)(1-u)\,dv\,du. $$

Integrating in \(v\) gives

$$ \int_0^1\left(u^2(1-u)+\frac{(1-u)^3}{3}\right)\,du. $$

Evaluate the two terms individually:

$$ \int_0^1u^2(1-u)\,du =\int_0^1(u^2-u^3)\,du =\frac13-\frac14=\frac1{12}, $$ $$ \frac13\int_0^1(1-u)^3\,du =\frac13\left[-\frac{(1-u)^4}{4}\right]_0^1 =\frac1{12}. $$

The result is \(1/12+1/12=1/6\). To check directly, the \(x^2\) contribution is \(\int_0^1x^2(1-x)\,dx=1/12\), while the \(y^2\) contribution is \(\int_0^1(1-x)^3/3\,dx=1/12\). Their sum is \(1/6\), as found by substitution.

Why the Substitution Works

At a fixed \(u\), the square’s vertical interval \(0\le v\le1\) maps to the triangle’s vertical interval \(0\le y\le1-u\). Indeed, \(dy=(1-u)\,dv\) when \(u\) is fixed. This explains the scale factor intuitively: the vertical length has been multiplied by \(1-u\). The full Jacobian also accounts for how the horizontal coordinate varies, and here \(x=u\) contributes no additional horizontal scaling. The determinant calculation confirms that the area factor is \(1-u\).

More generally, if \(m,n\) are nonnegative integers, substitution gives the useful setup

$$ \iint_T x^m y^n\,dA = \int_0^1\int_0^1 u^m(1-u)^{n+1}v^n\,dv\,du. $$

The exponent \(n+1\) on \(1-u\) has two sources: \(y^n\) contributes \((1-u)^n\), and the Jacobian contributes one more factor of \(1-u\). Keeping those sources distinct is a useful way to audit the transformed integrand.

A Common Jacobian Mistake

A frequent error is to substitute \(x=u,\ y=(1-u)v\) into the integrand but forget to multiply by \(1-u\). For example, the area of the triangle is not the integral of \(1\) over the square without a Jacobian. That incorrect calculation gives

$$ \int_0^1\int_0^1 1\,dv\,du=1, $$

even though the triangle has area \(1/2\). The correction is to include the absolute Jacobian:

$$ \iint_T1\,dA =\int_0^1\int_0^1(1-u)\,dv\,du =\int_0^1(1-u)\,du =\left[u-\frac{u^2}{2}\right]_0^1 =\frac12. $$

This also verifies the basic geometry. The triangle’s area is half the area of the unit square, and the Jacobian-weighted integral produces exactly that value.

When to Use This Map

This substitution is especially convenient when a region has bounds \(0\le x\le1,\ 0\le y\le1-x\), and the transformed integrand is manageable on a square. It also provides a reusable model for parameterizing a vertical slice whose height decreases linearly to zero. The method does not remove the need to check the region: if the triangle has different vertices or bounds, the given map may not describe it without additional changes.

Before evaluating, check three things: the image of the parameter region matches the desired triangle, the inverse is unique in the interior, and the absolute Jacobian is included. Here the determinant vanishes only on the boundary edge \(u=1\); it is nonzero throughout the interior, where the change-of-variables formula applies.

Check Your Understanding

Use the map \(x=u,\ y=(1-u)v\) and its Jacobian to answer the following.

  1. What are the images of the square edges \(v=0\), \(v=1\), and \(u=0\)?
  2. Find the Jacobian determinant and its absolute value on the unit square.
  3. Why does the collapsed edge \(u=1\) not cause a multiplicity factor in the area integral?
  4. Set up, but do not evaluate, the transformed integral for \(\iint_T xy\,dA\).
  5. What incorrect area would result from omitting the Jacobian, and what is the correct area?