Change of Variables with Double Integrals

Example: Show how the rectangular region S formed by 1≤u≤2 and 0≤v≤2 is transformed by T:(u,v)->(x,y) where x=(u^2)-(v^2) and y=2 u v.

x[u_,v_]:=(u^2)-(v^2);
y[u_,v_]:=2 u v;

Changing variables by eliminating variables

ParametricPlot[{{t+1,0},{2,2-2t},{1,2t},{2-t,2}},{t,0,1},AxesLabel->{u,v},PlotRange->{{0,3},{-1,3}},PlotStyle->Thickness[0.025]]

If we are along the u axis (v=0), then x=(u^2), 1≤u≤2 and y=0.  So, we stay along the x-axis, but now look at the interval from 1≤x≤4.

GraphicsRow[{
ParametricPlot[{{t+1,0},{2,2-2t},{1,2t},{2-t,2}},{t,0,1},AxesLabel->{u,v},PlotRange->{{0,3},{-1,3}},PlotStyle->Thickness[0.025]],ParametricPlot[{{3t+1,0}},{t,0,1},AxesLabel->{x,y},PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]]}]

Now, if we move from (2,0) to (2,2), we know that u remains constant at 2 and so x=4-(v^2) and y=4v.  Our goal at this point is to express this in terms of x and y.  So, v=(y/4) and x=4-((y^2)/16).

GraphicsRow[{
ParametricPlot[{{t+1,0},{2,2-2t},{1,2t},{2-t,2}},{t,0,1},AxesLabel->{u,v},PlotRange->{{0,3},{-1,3}},PlotStyle->Thickness[0.025]],ParametricPlot[{{3t+1,0},{4-((((8t))^2)/16),8t}},{t,0,1},AxesLabel->{x,y},PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]]}]

Next, we move from (2,2) to (1,2), we know that v remains constant at 2 and so x=(u^2)-4 and y=4u.  Our goal at this point is to express this in terms of x and y.  So, v=(u/4) and x=((y^2)/16)-4 where 4≤y≤8.

GraphicsRow[{ParametricPlot[{{t+1,0},{2,2-2t},{1,2t},{2-t,2}},{t,0,1},AxesLabel->{u,v},PlotRange->{{0,3},{-1,3}},PlotStyle->Thickness[0.025]],ParametricPlot[{{3t+1,0},{4-((((8t))^2)/16),8t},{((((4t+4))^2)/16)-4,4t+4}},{t,0,1},AxesLabel->{x,y},PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]]}]

Finally, we move from (1,2) to (1,0).  We know that u remains constant at u=1 and so x=1-(v^2) and y=2v.  Eliminating the variable v, we have x=1-((y^2)/4) where 0≤y≤4. ., we know that v remains constant at 2 and so x=(u^2)-4 and y=4u.  Our goal at this point is to express this in terms of x and y.  So, v=(u/4) and x=((y^2)/16)-4.

GraphicsRow[{
ParametricPlot[{{t+1,0},{2,2-2t},{1,2t},{2-t,2}},{t,0,1},AxesLabel->{u,v},PlotRange->{{0,3},{-1,3}},PlotStyle->Thickness[0.025]],ParametricPlot[{{3t+1,0},{4-((((8t))^2)/16),8t},{((((4t+4))^2)/16)-4,4t+4},{1-((((4t))^2)/4),4t}},{t,0,1},AxesLabel->{x,y},PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]]}]

Creating the regions using vector valued functions

Here, I plot the regions S and R by graphing r for all values u and v in my original region.

r[u_,v_]:={x[u,v],y[u,v]}
s[u_,v_]:={u,v};

GraphicsRow[{
ParametricPlot[{s[u,v]},{u,1,2},{v,0,2},PlotRange->{{0,3},{-1,3}},AxesLabel->{u,v},Frame->False],ParametricPlot[{r[u,v]},{u,1,2},{v,0,2},AxesLabel->{"x","y"},Frame->False,PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]]}]

Create the perimeters - show the mapping

Manipulate[
GraphicsRow[
{ParametricPlot[{s[t+1,0]If[0≤t≤1,1,0]+s[2,2(t-1)] If[1<t≤2,1,0]+s[(2-t)+2,2]If[2<t≤3,1,0]+s[1,2-2(t-3)]If[3<t≤4,1,0]},{t,0,tMax},PlotRange->{{0,3},{-1,3}},AxesLabel->{u,v},PlotStyle->Thickness[0.025]],
ParametricPlot[{r[t+1,0]If[0≤t≤1,1,0]+r[2,2(t-1)] If[1<t≤2,1,0]+r[(2-t)+2,2]If[2<t≤3,1,0]+r[1,2-2(t-3)]If[3<t≤4,1,0]},{t,0,tMax},PlotRange->{{-5,5},{-1,9}},AxesLabel->{x,y},PlotStyle->Thickness[0.025]]}],{tMax,0.1,4}]

