Lab 5 - Applications of Integration
Math 2374 - University of Minnesota
http://www.math.umn.edu/math2374
Questions to: swenson@math.umn.edu, gantner@math.umn.edu

Introduction

Our goal in this part of the lab is to find the volume of liquid in a cylindrical tank which is tilted at some angle from the horizontal.  To be specific, we start with the cylinder with radius 2 m and length 10 m, whose axis is the vertical line through (2,0,0): we will put the bottom of the cylinder at z=0 and the top at z=10.  A parametrization of this cylinder is given below: what should be the bounds on s and t?

f[s_, t_] = {2 + 2  Cos[t], 2*Sin[t], s};

Evaluate the above cell to define f.  Then, in the cell below, fill in the appropriate bounds for s and t, and evaluate the cell to plot the cylinder.  [Notice that we name the plot cyl.]

cyl = 
      ParametricPlot3D[f[s, t], {s, , }, {t, , }, 
        AxesLabel -> {X, Y, Z}]

The surface of the liquid in our tank should be given by a horizontal plane: here is an example.

plane1 = 
      ParametricPlot3D[{x, y, 4}, {x, 0, 4}, {y, -2, 
          2}]
Show[cyl, plane1, AxesLabel -> {x, y, z}]

In this case, the volume of the liquid is π(r^2) h = 16π.  (See why?)

Tilting Cylinders Is Too Hard

To find the volume of liquid when the cylinder is tilted, we will need to use integration.  Evaluate the next cell to see an example of a tilted cylinder, with a horizontal plane representing the surface of a liquid.

u = Pi/4;
cyl2 = 
      ParametricPlot3D[{Cos[u]*(2*Cos[t] + 2) - Sin[u]*s, 2*Sin[t], 
          Sin[u]*(2*Cos[t] + 2) + Cos[u]*s}, {s, 0, 10}, {t, 0, 
          2  Pi}]
plane2 = 
      ParametricPlot3D[{x, y, 4}, {x, -6, 4}, {y, -2, 
          2}]
Show[cyl2, plane2,  AxesLabel -> {x, y, z}, 
      ViewPoint -> {0,  -3,  0}, 
      BoxRatios -> {1, 1, 1}]

This picture is not very useful for calculation: we don't know what to integrate, nor over what region!  [It was also tricky to reparametrize the cylinder.]

We will take a different approach: again, we imagine the cylinder tilting, but to simplify the calculations, we tilt the plane instead, and reuse cyl, our original cylinder.  To put this another way, we are tilting the coordinate axes along with the cylinder.

plane3 = 
      ParametricPlot3D[{x, y, 6 - x}, {x, -2, 6}, {y, -2, 
          2}]
Show[cyl, plane3, AxesLabel -> {x, y, z}, 
      BoxRatios -> {1, 1, 1}, 
      ViewPoint -> {0,  -3,  0}]

If you tilt your head,you can see that this graph shows the same part of the cylinder as in the tilted-cylinder graph above.  If you're not sure about that, evaluate the next cell to see the cylinder in a LiveGraphics3D window.  Tilt the picture until the plane is flat. (HINT: hold the shift button down, click on the picture, and move your mouse to the left.)  It should look the same as the earlier picture.

ShowLive[cyl, plane3, AxesLabel -> {x, y, z}, 
        BoxRatios -> {1, 1, 1}, 
        ViewPoint -> {0,  -3,  0}];

We like this new viewpoint because it makes calculation much easier: we can find the volume of liquid by integration.  Specifically, we want the volume of the region below our plane, and above the bottom of the tank.

Therefore, the region of integration should be the bottom of the tank, which is in the xy-plane, and given by the inequality (((x - 2))^2) + (y^2)≤ 4, and the integrand should be the height of the plane.

The Fluid Finds Its Level

Notice that our plane doesn't move up or down in the y-direction.  The next set of commands will draw the same picture as above, but without perspective, so that the y-direction vanishes:

