Week 4 Discussion Notes

Table of Contents

Change of Variables

We're already familiar with some change of variables: polar coordinates, where x=rcosθx = r\cos\theta, y=rsinθy = r\sin\theta. When integrating, this gives us

dxdy=rdrdθ.\diff{x} \,\diff{y} = r \,\diff{r} \,\diff\theta.

In general, coordinate changes are of the form

(x,y)=(x(u,v),y(u,v))=G(u,v).\p{x, y} = \p{x\p{u, v}, y\p{u, v}} = G\p{u, v}.

In other words, GG changes coordinates from (u,v)\p{u, v} to (x,y)\p{x, y}. With this notation, we get the formula for integration:

dxdy=Jac(G)dudv,\diff{x} \,\diff{y} = \abs{\Jac\p{G}} \,\diff{u} \,\diff{v},

where

JacG=det(xuxvyuyv).\Jac{G} = \det \begin{pmatrix} \displaystyle\pderiv{x}{u} & \displaystyle\pderiv{x}{v} \\[2ex] \displaystyle\pderiv{y}{u} & \displaystyle\pderiv{y}{v} \end{pmatrix}.

In the matrix above, the first column is all the uu-derivatives, and the second column is all the vv-derivatives.

To help you remember this, you should hopefully remember uu-substitution in 1D:

u=u(x)    du=u(x)dx.u = u\p{x} \implies \diff{u} = u'\p{x} \,\diff{x}.

Copying this, we get something like this:

(x,y)=G(u,v)    dxdy=G(u,v)"dudv\p{x, y} = G\p{u, v} \implies \diff{x} \,\diff{y} = ``G'\p{u, v}" \,\diff{u} \,\diff{v}

But instead of G(u,v)G'\p{u, v}, we put the Jacobian (in absolute values) there instead.

Example 1.

With polar coordinates (x,y)=(rcosθ,rsinθ)\p{x, y} = \p{r\cos\theta, r\sin\theta},

JacG=det(cosθrsinθsinθrcosθ)=rcos2θ+rsin2θ=r,\Jac{G} = \det \begin{pmatrix} \cos\theta & -r\sin\theta \\ \sin\theta & \phantom{-}r\cos\theta \end{pmatrix} = r\cos^2\theta + r\sin^2\theta = r,

so

dxdy=rdrdθ,\diff{x} \,\diff{y} = r \,\diff{r} \,\diff\theta,

which is exactly what we expect.

Example 2.

Find a change of variables to evaluate R(x+y)2ex2y2dxdy\displaystyle \iint_{\mathscr{R}} \p{x + y}^2 e^{x^2-y^2} \,\diff{x} \,\diff{y}, where R\mathscr{R} is the square with vertices (1,0),(0,1),(1,0),(0,1)\p{1, 0}, \p{0, 1}, \p{-1, 0}, \p{0, -1}.

Solution.

We can express the region R\mathscr{R} via

R={1x+y1,1xy1}.\mathscr{R} = \left\{ \begin{gathered} -1 \leq x + y \leq 1, \\ -1 \leq x - y \leq 1 \end{gathered} \right\}.

This suggests that we let u=x+yu = x + y and v=xyv = x - y because the region is a lot easier to express in these coordinates:

R={1u11v1}.\mathscr{R} = \left\{ \begin{gathered} -1 \leq u \leq 1 \\ -1 \leq v \leq 1 \end{gathered} \right\}.

Solving for xx and yy, we get

(x,y)=(u+v2,uv2),\p{x, y} = \p{\frac{u + v}{2}, \frac{u - v}{2}},

so the Jacobian is

JacG=det(12121212)=12.\Jac{G} = \det \begin{pmatrix} \dfrac{1}{2} & \phantom{-}\dfrac{1}{2} \\[2ex] \dfrac{1}{2} & -\dfrac{1}{2} \end{pmatrix} = -\frac{1}{2}.

(I switched uu and vv, so this is a little different from what's on the recording.)

Thus,

dxdy=JacGdudv=12dudv.\diff{x} \,\diff{y} = \abs{\Jac{G}} \,\diff{u} \,\diff{v} = \frac{1}{2} \,\diff{u} \,\diff{v}.

Applying the change of variables to the integral,

R(x+y)2ex2y2dxdy=121111u2euvdudv=2e.\begin{aligned} \iint_{\mathscr{R}} \p{x + y}^2 e^{x^2-y^2} \,\diff{x} \,\diff{y} &= \frac{1}{2} \int_{-1}^1 \int_{-1}^1 u^2 e^{uv} \,\diff{u} \,\diff{v} \\ &= \boxed{\frac{2}{e}}. \end{aligned}