VC.08 Transforming 3D Integrals
TUTORIALS

\(Off[General::spell]; 
Off[General::spell1]; 

    \(Off[ParametricPlot3D::ppcom]; \)\)Off[ParametricPlot::ppcom]; Off[Plot::plnr]; SetOptions[Limit, Analytic -> True];

CMView = {2.7, 1.6, 1.2};

Vector Drawer

BeginPackage["Vector3D`", "Graphics`Colors`"];

\(Axes3D::"usage" = 
      "Axes3D[a, b] creates a Graphics3D object of cartesian axes with x, y, and z running from -a/3 to a, and with axes labels b units beyond the tips of the axes.  Axes3D[a] is Axes3D[a, a/8]."; 

    \(Perpend::"usage" = 
      "Perpend[a] returns a unit vector which is perpendicular to the vector a."; \)\)Arrow::"usage" = 
      "Arrow[a] produces a 2 or 3 dimensional vector from the origin to a. \
Arrow[a, Tail -> tail] gives a vector from tail to a."; Vector::"usage" = 
      "Vector[a, b] gives a 2D or 3D vector from a to b."; ArrowHead::"usage" = 
      "ArrowHead[a, vec] produces an arrowhead with its tip placed at the \
point a, pointing in the direction of the vector vec."; Tail::"usage" = 
      "Tail -> point puts the tail of the vector at point."; Norm::"usage" = 
      "Norm[vec] returns the Euclidean length of vec."; Normalize::"usage" = 
      "Normalize[vec] returns a unit vector in the direction of vec, \
provided vec is nonzero."; Aperture::"usage" = 
      "Aperture is the ratio of the radius of the base to the length of the \
head of a vector."; TipSize::"usage" = 
      "TipSize specifies an absolute size for the inner tip length of the \
head of a vector."; TipRatio::"usage" = 
      "TipRatio is the ratio of the inner length of the arrowhead to the \
length of the shaft of a vector."; HeadRatio::"usage" = 
      "HeadRatio is the ratio of the outer length of the arrowhead to the \
length of the shaft of a vector."; HeadSize::"usage" = 
      "HeadSize specifies an absolute size for the head of a vector."; 
    ScaleFactor::"usage" = 
      "ScaleFactor specifies the amount to scale a vector in length and may \
be either a number or a pure function."; ZeroVectorPointSize::"usage" = 
      "ZeroVectorPointSize is the size of the point used to represent a \
zero vector."; Options[Vector] = 
      Options[Arrow] = 
        Options[ArrowHead] = {HeadRatio -> 0.18, 
            TipRatio -> 0.14, Aperture -> 0.3, 
            ScaleFactor -> 1, HeadType -> Polygon, 
            ShaftQ -> True, EdgesQ -> True, 
            VectorColor -> RGBColor[0, 0, 1], ShaftWidth -> 0.005, 
            ZeroVectorPointSize -> 0.01}; Begin["`Private`"]; SetOptions[ParametricPlot, AspectRatio -> Automatic]; SetOptions[Plot, AspectRatio -> Automatic]; SetOptions[Graphics, AspectRatio -> Automatic]; Axes3D[u_, v_] := 
      Graphics3D[{{Blue, Line[{{-(u/3), 0, 0}, {u, 0, 0}}]}, 
          Text["x", {u + v, 0, 0}], {Blue, 
            Line[{{0, -(u/3), 0}, {0, u, 0}}]}, 
          Text["y", {0, u + v, 0}], {Blue, 
            Line[{{0, 0, -(u/3)}, {0, 0, u}}]}, 
          Text["z", {0, 0, u + v}]}]; Axes3D[u_] := Axes3D[u, (u/8)]; Norm[a_?VectorQ] := N[(Sqrt[a . a])]; Normalize[a_?VectorQ] := If[a . a == 0, a, (a/Norm)[a]]; Perpend[a_?VectorQ] := 
      Normalize[{a[[2]], 
            -a[[1]]}] /; 
        Length[a] == 2Perpend[a_?VectorQ] := 
      Normalize[
          If[a[[1]] == 0, {1, 0, 0}, {0, 
              a[[3]], 
              -a[[2]]}]] /; 
        Length[a] == 3Base3D = 
      Table[{Cos[((2 k π)/8.) ], Sin[((2 k π)/8.) ]}, {k, 0, 
          8}]; Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, sw, ht, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, sw, ht, hs, hr, ts, tr, ap, sf, vc, zvps} = 
            {ShaftQ, ShaftWidth, HeadType, HeadSize, HeadRatio, TipSize, 
                  TipRatio, Aperture, ScaleFactor, VectorColor, 
                  ZeroVectorPointSize} /. {opts} /. Options[Vector]; 
          If[from == to, 
            Return[Graphics[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]; tr = 0.75 hr]; 
          If[NumberQ[ts], tr = (ts/Norm)[diff]]; 
          Graphics[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              With[{trans = ap hr Norm[diff] Perpend[diff]}, {vc, 
                  Thickness[sw], 
                  ht[{tip, tip - hr diff + trans, tip - tr diff, 
                      tip - hr diff - trans, tip}]}]}]] /; 
        Length[from] == Length[to] == 2Vector[from_?VectorQ, to_?VectorQ, opts___] := 
      Module[{sq, eq, sw, hs, hr, tr, ap, sf, vc, zvps, diff = to - from, 
            tip}, {sq, eq, sw, hs, hr, ap, sf, vc, zvps} = 
            {ShaftQ, EdgesQ, ShaftWidth, HeadSize, HeadRatio, Aperture, 
                  ScaleFactor, VectorColor, ZeroVectorPointSize} /. {opts}
                   /. Options[Vector]; 
          If[from == to, 
            Return[Graphics3D[{PointSize[zvps], vc, Point[from]}]]]; 
          diff = If[NumberQ[N[sf]], sf diff, sf[diff]]; tip = from + diff; 
          If[NumberQ[hs], hr = (hs/Norm)[diff]]; tr = (hr/2); 
          Graphics3D[{
              If[sq, {vc, Thickness[sw], Line[{from, tip - tr diff}]}, {}], 
              If[eq, {}, EdgeForm[]], {SurfaceColor[vc], 
                With[{temp = Perpend[diff]}, 
                  (Polygon[Append[#1, tip]]&)/@
                    Partition[
                      (tip - hr diff + #1&)/@
                        ((ap hr Norm[diff] Base3D) . {temp, 
                              Normalize[temp\[Cross]diff]}), 2, 1]]}}]] /; 
        Length[from] == Length[to] == 3Arrow[a_, Tail -> b_, opts___] := Vector[b, a + b, opts]Arrow[a_, opts___] := Vector[Table[0, {Length[a]}], a, opts]\(ArrowHead[a_, b_, opts___] := 
      Vector[a - b, a, ShaftQ -> False, opts]; 

End[]; 

    \(EndPackage[]; \)\)

Graphics`Colors`GosiaGreen = RGBColor[0,  0.392187,  0];

Spherical Setup

\(Clear[polar]; 

    polar[{x_, y_, z_}] := {\@\(x\^2 + y\^2 + z\^2\), ArcTan[y\/x], 
        ArcCos[z\/\@\(x\^2 + y\^2 + z\^2\)]}; 
Clear[X, length]; 

    length[X_] := \@\(X . X\); 
\(rr = 3; \)\)R = 5; scale = 0.8; red = RGBColor[1, 0, 0]; blue = RGBColor[0, 0, 1]; color1 = RGBColor[0.8, 0.2, 0.8]; color2 = RGBColor[0.2, 0.8, 0.2]; black = RGBColor[0, 0, 0]; \(Clear[axes]; 

    axes := Graphics3D[{Line[{X, {1.5\ rr, 0, 0}}], 
          Line[{X, {0, 1.5\ rr, 0}}], Line[{X, {0, 0, 2\ rr}}]}]; 

    Clear[xyplane]; 

    xyplane := 
      Graphics3D[
        Polygon[{{\(-2\)\ rr, \(-2\)\ rr, 0}, {\(-2\)\ rr, 2\ rr, 0}, {2\ rr, 
              2\ rr, 0}, {2\ rr, \(-2\)\ rr, 0}}]]; 
\(X = {0, 0, 0}; \)\)origin = Graphics3D[{black, Point[X]}]; Z = {2, 3, 5}; \(Clear[point]; 

    point := Graphics3D[{red, PointSize[0.03], Point[scale\ Z]}]; 

    \(Z0 = {0, 0, length[0.8\ Z]}; \)\)\(Clear[zpoint]; 
zpoint = Graphics3D[{black, Point[Z0]}]; 

    \(XY = scale\ Z\ {1, 1, 0}; \)\)\(Clear[xypoint]; 
xypoint := Graphics3D[{black, Point[XY]}]; 

    \(X0 = {length[scale\ Z\ {1, 1, 0}], 0, 0}; \)\)xpoint = Graphics3D[{black, Point[X0]}]; Y0 = {0, length[scale Z {1, 1, 0}], 0}; ypoint = Graphics3D[{black, Point[Y0]}]; \(Clear[ray]; 
ray := Graphics3D[{blue, Line[{X, scale\ Z}]}]; 

    Clear[ray1]; 
ray1 := Graphics3D[{color1, Line[{scale\ Z, Z}]}]; 

    Clear[xyray]; 
xyray := Graphics3D[{red, Line[{X, Z\ {1, 1, 0}}]}]; 

    \(rays := {ray, xyray}; \)\)xyaux = 
      (length[0.8 Z] (0.8 Z {1, 1, 0}))/
        length[0.8 Z {1, 1, 0}]; \(Clear[zarc]; 

    zarc = Graphics3D[{blue, 
          Line[Table[
              \(Cos[t]\ \) {0, 0, length[0.8\ Z]} + Sin[t]\ xyaux, {t, 0, 
                \(polar[0.8\ Z]\)[[3
                  ]],  .1}]]}]; 
Clear[zarc1]; 

    zarc1 = Graphics3D[{color1, 
          Line[Table[
              \(Cos[t]\ \) {0, 0, length[0.8\ Z]} + Sin[t]\ xyaux, {t, 
                \(polar[0.8\ Z]\)[[3]], 
                1,  .1}]]}]; 
Clear[zarc2]; 

    zarc2 = Graphics3D[{color1, 
          Line[Table[
              \(Cos[t]\ \) {0, 0, length[0.8\ Z]} + Sin[t]\ xyaux, {t, 
                \(-0.8\), 0,  .1}]]}]; 
Clear[xyarc]; 

    xyarc = Graphics3D[{blue, 
          Line[Table[
              Cos[t]\ X0 + Sin[t]\ Y0, {t, 0, 
                \(polar[XY]\)[[2
                  ]],  .1}]]}]; 
Clear[xyarc1]; 

    xyarc1 = Graphics3D[{color1, 
          Line[Table[Cos[t]\ X0 + Sin[t]\ Y0, {t, \(- .5\), 0,  .1}]]}]; 

    Clear[xyarc2]; 

    xyarc2 = Graphics3D[{color1, 
          Line[Table[
              Cos[t]\ X0 + Sin[t]\ Y0, {t, 
                \(polar[XY]\)[[2]], 
                \(polar[XY]\)[[2]] + 
                  0.3,  .1}]]}]; 
Clear[stick]; 

    stick = Graphics3D[{red, Line[{scale\ Z, XY}]}]; 

    \(xaxislabel = Text["x", {0.363, 0.26}]; \)\)yaxislabel = Text["y", {0.73, 0.3}]; zaxislabel = Text["z", { .5, 0.67}]; stickplot = 
      Show[xyplane, axes, ray, point, Boxed -> False, 
        ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; rho = Text["r", {0.53, 0.45}]; rlabel = 
      Show[xyplane, axes, ray, point, Boxed -> False, 
        ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {rho, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; phi = Text["s", {0.55, 0.57}]; slabel = 
      Show[xyplane, zpoint, axes, ray, point, zarc, zarc1, zarc2, 
        Boxed -> False, ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {phi, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; theta = Text["t", { .5, 0.3}]; tlabel = 
      Show[xyplane, axes, xypoint, xpoint, ray, stick, point, xyarc, xyarc1, 
        xyarc2, Boxed -> False, ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {theta, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity]; all = 
      Show[xyplane, axes, ray, stick, point, zpoint, xpoint, xypoint, xyarc, 
        xyarc1, xyarc2, zarc, zarc1, zarc2, Boxed -> False, 
        ViewPoint -> {2.747, 1.594, 1.168}, 
        Epilog -> {theta, phi, rho, xaxislabel, yaxislabel, zaxislabel}, 
        DisplayFunction -> Identity];

Crisscross

\(Clear[x]; 

    crisscross = 
      Plot[{Cos[x], Sin[x]}, {x, π\/8, \(3\ π\)\/8}, 
        PlotStyle -> {{RGBColor[1, 0, 0], Thickness[0.02]}}, 
        Axes -> None, AspectRatio -> 1\/3, 
        DisplayFunction -> Identity]; \)

T.1)  Cylinders, spheres, and tubes: 
      Plotting them and integrating on them

T.1.a.i) Cylinders

Here's a cylinder:

\(Clear[x, y, z, r, s, t]; 
    
{x[r_, s_, t_], y[r_, s_, t_], z[r_, s_, t_]} = {r\ Cos[t], r\ Sin[t], 
        s}; 
\({{rlow, rhigh}, {slow, shigh}, {tlow, thigh}} = {{0, 2}, {0, 
          3}, {0, 2\ π}}; \)\)sideplot = 
      ParametricPlot3D[{x[rhigh, s, t], y[rhigh, s, t], z[rhigh, s, t]}, {s, 
          slow, shigh}, {t, tlow, thigh}, PlotPoints -> {2, Automatic}, 
        DisplayFunction -> Identity]; topplot = 
      ParametricPlot3D[{x[r, shigh, t], y[r, shigh, t], z[r, shigh, t]}, {r, 
          rlow, rhigh}, {t, tlow, thigh}, PlotPoints -> {2, Automatic}, 
        DisplayFunction -> Identity]; \(baseplot = 
      ParametricPlot3D[{x[r, slow, t], y[r, slow, t], z[r, slow, t]}, {r, 
          rlow, rhigh}, {t, tlow, thigh}, PlotPoints -> {2, Automatic}, 
        DisplayFunction -> Identity]; 


    Show[sideplot, topplot, baseplot, 
      AxesLabel -> {"x", "y", "z"}, 
      ViewPoint -> CMView, BoxRatios -> Automatic, 
      DisplayFunction -> $DisplayFunction]; \)

Measure the volume contained in this cylinder.

You don't need calculus for this one.
The base of this cylinder is a circle of radius 2; its area measures out to:

basearea = (2^2) π

The height of the cylinder is:

height = shigh

The volume of the cylinder measures out to:

volume = basearea height

Now try it using calculus:

\(Clear[gradx, grady, gradz, Vxyz]; 

    gradx[r_, s_, t_] = {D[x[r, s, t], r], D[x[r, s, t], s], 
        D[x[r, s, t], t]}; 

    grady[r_, s_, t_] = {D[y[r, s, t], r], D[y[r, s, t], s], 
        D[y[r, s, t], t]}; 

    gradz[r_, s_, t_] = {D[z[r, s, t], r], D[z[r, s, t], s], 
        D[z[r, s, t], t]}; 

    Vxyz[r_, s_, t_] = 
      TrigExpand[Det[{gradx[r, s, t], grady[r, s, t], gradz[r, s, t]}]]\)

When you look at the plotting instructions, you see that the points 
       {x[r, s, t], y[r, s, t],  z[r, s, t]} 
with rlow ≤ r ≤ rhigh, slow ≤ s ≤ shigh, and zlow ≤ z ≤ zhigh 
describe the cylinder and everything inside it.  This tells you that the volume of this cylinder measures out to
       (∫_tlow^thigh)
          (∫_slow^shigh)
            (∫_rlow^rhigh)(-(Subscript[V, xyz])[r, s, t]) 
              dr ds dt:

volume = 
      -(∫_tlow^thigh)
            (∫_slow^shigh)
              (∫_rlow^rhigh) Vxyz[r, s, t] \[DifferentialD]r 
                \[DifferentialD]s \[DifferentialD]t

Same as you got without calculus.

T.1.a.ii)

This time, go with a cylinder whose top is on the plane:

\(Clear[top, x, y]; 
top[x_, y_] = \(-x\) - y + 6\)

And whose bottom is on the plane:

\(Clear[bottom, x, y]; 
bottom[x_, y_] = x - y - 4\)

Put:

\(Clear[x, y, z, s]; 
{slow, shigh} = {0, 1}; 

    z[x_, y_, s_] = bottom[x, y] + s\ \((top[x, y] - bottom[x, y])\)\)

And note that:

{z[x, y, slow] == bottom[x, y], z[x, y, shigh] == top[x, y]}

This gives you an easy way of plotting the cockeyed cylinder
-> whose top skin runs with the plane z = top[x, y],
-> whose bottom skin runs with the plane z = bottom[x, y] and 
-> whose sides run with circles of radius 2 perpendicular to the z-axis and centered on the z-axis:

\(Clear[x, y, newz, r, s, t]; 
    
{{rlow, rhigh}, {tlow, thigh}} = {{0, 2}, {0, 2\ π}}; 

    \({x[r_, s_, t_], y[r_, s_, t_]} = {r\ Cos[t], r\ Sin[t]}; \)\)newz[r_, s_, t_] = z[x[r, s, t], y[r, s, t], s]; sideplot = 
      ParametricPlot3D[{x[rhigh, s, t], y[rhigh, s, t], newz[rhigh, s, t]}, {
          s, slow, shigh}, {t, tlow, thigh}, 
        PlotPoints -> {2, Automatic}, DisplayFunction -> Identity]; 
    topplot = 
      ParametricPlot3D[{x[r, shigh, t], y[r, shigh, t], newz[r, shigh, t]}, {
          r, rlow, rhigh}, {t, tlow, thigh}, 
        PlotPoints -> {2, Automatic}, DisplayFunction -> Identity]; 
    \(baseplot = 
      ParametricPlot3D[{x[r, slow, t], y[r, slow, t], newz[r, slow, t]}, {r, 
          rlow, rhigh}, {t, tlow, thigh}, PlotPoints -> {2, Automatic}, 
        DisplayFunction -> Identity]; 


    Show[sideplot, topplot, baseplot, 
      AxesLabel -> {"x", "y", "z"}, 
      ViewPoint -> CMView, BoxRatios -> Automatic, 
      DisplayFunction -> $DisplayFunction]; \)

Measure the volume contained in this weirdo cylinder.

You do want to use calculus for this one.

\(Clear[gradx, grady, gradz, Vxyz]; 

    gradx[r_, s_, t_] = {D[x[r, s, t], r], D[x[r, s, t], s], 
        D[x[r, s, t], t]}; 

    grady[r_, s_, t_] = {D[y[r, s, t], r], D[y[r, s, t], s], 
        D[y[r, s, t], t]}; 

    gradnewz[r_, s_, t_] = {D[newz[r, s, t], r], D[newz[r, s, t], s], 
        D[newz[r, s, t], t]}; 

    Vxyz[r_, s_, t_] = 
      Abs[TrigExpand[
          Det[{gradx[r, s, t], grady[r, s, t], gradnewz[r, s, t]}]]]\)

The volume inside this weirdo measures out (in cubic units) to        
       (∫_tlow^thigh)
          (∫_slow^shigh)(∫_rlow^rhigh) 
            (Subscript[V, xyz])[r, s, t] dr ds 
              dt:

volume = 
      NIntegrate[
        Vxyz[r, s, t], {t, tlow, thigh}, {s, slow, shigh}, {r, rlow, rhigh}]

Looking bad, but feeling good.

T.1.b) Spheres

One way to see how to plot the sphere        
       (x^2) +  (y^2) +  (z^2) = (r^2) 
is to slice it with the plane
       z = c where -r ≤ c ≤ r,
and then to think about what you get.
What you get is the circle 
       (x^2) +  (y^2) = (r^2) -  (c^2)
plotted in the plane z = c.
Now, when you go with a given radius r, you can plot the sphere
       (x^2) +  (y^2) +  (z^2) = (r^2).
Take a look in the case that r = 3:

\(Clear[c, t]; 
radius = 3; 
\({clow, chigh} = {\(-radius\), radius}; 
    \)\){tlow, thigh} = {0, 2 π}; sphereplot = 
      ParametricPlot3D[{(Sqrt[(radius^2) - (c^2)]) Cos[t], 
          (Sqrt[(radius^2) - (c^2)]) Sin[t], c}, {c, clow, chigh}, {t, tlow, 
          thigh}, ViewPoint -> CMView, Axes -> True, 
        AxesLabel -> {"x", "y", "z"}];

Agree that R is the region consisting of everything on and inside the sphere
       (x^2) +  (y^2) +  (z^2) = 9 
as plotted above, and calculate the integral
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
            \(x\^2\) dx dy 
              dz\)\)\).

Look at the plotting code:
       ParametricPlot3D [{Sqrt[(radius^2) -  (c^2)] Cos[t], 
                     Sqrt[(radius^2) -  (c^2)] Sin[t], c},
                      {c, clow, chigh}, {t, tlow, thigh}].
And go with
       {x[c, r, t], y[c, r, t], z[c, r, t]} = {r Cos[t], r Sin[t], c};
with
       0 ≤ r ≤ Sqrt[(radius^2) -  (c^2)], -radius ≤ c ≤ radius,
and 0 ≤ t ≤ 2  π.
This gives you
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
            \(x\^2\) dx dy 
              dz\)\)\)
       \(\( = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\_crt\)\%\ 
              \(x[c, r, t]\^2\) V\_xyz[c, r, t] dc 
                dr dt\)\)\)\)
       \(\( = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\_crt\)\%\ 
              \(x[c, r, t]\^2\) V\_xyz[c, r, t] dr 
                dc dt\)\)\)\)
        = 
        (∫_0
            ^(2  π))(∫_radius^radius)
              (∫_( 0)^((Sqrt[(radius^2) -  (c^2)]))) 
              x[c, r, t]^2 (Subscript[V, xyz])[c, r, t] dr 
                dc dt.

