# MATH 251: Calculus 3, SET8

## 15: Multiple Integrals

### 15.9: Change of Variables in Multiple Integrals

These problems are done with the CAS. See Hand Solutions for details.

#### 1. [1060/2]

syms u v x y
x = u^2 + u*v, y = u*v^2 % transformation
x =
y =
JM = jacobian([x y], [u v]) % Jacobian matrix [MATLAB command: jacobian]
JM =
J = det(JM) % Jacobian (determinant)
J =
JF = abs(J) % JacFac (Jacobian factor): used in change of variables in multiple integrals
JF =

#### 2. [1060/6]

syms u v w x y z
x = u + v*w, y = v + u*w, z = w + u*v
x =
y =
z =
JM = jacobian([x y z], [u v w])
JM =
J = det(JM)
J =
JF = abs(J)
JF =

#### 3. [1060/8]

syms u v x y
x = v, y = u*(1+v^2)
x = v
y =
figure
U = [0 1 1 0 0]; V = [0 0 1 1 0];
fill(U,V,'y'); grid on
axis equal; axis([-0.5 1.5 -0.5 1.5])
xticks(0:1); yticks(0:1)
xlabel('u'); ylabel('v')
title('SET8, 1060/8: square region in uv-plane')
%
figure
fsurf(x,y,sym(0), [0 1 0 1], 'm', 'EdgeColor', 'none')
axis equal; axis([-0.5 1.5 -0.5 2.5])
view(0,90); xticks(0:1); yticks(0:2)
xlabel('x'); ylabel('y')
title('SET8, 1060/8: transformed region in xy-plane')

#### 4. [1060/14]

Hyperbolas: , lines .
syms u v x y
eqs = [u == x*y, v== y/x]
eqs =
T1 = solve(eqs, [x y]), T2 = [T1.x T1.y], T = T2(2,:) % T is our transformation.
T1 = struct with fields:
x: [2Ã—1 sym] y: [2Ã—1 sym]
T2 =
T =
x = T(1), y = T(2)
x =
y =
%
figure
U = [1 4 4 1 1]; V = [1 1 4 4 1];
fill(U,V,'y'); grid on
axis equal; axis([0 5 0 5])
xticks(0:5); yticks(0:5)
xlabel('u'); ylabel('v')
title('SET8, 1060/14: square region in uv-plane')
%
figure
fsurf(x,y,sym(0), [1 4 1 4], 'm', 'EdgeColor', 'none')
axis equal; axis([0 3 0 5])
view(0,90); xticks(0:3); yticks(0:5)
xlabel('x'); ylabel('y')
title('SET8, 1060/14: transformed region in xy-plane')

#### 5. [1060/16]

% The direct statement of the problem gives us everything we need to
% convert the multiple integral EXCEPT intervals over which u & v vary.
% So let's determine these first and verify our work with graphics.
syms U V u v x y
eqs = [x == (u+v)/4 y == (v-3*u)/4]
eqs =
Tinv1 = solve(eqs, [u v]), Tinv2 = [Tinv1.u Tinv1.v], Tinv = Tinv2(1,:) % Tinv is our inverse transformation.
Tinv1 = struct with fields:
u: [1Ã—1 sym] v: [1Ã—1 sym]
Tinv2 =
Tinv =
U = Tinv(1), V = Tinv(2)
U =
V =
u_min = subs(U, [x y], [-1 3]), u_max = subs(U, [x y], [1 -3])
u_min =
u_max = 4
v_min = subs(V, [x y], [-1 3]), v_max = subs(V, [x y], [1 5])
v_min = 0
v_max = 8
%
figure
U = [-4 4 4 -4 -4]; V = [0 0 8 8 0];
fill(U,V,'y'); grid on
axis equal; axis([-5 5 -1 9])
xticks(-4:4:4); yticks(0:4:8)
xlabel('u'); ylabel('v')
title('SET8, 1060/16: square region in uv-plane') % Looks good: horizontal and vertical boundaries.
%
figure
x = (u+v)/4, y = (v-3*u)/4 % transformation T
x =
y =
fsurf(x,y,sym(0), [-4 4 0 8], 'm', 'EdgeColor', 'none')
axis equal; axis([-2 4 -4 6])
view(0,90); xticks(-1:3); yticks(-3:5)
xlabel('x'); ylabel('y')
title('SET8, 1060/16: transformed region in xy-plane') % Indeed, region bounded by parallelogram.
%
% Now we're ready to change variables in the integral from x and y to u and v.
x = (u+v)/4, y = (v-3*u)/4 % transformation T
x =
y =
JM = jacobian([x y], [u v]) % Jacobian matrix
JM =
J = det(JM) % Jacobian (determinant)
J =
JF = abs(J) % JacFac (Jacobian factor): used in change of variables in multiple integrals
JF =
intg = 4*x + 8*y % integrand in terms of u and v
intg =
I = int(int(intg * JF, u, -4, 4), v, 0, 8) % Don't forget your JacFac! (just like cyl & sph coord integrals)
I = 192