Needs["Graphics`FilledPlot`"]
graycyl = 
      FilledPlot[
        If[(x ≥ 0) && (x ≤ 4), 10, 
          0], {x, -2, 6}]
line = 
      ParametricPlot[{x, 6 - x}, {x, -2, 6}]
Show[graycyl, line, AxesLabel -> {x, z}, 
      AspectRatio -> 1]

This makes it easier to find the equation of the plane.  If we don't show perspective in our plot, then our cylinder looks like a rectangle with base 4 and height 10, and our plane looks like a line in the xz-plane.  We can find the equation of this line in terms of x and z, using nothing but algebra: the slope-intercept form gives z=-x+6.  When we think in three dimensions, this same equation gives us the plane we want!  Using this equation, we can calculate the desired volume (remember the explanation at the end of the last section).

Integrate[-x + 6, {x, 0, 4}, {y, -Sqrt[4 - (x - 2)^2], 
        Sqrt[4 - (x - 2)^2]}]

In the following exercises, sketching "side elevations" by hand will help you to find the equations you'll need for the various surfaces.

Order of Integration: In which order did Mathematica perform the integration in the previous command?  What happens when you switch the order of the variables as they are listed after the integrand?

Exercises

Exercise 1
a) Suppose that the fluid level in the tank is 7 m on the left edge of the tank (where x=0) and 5 m on the right edge (where x=4).  Find the equation of the plane of the liquid, and use a double integral to find the volume of liquid in the tank.  [Hint: you should use a "dy dx" iterated integral, where the bounds on y depend on x, and are given by the equation of the base of the cylinder.]  Also find the angle at which the tank is tipped from its upright position.  For consistency, assume that the tank in the Introduction above is tipped at a 0° angle.  [Hint: use a "side elevation" sketch, and use trigonometry to find the angle between your plane and the plane z=5.]

b) Suppose now that the fluid level is 7 m at the left edge of the tank, but that there isn't enough fluid to reach the right edge; instead, the fluid covers the base of the tank only out to the plane x=3.  [You can produce a graph with the commands below: you'll have to paste them into another cell.]
plane4 = 
        ParametricPlot3D[{x, y, 7 - 7  x/3}, {x, 0, 3}, {y, -2, 2}]
Show[cyl, plane4, AxesLabel -> {x, y, z}, 
        ViewPoint -> {0,  -3,  0}]
Find the equation of the plane of the liquid,and use a double integral to find the volume of liquid in the tank.  Also find the angle at which the tank is tipped from its upright position.  [Warning: the region of integration has changed -- if you reuse the bounds from problem 1, you'll include the "negative volume" from the region where z<0.]

c) Suppose that the tank is tipped so far that the liquid touches both ends of the tank, touching the top (at z=10) out to the plane x=1, and covering the bottom out to the plane x=3.  Find the volume of liquid in the tank using two double integrals.  Explain why you can't just use one double integral.  Lastly, find the angle at which the tank is tipped from its upright position.

d) Suppose, finally, that the liquid touches the top of the tank out to the plane x=3, and reaches a level of 3 m on the right edge of the tank.  Find the volume of liquid in the tank using two double integrals, and find the angle at which the tank is tipped from its upright position.

e) Suppose that our tank is tilted at an angle of 80° from its upright position.  Where could you mark the surface of the tank to indicate when the tank is exactly one-third full?  [Hint: use trigonometry to decide which of the first four exercises most resembles this problem.  Calculate the volume in terms of some unknown variable, and use Mathematica's FindRoot command, which you can look up in the help browser.]

In exercise 2, rather than using the tank that was described in the introduction, we will use an oblong tank.  When intersected with the xy-plane, the tank will be an ellipse which goes through the points (0,0,0), (4,2,0), (4,-2,0), and (8,0,0).  This ellipse is centered at (4,0,0), and every point on the ellipse satisfies the equation (1/4)(x-4)^2 + y^2 = 4.  We will assume that the tank has height 10.  The new tank looks like

tank  =  
      ContourPlot3D[(1/4)*(x - 4)^2  +  y^2  -  4,  {x, 0, 
          8},  {y, -2, 2},  {z, 0, 10},  
        AxesLabel -> {x, y, z},  Axes -> True]

We will continue to "tip" the tank towards the negative y direction.  This is the same direction as in the examples above, but here it actually matters which direction we tip it, because the tank is no longer circular.

Exercise 2

a) Find a parametrization of the tank described in the preceding paragraph.  Be sure to include your bounds on the parameters.  [Hint: For the x and y coordinates, first divide the equation by 4 on both sides.  If you make the substitution u = (1/4)*(x-4) and v = (1/2)*y, what is the resulting equation?  How would you parametrize the equation in u and v?]