Now calculate the volume conversion factor:

\(Clear[x, y, z, c, r, t]; 
    
{x[c_, r_, t_], y[c_, r_, t_], z[c_, r_, t_]} = {r\ Cos[t], r\ Sin[t], 
        c}; 
Clear[gradx, grady, gradz, Vxyz]; 

    gradx[c_, r_, t_] = {D[x[c, r, t], c], D[x[c, r, t], r], 
        D[x[c, r, t], t]}; 

    grady[c_, r_, t_] = {D[y[c, r, t], c], D[y[c, r, t], r], 
        D[y[c, r, t], t]}; 

    gradz[c_, r_, t_] = {D[z[c, r, t], c], D[z[c, r, t], r], 
        D[z[c, r, t], t]}; 

    Vxyz[c_, r_, t_] = 
      TrigExpand[Det[{gradx[c, r, t], grady[c, r, t], gradz[c, r, t]}]]\)

Calculate 
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
            \(x\^2\) dx dy 
              dz\)\)\)
        = 
        (∫_0
            ^(2  π))(∫_radius^radius)
              (∫_( 0)^((Sqrt[(radius^2) -  (c^2)]))) 
              x[c, r, t]^2 (Subscript[V, xyz])[c, r, t] dr 
                dc dt.

(∫_0
        ^(2 π))(∫_(-radius)^radius)
          (∫_0
            ^((Sqrt[(radius^2) - (c^2)])))x[c, r, t]^2 Vxyz[c, r, t] 
            \[DifferentialD]r \[DifferentialD]c \[DifferentialD]t