#### 6. [1060/18]

Same drill as in #16.
% Determine u & v region; verify with graphics.
syms U V r u v x y theta
eqs = [x == sqrt(2)*u - sqrt(2/3)*v y == sqrt(2)*u + sqrt(2/3)*v] % transformation T
eqs =
Tinv1 = solve(eqs, [u v]), Tinv2 = [Tinv1.u Tinv1.v], Tinv = Tinv2(1,:) % Tinv is our inverse transformation.
Tinv1 = struct with fields:
u: [1Ã—1 sym] v: [1Ã—1 sym]
Tinv2 =
Tinv =
U = Tinv(1), V = Tinv(2)
U =
V =
se = simplify(subs(x^2-x*y+y^2==2, [x y], [sqrt(2)*u - sqrt(2/3)*v, sqrt(2)*u + sqrt(2/3)*v]))
se =
% Slanted ellipse in the xy-plane is the image of the unit circle in the uv-plane.
% So we'll switch to polar coordinates. Observe the two transformations.
%
figure
R = [0 1 1 0 0]; THETA = [0 0 2*pi 2*pi 0];
fill(R,THETA,'y'); grid on
axis equal; axis([0 1 0 2*pi])
xlabel('r'); ylabel('\theta')
title('SET8, 1060/18: rectangular region in r\theta-plane') % Looks good: horizontal and vertical boundaries.
%
figure
u = r*cos(theta), v = r*sin(theta) % polar coorindates
u =
v =
fsurf(u,v,sym(0), [0 1 0 2*pi], 'g', 'EdgeColor', 'none'); hold on % unit circle in uv-plane
plot3(0,0,0, 'k+', 'MarkerSize', 16)
axis equal; axis([-1 1 -1 1])
view(0,90); xticks(-1:1); yticks(-1:1)
xlabel('u'); ylabel('v')
title('SET8, 1060/18: transformed region in uv-plane') % circular disk
%
figure
x = sqrt(2)*u - sqrt(2/3)*v, y = sqrt(2)*u + sqrt(2/3)*v % transformation T
x =
y =
fsurf(x,y,sym(0), [0 1 0 2*pi], 'm', 'EdgeColor', 'none'); hold on
plot3(0,0,0, 'k+', 'MarkerSize', 16)
axis equal; axis([-2 2 -2 2])
view(0,90); xticks(-2:2); yticks(-2:2)
xlabel('x'); ylabel('y')
title('SET8, 1060/18: transformed region in xy-plane') % Indeed, region bounded by a slanted ellipse.
%
% Now we're ready to change variables in the integral from x and y to u and v, then to polar coordinates.
% Recall: x = sqrt(2)*u - sqrt(2/3)*v, y = sqrt(2)*u + sqrt(2/3)*v % transformation T
JM_uv = sym([sqrt(2) -sqrt(2/3);
sqrt(2) sqrt(2/3)]) % Jacobian matrix
JM_uv =
J_uv = det(JM) % Jacobian (determinant)
J_uv =
JF_uv = abs(J) % JacFac in uv-world
JF_uv =
JF_r_theta = JF_uv * r % JacFac in polar world
JF_r_theta =
intg = simplify(x^2 - x*y + y^2) % integrand in terms of u and v then r and theta
intg =
I = int(int(intg * JF_r_theta, r, 0, 1), theta, 0, 2*pi)
I =
I_appx = double(I)
I_appx = 7.2552

#### 7. [1060/20]