Secants and Tangents

Δu=1;Δv=2;

a=r[1+Δu,0]-r[1,0];
b=r[1,0+Δv]-r[1,0];

atemp=Flatten[{a,0}];btemp=Flatten[{b,0}];
Print["The area of the parallelogram is: ",Cross[atemp,btemp][[3]]]

GraphicsRow[{Show[{
(*Secant vectors*)
ParametricPlot[{r[u,v]},{u,1,2},{v,0,2},AxesLabel->{x,y},Frame->False,PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]],ParametricPlot[r[1,0]+t a,{t,0,1},PlotStyle->Thickness[0.02]],
ParametricPlot[r[1,0]+t b,{t,0,1},PlotStyle->Thickness[0.02]]} ,Axes->Automatic],
(*Secant vectors and parallelogram*)
Show[{
ParametricPlot[{r[u,v]},{u,1,2},{v,0,2},AxesLabel->{x,y},Frame->False,PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]],ParametricPlot[r[1,0]+t a,{t,0,1},PlotStyle->Thickness[0.02]],
ParametricPlot[r[1,0]+t b,{t,0,1},PlotStyle->Thickness[0.02]],ParametricPlot[r[1,0]+ a+t b,{t,0,1},PlotStyle->{Thickness[0.01],Dashing[0.02]}],ParametricPlot[r[1,0]+ b+t a,{t,0,1},PlotStyle->{Thickness[0.01],Dashing[0.02]}]} ,Axes->Automatic]}]

ru[u_,v_]=D[r[u,v],u];
rv[u_,v_]=D[r[u,v],v];

rutemp=Flatten[{Δu ru[1,0],0}];rvtemp=Flatten[{Δv rv[1,0],0}];
Print["The area of the parallelogram is: ",Cross[rutemp,rvtemp][[3]]]

GraphicsRow[{Show[{
(*Secant vectors*)
ParametricPlot[{r[u,v]},{u,1,2},{v,0,2},AxesLabel->{x,y},Frame->False,PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]],ParametricPlot[r[1,0]+t Δu ru[1,0],{t,0,1},PlotStyle->Thickness[0.02]],
ParametricPlot[r[1,0]+t Δv rv[1,0],{t,0,1},PlotStyle->Thickness[0.02]]} ,Axes->Automatic],
(*Secant vectors and parallelogram*)
Show[{
ParametricPlot[{r[u,v]},{u,1,2},{v,0,2},AxesLabel->{x,y},Frame->False,PlotRange->{{-5,5},{-1,9}},PlotStyle->Thickness[0.025]],ParametricPlot[r[1,0]+t Δu ru[1,0],{t,0,1},PlotStyle->Thickness[0.02]],
ParametricPlot[r[1,0]+t Δv rv[1,0],{t,0,1},PlotStyle->Thickness[0.02]],ParametricPlot[r[1,0]+ Δu ru[1,0]+t  Δv rv[1,0],{t,0,1},PlotStyle->{Thickness[0.01],Dashing[0.02]}],ParametricPlot[r[1,0]+ Δv rv[1,0]+t Δu ru[1,0],{t,0,1},PlotStyle->{Thickness[0.01],Dashing[0.02]}]} ,Axes->Automatic]}]

Creating the perimeter (scratch)

Manipulate[ParametricPlot[{s[t+1,0]If[0≤t≤1,1,0]+s[2,2(t-1)] If[1<t≤2,1,0]+s[(2-t)+2,2]If[2<t≤3,1,0]+s[1,2-2(t-3)]If[3<t≤4,1,0]},{t,0,tMax},PlotRange->{{0,3},{-1,3}},AxesLabel->{u,v},PlotStyle->Thickness[0.025]],{tMax,0.1,4}]

Manipulate[ParametricPlot[{r[t+1,0]If[0≤t≤1,1,0]+r[2,2(t-1)] If[1<t≤2,1,0]+r[(2-t)+2,2]If[2<t≤3,1,0]+r[1,2-2(t-3)]If[3<t≤4,1,0]},{t,0,tMax},PlotRange->{{-5,5},{-1,9}},AxesLabel->{u,v},PlotStyle->Thickness[0.025]],{tMax,0.1,4}]