Done.

T.1.c)  Tubes

Remember the main unit normal and the binormal from the lesson on perpendicularity:

\(Clear[P, x, y, z, t, unittan, mainunitnormal, binormal]; 
x[t_] = t; 

    \(y[t_] = Sin[t]; \)\)z[t_] = Cos[t]; P[t_] = {x[t], y[t], z[t]}; {tlow, thigh} = {0, 2}; curve = 
      ParametricPlot3D[Evaluate[P[t]], {t, tlow, thigh}, 
        DisplayFunction -> Identity]; scaler = 0.5; unittan[t_]=((P'[t])/(Sqrt[P'[t].P'[t]]));\(unittans = 
      Table[Arrow[unittan[t], Tail -> P[t], VectorColor -> Blue, 
          ScaleFactor -> scaler], {t, tlow, thigh, 0.5}]; 

    mainunitnormal[t_] = 
      D[unittan[t], t]\/\@Expand[D[unittan[t], t] . D[unittan[t], t]]; 

    mainnormalvectors = 
      Table[Arrow[mainunitnormal[t], Tail -> P[t], 
          VectorColor -> Red, ScaleFactor -> scaler], {t, tlow, 
          thigh, 0.5}]; 

    \(binormal[t_] = unittan[t]\[Cross]mainunitnormal[t]; \)\)\(binormalvectors = 
      Table[Arrow[binormal[t], Tail -> P[t], VectorColor -> Red, 
          ScaleFactor -> scaler], {t, tlow, thigh, 0.5}]; 


    everything = 
      Show[curve, unittans, mainnormalvectors, binormalvectors, 
        ViewPoint -> CMView, PlotRange -> All, 
        BoxRatios -> Automatic, 
        AxesLabel -> {"x", "y", "z"}, 
        DisplayFunction -> $DisplayFunction]; \)

Remember how much fun it was to make a tube consisting of all circles of a fixed radius centered on the curve and lying in planes perpendicular to the curve:

radius = 0.2; {slow, shigh} = {0, 2 π}; tubeplot = 
      ParametricPlot3D[
        Evaluate[
          P[t] + radius Cos[s] mainunitnormal[t] + 
            radius Sin[s] binormal[t]], {t, tlow, thigh}, {s, slow, shigh}, 
        ViewPoint -> CMView, BoxRatios -> Automatic, 
        AxesLabel -> {"x", "y", "z"}];

Put flat caps on each end of this tube, and then measure the volume of the resulting container.

To plot the skin of the container, you plotted
       P[t] +  radius Cos[s] mainunitnormal[t] +  
        radius Sin[s] binormal[t]
where 
    radius = 0.2, slow ≤ s ≤ shigh, and tlow ≤ t ≤ thigh.
To describe the whole container and everything inside it, you go with 
       {x[r, s, t], y[r, s, t], z[r, s, t]} =  
        P[t] +  r Cos[s] mainunitnormal[t] +  r Sin[s] binormal[t]       
with 0 ≤ r ≤ 0.2, slow ≤ s ≤ shigh, and tlow ≤ t ≤ thigh.
Call the container and everything inside it (Subscript[R, xyz]) and measure its volume by calculating  
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\_xyz\)\%\ 
            dx dy dz\)\)\)
       \(\( = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\_rst\)\%\ 
              V\_xyz[r, s, t] dr ds 
                dt\)\)\)\)
        = 
        (∫_tlow^thigh)
            (∫_slow^shigh)(∫_( 0)^0.2) 
              (Subscript[V, xyz])[r, s, t] dr ds 
                dt.