b) Suppose that the fluid level in the tank is 7 m on the left edge of the tank (where x=0) and 5 m on the right edge (where x=8).  Find the equation of the plane of the liquid, and use a double integral to find the volume of liquid in the tank.  [Hint: you should use a "dy dx" iterated integral, where the bounds on y depend on x, and are given by the equation of the base of the cylinder.]  Also find the angle at which the tank is tipped from its upright position.  For consistency, assume that the tank in the paragraph before part a) above is tipped at a 0° angle.  [Hint: use a "side elevation" sketch, and use trigonometry to find the angle between your plane and the plane z=5.]

c) Suppose now that the fluid level is 7 m at the left edge of the tank, but that there isn't enough fluid to reach the right edge; instead, the fluid covers the base of the tank only out to the plane x=4.  [You can produce a graph with the commands below: you'll have to paste them into another cell.]
plane5 = 
        ParametricPlot3D[{x, y, 7 - 7  x/4}, {x, 0, 4}, {y, -3, 3}]
Show[tank, plane4, AxesLabel -> {x, y, z}, 
        ViewPoint -> {0,  -4,  0}]
Find the equation of the plane of the liquid,and use a double integral to find the volume of liquid in the tank.  Also find the angle at which the tank is tipped from its upright position.  [Warning: the region of integration has changed -- if you reuse the bounds from problem 1, you'll include the "negative volume" from the region where z<0.]

d) Suppose that the tank is tipped so far that the liquid touches both ends of the tank, touching the top (at z=10) out to the plane x=2, and covering the bottom out to the plane x=4.  Find the volume of liquid in the tank using two double integrals.  Explain why you can't just use one double integral.  Lastly, find the angle at which the tank is tipped from its upright position.

e) Suppose, finally, that the liquid touches the top of the tank out to the plane x=6, and reaches a level of 4 m on the right edge of the tank.  Find the volume of liquid in the tank using two double integrals, and find the angle at which the tank is tipped from its upright position.

f) Suppose that our tank is tilted at an angle of 80° from its upright position.  Where could you mark the surface of the tank to indicate when the tank is exactly one-third full?  [Hint: use trigonometry to decide which of the first four exercises most resembles this problem.  Calculate the volume in terms of some unknown variable, and use Mathematica's FindRoot command, which you can look up in the help browser.]

Credits

This lab was inspired by a lab written at Lafayette College in Pennsylvania.  Cindy Kaus (cindy.kaus@metrostate.edu) wrote the first version that we used at the University of Minnesota.  James Swenson (swenson@math.umn.edu) completely rewrote the text in Spring 2002 but kept the same exercises.   In Spring 2004 Jonathan Rogness (rogness@math.umn.edu) went through and added a few Live commands and polished things up a bit; Ryan Gantner (gantner@math.umn.edu)  added new exercises, where the cylinder is no longer circular.

This lab (or portions thereof) copyrighted  by their respective authors.  We've all agreed to use the Creative Commons Attribution-NonCommercial-ShareAlike License.  You can find more information on this license at http://creativecommons.org/licenses/by-nc-sa/1.0/

Although it's not specifically required by the license, I'd appreciate it if you let me know at rogness@math.umn.edu if you use parts of our labs, just so I can keep track of it.  Please send me any questions or comments!