In #16 and #18, graphics were first provided to convince you that the transformed integral was valid.
Of course, this involves a lot of code and obscures the relatively easy setup at the end.
So typically I'll do all the graphics and you just do the change of variables!
% YOUR PART: change of variables in the integral and computuation thereof.
syms u v x y positive % As you'll see from the graphics, these variables have positive values.
T = solve([u==x*y v==x*y^2], [x y]), T = [T.x T.y] % transformation that gives x & y in terms of u & v.
T = struct with fields:
x: [1Ã—1 sym] y: [1Ã—1 sym]
T =
JM = jacobian(T, [u v]), J = det(JM), JF = abs(J) % matters Jacobian
JM =
J =
JF =
intg = subs(y^2, y, v/u) % integrand
intg =
I = int(int(intg * JF, u, 1, 2), v, 1, 2) % transformed integral computed
I =
% MY PART: Pix galore!
%
figure
U = [1 2 2 1 1]; V = [1 1 2 2 1];
fill(U,V,'y'); grid on
axis equal; axis([1 2 1 2])
xticks(1:2); yticks(1:2)
xlabel('u'); ylabel('v')
title('SET8, 1060/20: square region in uv-plane')
%
figure
x = u^2 / v, y = v/u % transformation T
x =
y =
fsurf(x,y,sym(0), [1 2 1 2], 'm', 'EdgeColor', 'none')
axis equal; axis([0 4 0 2])
view(0,90); xticks(0:4); yticks(0:2)
xlabel('x'); ylabel('y')
title('SET8, 1060/20: transformed region in xy-plane') % region bounded by hyperbolas

#### 8. [1060/22]

Can you say "thermodynamics?" I knew you could...
The area is equivalent to .
syms a b c d u v x y positive % as in #20
assume(0<a<b); assume(0<c<d) % from problem statement
T = solve([u==x*y v==x*y^1.4], [x y]), T = [T.x T.y] % transformation giving x & y in terms of u & v.
T = struct with fields:
x: [1Ã—1 sym] y: [1Ã—1 sym]
T =
JM = jacobian(T, [u v]), J = det(JM), JF = abs(J) % matters Jacobian
JM =
J =
JF =
A = int(int(1 * JF, u, a, b), v, c, d) % transformed integral computed: area of Carnot cycle region
A =
%
figure
U = [1 2 2 1 1]; V = [3 3 5 5 3];
fill(U,V,'y'); grid on
axis equal; axis([1 2 3 5])
xticks(1:2); yticks(3:5)
xlabel('u'); ylabel('v')
title('SET8, 1060/22: rectangular region in uv-plane')
%
figure
x = u^3.5 / v^2.5, y = v^2.5 / u^2.5 % transformation T
x =
y =
fsurf(x,y,sym(0), [1 2 3 5], 'm', 'EdgeColor', 'none') % Here [a b c d] = [1 2 3 5].
axis([-0.1 0.8 -10 60])
view(0,90); xticks(0:0.1:0.8); yticks(0:10:60)
xlabel('x'); ylabel('y')
title('SET8, 1060/22: Carnot cycle region') %

#### 9. [1060/24]

syms u v x y
T = solve([u == x-y v == x+y], [x y]), T = [T.x T.y] % transformation giving x & y in terms of u & v.
T = struct with fields:
x: [1Ã—1 sym] y: [1Ã—1 sym]
T =
JM = jacobian(T, [u v]), J = det(JM), JF = abs(J) % matters Jacobian
JM =
J =
JF =
intg = simplify( subs((x+y)*exp(x^2-y^2), [x y], T) )
intg =
I = int(int(intg * JF, u, 0, 2), v, 0, 3) % transformed integral computed
I =
I_appx = double(I)
I_appx = 99.1072
%
figure
U = [0 2 2 0 0]; V = [0 0 3 3 0];
fill(U,V,'y'); grid on
axis equal; axis([0 2 0 3])
xticks(0:2); yticks(0:3)
xlabel('u'); ylabel('v')
title('SET8, 1060/24: rectangular region in uv-plane')
%
figure
x = (u+v)/2, y = (v-u)/2 % transformation T
x =
y =
fsurf(x,y,sym(0), [0 2 0 3], 'm', 'EdgeColor', 'none') % Here [a b c d] = [1 2 3 5].
axis equal; axis([-0.5 3.0 -1.5 2.0])
view(0,90); xticks(0:3); yticks(-1:2)
xlabel('x'); ylabel('y')
title('SET8, 1060/24: transformed region in xy-plane') %

#### 10. [1063/56]

Here's a 3D problem in the Chapter Review: Find the volume in the first octant bounded by the surface and the coordinate planes.
syms u v w x y z
JM = jacobian([u^2 v^2 w^2], [u v w]), J = det(JM), JF = J
JM =
J =
JF =
V = int(int(int(1*JF, w, 0, 1-u-v), v, 0, 1-u), u, 0, 1)
V =
V_appx = double(V) in cm^3
V_appx = 0.0111
%
eq = sqrt(x) + sqrt(y) + sqrt(z) == 1
eq =
fimplicit3(eq, [0 1], 'MeshDensity', 20)
axis equal; axis([0 1 0 1 0 1])
xticks(0:1); yticks(0:1); zticks(0:1)
xlabel('x'); ylabel('y'); zlabel('z')
title('SET8, 1063/56'); view(118,12)