Now if Mathematica can hack this, you're out of here.

\(Clear[x, y, z, r, s, t]; 
    
{x[r_, s_, t_], y[r_, s_, t_], z[r_, s_, t_]} = 
      Chop[TrigExpand[
          P[t] + r\ Cos[s]\ mainunitnormal[t] + r\ Sin[s]\ binormal[t]]]; 

    Clear[gradx, grady, gradz, Vxyz]; 

    gradx[r_, s_, t_] = {D[x[r, s, t], r], D[x[r, s, t], s], 
        D[x[r, s, t], t]}; 

    grady[r_, s_, t_] = {D[y[r, s, t], r], D[y[r, s, t], s], 
        D[y[r, s, t], t]}; 

    gradz[r_, s_, t_] = {D[z[r, s, t], r], D[z[r, s, t], s], 
        D[z[r, s, t], t]}; 

    Vxyz[r_, s_, t_] = 
      Simplify[TrigExpand[
          TrigReduce[Det[{gradx[r, s, t], grady[r, s, t], gradz[r, s, t]}]]]]
        \)

Haw.
       volume of container = 
        (∫_tlow^thigh)
            (∫_slow^shigh)(∫_( 0)^0.2) 
              (Subscript[V, xyz])[r, s, t] dr ds 
                dt
in cubic units is measured by:

volume = 
      NIntegrate[
        Abs[Vxyz[r, s, t]], {t, tlow, thigh}, {s, slow, shigh}, {r, 0, 0.2}]

Done.

T.2)  Integrating on solids bounded by sets of surfaces

T.2.a)

A solid R is given as all points that are simultaneously between:
-> the planes x +  y +  z = -2, and x +  y +  z = 7,
-> the planes x -  y -  z = -4, and x -  y -  z = 8, and 
-> the surfaces (x^3) -  y +  2  z = -2, and (x^3) -  y +  2  z = 6.
Measure the volume of this solid.

Going in blind is the thing to do.
Look again at the description of the surface:
The solid R was given as all points that are simultaneously between:
-> the planes x +  y +  z = -2, and x +  y +  z = 7,
-> the planes x -  y -  z = -4, and x -  y -  z = 8, and 
-> the surfaces (x^3) -  y +  2  z = -2, and (x^3) -  y +  2  z = 6.
Put:

\(Clear[x, y, z, u, v, w]; 
    
{u[x_, y_, z_], ulow, uhigh} = {x + y + z, \(-2\), 7}\){v[x_, y_, z_], vlow, vhigh} = {x - y - z, -4, 8}{w[x_, y_, z_], wlow, whigh} = {(x^3) - y + 2 z, -3, 6}

(Subscript[R, uvw]) is the rectangular box
       ulow ≤ u ≤ uhigh, vlow ≤ v ≤ vhigh, and
       wlow ≤ w ≤ whigh.
So:
       \(volume = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
              dx dy dz\)\)\)
       \(\( = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\_uvw\)\%\ 
              V\_xyz[u, v, w] du dv 
                dw\)\)\)\)
        = 
        (∫_( wlow)^whigh)
            (∫_( vlow)^vhigh)(∫_( ulow)^uhigh) 
              (Subscript[V, xyz])[u, v, w] du dv 
                dw.
Calculate x[u, v, w], y[u, v, w], and z[u, v, w]:

xyzsolved = 
      Solve[{u == u[x, y, z], v == v[x, y, z], w == w[x, y, z]}, {x, y, z}]

{x[u_, v_, w_], y[u_, v_, w_], z[u_, v_, w_]} = {x, y, z} /. 
        xyzsolved[[1]]

Calculate the volume conversion factor:

\(Clear[gradx, grady, gradz, Vxyz]; 

    gradx[u_, v_, w_] = {D[x[u, v, w], u], D[x[u, v, w], v], 
        D[x[u, v, w], w]}; 

    grady[u_, v_, w_] = {D[y[u, v, w], u], D[y[u, v, w], v], 
        D[y[u, v, w], w]}; 

    gradz[u_, v_, w_] = {D[z[u, v, w], u], D[z[u, v, w], v], 
        D[z[u, v, w], w]}; 

    Vxyz[u_, v_, w_] = 
      Abs[Det[{gradx[u, v, w], grady[u, v, w], gradz[u, v, w]}]]\)

So:
       \(volume = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
              dx dy dz\)\)\)
        = 
        (∫_( wlow)^whigh)
            (∫_( vlow)^vhigh)(∫_( ulow)^uhigh) 
              (Subscript[V, xyz])[u, v, w] du dv 
                dw.
is measured (in cubic units) by:

volume = 
      (∫_wlow^whigh)
          (∫_vlow^vhigh)
            (∫_ulow^uhigh) Vxyz[u, v, w] \[DifferentialD]u 
              \[DifferentialD]v \[DifferentialD]w

Really easy.

T.3)  Parallelepipeds

Here are two vectors in two dimensions plotted with their tails at the same base point:

vector1 = {2, 7}; vector2 = {6, 2}; basepoint = {1, 2}; Show[Arrow[vector1, Tail -> basepoint, VectorColor -> Red], 
      Arrow[vector2, Tail -> basepoint, VectorColor -> Red], 
      Axes -> True, AxesLabel -> {"x", "y"}];

Here is the parallelogram the two vectors and the basepoint determine:

Show[Arrow[vector1, Tail -> basepoint, VectorColor -> Red], 
      Arrow[vector2, Tail -> basepoint, VectorColor -> Red], 
      Arrow[vector1, Tail -> basepoint + vector2, 
        VectorColor -> Blue], 
      Arrow[vector2, Tail -> basepoint + vector1, 
        VectorColor -> Blue], Axes -> True, 
      AxesLabel -> {"x", "y"}];

Here are three vectors in 3D plotted with their tails at the same base point:

vector1 = {-1, 0, 3}; vector2 = {1, 2, -2}; vector3 = {-2, 1, 3}; basepoint = {1, 1, 2}; labels = {Graphics3D[Text["vector1", basepoint + 0.4 vector1]], 
        Graphics3D[Text["vector2", basepoint + 0.5 vector2]], 
        Graphics3D[Text["vector3", basepoint + 0.7 vector3]]}; threevectors = 
      Show[Arrow[vector1, Tail -> basepoint, VectorColor -> Red], 
        Arrow[vector2, Tail -> basepoint, VectorColor -> Red], 
        Arrow[vector3, Tail -> basepoint, VectorColor -> Red], 
        labels, Axes -> True, AxesLabel -> {"x", "y", "z"}, 
        ViewPoint -> CMView];

Here is the parallelepiped the three vectors and the basepoint determine:

parallelepiped = 
      Show[Arrow[vector1, Tail -> basepoint, VectorColor -> Red], 
        Arrow[vector2, Tail -> basepoint, VectorColor -> Red], 
        Arrow[vector3, Tail -> basepoint, VectorColor -> Red], 
        Arrow[vector2, Tail -> basepoint + vector1, 
          VectorColor -> Blue], 
        Arrow[vector3, Tail -> basepoint + vector1, 
          VectorColor -> Blue], 
        Arrow[vector1, Tail -> basepoint + vector2, 
          VectorColor -> Blue], 
        Arrow[vector3, Tail -> basepoint + vector2, 
          VectorColor -> Blue], 
        Arrow[vector1, Tail -> basepoint + vector3, 
          VectorColor -> Blue], 
        Arrow[vector2, Tail -> basepoint + vector3, 
          VectorColor -> Blue], 
        Arrow[vector3, Tail -> basepoint + vector1 + vector2, 
          VectorColor -> Blue], 
        Arrow[vector1, Tail -> basepoint + vector2 + vector3, 
          VectorColor -> Blue], 
        Arrow[vector2, Tail -> basepoint + vector1 + vector3, 
          VectorColor -> Blue], 
        Arrow[vector3, Tail -> basepoint + vector1 + vector2, 
          VectorColor -> Blue], labels, Axes -> True, 
        AxesLabel -> {"x", "y", "z"}, ViewPoint -> CMView];

T.3.a.i)

Agree that R is the region consisting of everything on and inside the parallelepiped, and measure the volume of R by transforming the integral
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
            dx dy dz\)\)\).

The parallelpiped has six planar sides; they come in parallel pairs.
A normal vector for one of the pairs is the cross product
       vector1×vector2; 
a normal vector for another of the pairs is the cross product
       vector1×vector3 
and a normal vector for the last pair is the cross product 
       vector2×vector3:

\(Clear[normal]; 
    
{normal[1], normal[2], normal[3]} = {vector1\[Cross]vector2, 
        vector1\[Cross]vector3, vector2\[Cross]vector3}\)

Three of these six planes go through the basepoint. 
The other three planes go through the tip of 
       basepoint +  vector1 +  vector2 +  vector3.  
Here are their equations:

\(Clear[k]; 

    Table[{Expand[normal[k] . \(({x, y, z} - basepoint)\)] == 0, 
        Expand[normal[k] . 
              \(({x, y, z} - \((basepoint + vector1 + vector2 + vector3)\))
                \)] == 0}, {k, 1, 3}]\)

Introduce uvw-space:

\(Clear[u, v, w]; 
    
{u[x_, y_, z_], ulow, uhigh} = {\(-6\)\ x + y - 2\ z, \(-9\), \(-2\)}
        \){v[x_, y_, z_], vlow, vhigh} = {-3 x - 3 y - z, -15, -8}
        {w[x_, y_, z_], wlow, whigh} = {8 x + y + 5 z, 19, 26}

(Subscript[R, uvw]) is the rectangular box
       ulow ≤ u ≤ uhigh, vlow ≤ v ≤ vhigh, and 
       wlow ≤ w ≤ whigh.
So:
       \(volume = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
              dx dy dz\)\)\)
       \(\( = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\_uvw\)\%\ 
              V\_xyz[u, v, w] du dv 
                dw\)\)\)\)
        = 
        (∫_( wlow)^whigh)
            (∫_( vlow)^vhigh)(∫_( ulow)^uhigh) 
              (Subscript[V, xyz])[u, v, w] du dv 
                dw.
Calculate x[u, v, w], y[u, v, w], and z[u, v, w]:

xyzsolved = 
      Solve[{u == u[x, y, z], v == v[x, y, z], w == w[x, y, z]}, {x, y, z}]

Extract x[u, v, w], y[u, v, w], and z[u, v, w]:

{x[u_, v_, w_], y[u_, v_, w_], z[u_, v_, w_]} = 
      Expand[{x, y, z} /. xyzsolved[[1]]]

Calculate the volume conversion factor:

\(Clear[gradx, grady, gradz, Vxyz]; 

    gradx[u_, v_, w_] = {D[x[u, v, w], u], D[x[u, v, w], v], 
        D[x[u, v, w], w]}; 

    grady[u_, v_, w_] = {D[y[u, v, w], u], D[y[u, v, w], v], 
        D[y[u, v, w], w]}; 

    gradz[u_, v_, w_] = {D[z[u, v, w], u], D[z[u, v, w], v], 
        D[z[u, v, w], w]}; 

    Vxyz[u_, v_, w_] = 
      Abs[Det[{gradx[u, v, w], grady[u, v, w], gradz[u, v, w]}]]\)

So:
       \(volume = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
              dx dy dz\)\)\)
        = 
        (∫_( wlow)^whigh)
            (∫_( vlow)^vhigh)(∫_( ulow)^uhigh) 
              (Subscript[V, xyz])[u, v, w] du dv 
                dw.
is measured by:

volume = 
      (∫_wlow^whigh)
          (∫_vlow^vhigh)
            (∫_ulow^uhigh) Vxyz[u, v, w] \[DifferentialD]u 
              \[DifferentialD]v \[DifferentialD]w

Done.

T.3.a.ii)

Stay with the same three vectors 
       vector1, vector2, and vector3 
as in the last part. 
Here they are together with the parallelepiped they determine:

Show[parallelepiped];

The volume of this parallelepiped measures out to:

volume = 
      (∫_wlow^whigh)
          (∫_vlow^vhigh)
            (∫_ulow^uhigh) Vxyz[u, v, w] \[DifferentialD]u 
              \[DifferentialD]v \[DifferentialD]w

Now look at this calculation of vector1 . (vector2×vector3):

boxproduct = Abs[vector1 . vector2\[Cross]vector3]

Compare:

volume == boxproduct

Do you think this was an accident?

Gimmee a break! This is getting old.

To see why this is not an accident, look at the parallelpided again:

Show[parallelepiped];

Look at the face F determined by vector2 and vector3 and remember that
       area of F = 
        ‖vector2×vector3
            ‖. 
Second, letting a be the angle between vector1 and vector2×vector3, you have 
       |vector1 . 
          vector2×vector3| 
        = 
        ‖vector1‖ 
          ‖vector2×vector3
              ‖ 
          |Cos[a]|
        = 
        ‖vector1‖ 
          (area of F) 
          |Cos[a]|
        = 
        ‖vector1‖ 
          |Cos[a]| 
          (area of F).
Because vector2×vector3 is perpendicular to F,
       ‖vector1‖ 
        |Cos[a]|
measures the perpendicular height of the parallelepiped as measured from F. 
The upshot:
       |vector1 . 
          vector2×vector3| 
        = (area of a face) (perpendicular height)
        = volume of the parallelepiped.

T.3.a.iii)

Now everyone knows that you can calculate the volume of the parallelepiped determined by 
       vector1, vector2, and vector3 
simply by calculating
       vector1 . (vector2×vector3). 
Was all that jazz on transformation of the 3D integral in part i) a waste of time?

If all you wanted to do was to measure the volume of the parallelepided, the transformation turns out to be a waste of time.
On the other hand if you had wanted to calculate an integral like
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
            \(x\^2\) dx dy 
              dz\)\)\) 
where R is everything inside and on the parallelepiped, then your time on setting up the transformation would not have been wasted.
To wit:
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
            \(x\^2\) dx dy 
              dz\)\)\)
       \(\( = 
        ∫\_\%\(∫\_\%\(∫\_\(\ R\_uvw\)\%\ 
              \(x[u, v, w]\^2\) V\_xyz[u, v, w] du 
                dv dw\)\)\)\)
        = 
        (∫_( wlow)^whigh)
            (∫_( vlow)^vhigh)(∫_( ulow)^uhigh) 
              x[u, v, w]^2 (Subscript[V, xyz])[u, v, w] du 
                dv dw. 
is given by:

(∫_wlow^whigh)
        (∫_vlow^vhigh)
          (∫_ulow^uhigh) x[u, v, w]^2 Vxyz[u, v, w] 
            \[DifferentialD]u \[DifferentialD]v \[DifferentialD]w

Done in two shakes of a lamb's tail.

T.4)  Switching the order of integration

T.4.a.)

Here is a calculation of the triple integral
       (∫_0^1)
          (∫_0^2)
            (∫_0^(2 - x))(z^4) dz 
              dx dy

\(Clear[x, y, z]; 

    ∫\_0\%1
        \(∫\_0\%2
          \(∫\_0\%\(2 - x\)\(z\^4\) \[DifferentialD]z 
            \[DifferentialD]x \[DifferentialD]y\)\)\)

Rewrite the integral in the order
       \(∫\_□\%□\(∫\_□\%□\(∫\_□\%□\( 
                  z\^4\) dy dx 
              dz\)\)\),
filling in the □'s with the appropriate limits.
Confirm your answer by calculating it.

To do this, it's a good idea to pin down the region R in three dimensions such that  
       \(∫\_\%\(∫\_\%\(∫\_\(\ R\)\%\ 
              \(z\^4\) dx dy 
                dz\)\) = 
        ∫\_0\%1
            \(∫\_0\%2
              \(∫\_0\%\(2 - x\)\(z\^4\) dz 
                dx dy\)\)\).
Try to take a look:
The first integral
       (∫_0^(2 - x))(z^4) dz
fixes x and y and integrates over the stick that runs from 
{x, y, 0} to {x, y, 2 -  x}:

{x0, y0} = {0.4, 0.6}; stickinslice = 
      Graphics3D[{Blue, Line[{{x0, y0, 0}, {x0, y0, 2 - x0}}]}]; \(threedims = Axes3D[2.3]; 


    Show[stickinslice, threedims, Boxed -> False, PlotRange -> All, 
      ViewPoint -> CMView]; \)

The second integral
       (∫_0^2)
          (∫_0^(2 - x))(z^4) dz 
            dx
holds y fixed, but releases x and integrates over the slice of the solid swept out by the sticks as x runs from 0 to 2:

\(Clear[x]; 

    sticksinslice = 
      Table[Graphics3D[{Blue, Line[{{x, y0, 0}, {x, y0, 2 - x}}]}], {x, 0, 2, 
          1\/15}]; 

    \(slice = 
      Show[sticksinslice, threedims, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView]; \)\)

The limits on the third integral 
       (∫_0^1)
          (∫_0^2)
            (∫_0^(2 - x))(z^4) dz 
              dx dy.
release y and integrate over the accumulated slices as y runs from 0 to 1. 
So R looks something like this:

\(Clear[y]; 

    allsticks = 
      Table[Graphics3D[{Blue, Line[{{x, y, 0}, {x, y, 2 - x}}]}], {x, 0, 2, 
          1\/15}, {y, 0, 1, 1\/10}]; 

    \(Rplot = 
      Show[allsticks, threedims, Boxed -> False, PlotRange -> All, 
        ViewPoint -> CMView]; \)\)

R is the region whose top is the plane z = 2 -  x, whose bottom is the plane z = 0, and whose sides are the planes y = 0, y = 1, and x = 0. 
To write the integral in the order
       \(∫\_□\%□\(∫\_□\%□\(∫\_□\%□\ 
            \(z\^4\) dy dx 
              dz\)\)\),
you've got to describe the same region, but first starting with sticks parallel to the y-axis.  This means x and z are fixed and the stick runs from y = 0 to y = 1:
This gives you the first integral
       (∫_0^1) (z^4) dy
which integates over a stick:

{x0, z0} = {0.5, 1}; newstickinslice = 
      Graphics3D[{Blue, Line[{{x0, 0, z0}, {x0, 1, z0}}]}]; Show[newstickinslice, threedims, Boxed -> False, 
      PlotRange -> All, ViewPoint -> CMView];

Remember:
R is the region whose top is the plane z = 2 -  x, whose bottom is the plane z = 0, and whose sides are the planes y = 0, y = 1, and x = 0. 
The second integral
       (∫_□^□)(∫_0^1) 
          (z^2) dy dx
holds z fixed but releases x and integrates over the slice composed of the sticks as x runs from x = 0 to the plane z = 2 -  x.  The second integral is
       (∫_0^(2 - z))(∫_0^1) 
          (z^2) dy dx
which integrates over a slice:

\(Clear[x]; 

    newsticksinslice = 
      Table[Graphics3D[{Blue, Line[{{x, 0, z0}, {x, 1, z0}}]}], {x, 0, 
          2 - z0, \(2 - z0\)\/10}]; 

    \(newslice = 
      Show[newsticksinslice, threedims, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView]; \)\)

The third integral 
       (∫_□^□)(∫_0
            ^(2 - z))(∫_0^1) 
            (z^2) dy dx 
              dz
releases z and integrates over the accumulated slices as z runs from as small as it can be to as big as it can be. Remembering that R is the region whose top is the plane z = 2 -  x, whose bottom is the plane z = 0, and whose sides are the planes y = 0, y = 1, and x = 0, you can see that the smallest z is 0 and the biggest z is 2 (which happens when x = 0). 
The third integral is
       (∫_0^2)
          (∫_0^(2 - z))(∫_0^1) 
            (z^2) dy dx 
              dz
which integrates over R:

allnewsticks = 
      Table[Graphics3D[{Blue, Line[{{x, 0, z}, {x, 1, z}}]}], {z, 0, 2, 
          (1/15)}, {x, 0, 2 - z, (1/15)}]; newRplot = 
      Show[allnewsticks, threedims, Boxed -> False, 
        PlotRange -> All, ViewPoint -> CMView];

Compare this to the original R plot:

Show[GraphicsArray[{Rplot, newRplot}]];

The same solid region but described with different sticks; that's why
       (∫_0^2)
            (∫_0
              ^(2 - z))(∫_0^1) (z^4) dy 
                dx dz = 
        (∫_0^1)
            (∫_0^2)
              (∫_0^(2 - x))(z^4) dz 
                dx dy:

(∫_0^2)
        (∫_0
          ^(2 - z))(∫_0^1) (z^4) \[DifferentialD]y 
            \[DifferentialD]x \[DifferentialD]z

(∫_0^1)
        (∫_0^2)
          (∫_0^(2 - x))(z^4) \[DifferentialD]z 
            \[DifferentialD]x \[DifferentialD]y

Copacetic.