The "Disk" Method of 
Volume Approximation

by
K. D.  Stroyan
University of Iowa

copyright 1997 by Academic Press, Inc. - All rights reserved.

Special Mathematica Functions used in this NoteBook

Off[General::spell1];
BeginPackage["diskMethod`"];

diskMethod::usage = "";

Begin["`Private`"];

makeWashers[ f_, x_, n_, dx_ ] :=
Module[ {washers, rad, points1, points2, washer, cylpoints,
				cylinder, Trs, i},
		washers = { } ;
		Do[
			rad = f[x[i] + dx/2] ;
			points1 = Table[N[{x[i], rad Cos[t], rad Sin[t]}],
				{t, 0, 2 Pi, Pi/12} ] ;
			points2 = Table[N[{x[i+1], rad Cos[t], rad Sin[t]}],
				{t, 0, 2 Pi, Pi/12} ] ;
			washer = {Polygon[points1], Polygon[points2]} ;
			
			Trs = Transpose[{points1, points2}];
			For[  j=1, j <= (Length[Trs])/2, j++,
				Trs = ReplacePart[Trs, Reverse[Trs[[2*j]]], 
				2*j]  ];
			cylpoints = Flatten[ Trs, 1 ] ;
			cylinder = Map[ Polygon[#]&, Partition[cylpoints, 4, 2] ] ;
			AppendTo[ washers, Join[washer, cylinder] ],
			{i, 0, n - 1}
		] ;
		washers
	];

diskMethod[ f_, n_, {a_, b_} ] :=
Module[ {dx, x, i, partition, points1, points2, points3, 
				points4, curve, volapprox},
		dx = N[(b - a) / n] ;
		Do[
			x[i] = a + i dx,
			{i, 0, n} 
		] ;
		partition = makeWashers[ f, x, n, dx ] ;
		points1 = Table[{x, 0, f[x]}, {x, a, b, 0.01 (b - a)} ] ;
		points2 = Table[{x, f[x], 0}, {x, a, b, 0.01 (b - a)} ] ;
		points3 = Table[{x, -f[x], 0}, {x, a, b, 0.01 (b - a)} ] ;
		points4 = Table[{x, 0, -f[x]}, {x, a, b, 0.01 (b - a)} ] ;
		curve = Map[ Line[#]&, {points1, points2, points3,
								points4} ] ;
		volapprox =
			N[ Sum[ Pi (f[x[i] + dx/2]^2) dx, {i, 0, n-1} ], 10 ] ;
		Show[ Graphics3D[ curve ], 
				Graphics3D[ {EdgeForm[], partition} ],
				Axes -> Automatic ] ;
		Print[ "Volume of Washers = ", volapprox ] ; 
	];
	
End[];


EndPackage[] ;

Notebook Overview

Given a body obtained by revolving a non-negative function R[x] from x=a to x=b, the approximation of its volume can be obtained by slicing it in steps of Dx, using the formula of  a cylinder for each slice, Vslice =p R[x]^2 Dx.. If we let Dx = (b-a)/n, then we obtain n disks with radii at  x=a + Dx/2, x=a + 3 Dx/2 , x= a + 5 Dx/2, ..., x=b - Dx/2. The sum of the volumes of these disks approximates the actual volume.

The function diskMethod[f, n, {a, b}] below divides the body  obtained by revolving a non-negative function f[x] from x=a to x=b into n disks and then sums the volumes of these disks to approximate the actual volume.  By activating the function cell and typing washerMethod[f, n, {a, b}], Mathematica will draws your n approximating disks a graph of your partition and gives you the sum of their volumes, which approximates the actual volume.

References to the Text

This NoteBook goes with Chapter 12 & 14 of the text.  It illustrates the examples in Chapter 12.

Examples from Chapter 12

Volume of a Cone Text SubSection 12.1.1

f[x_] := (x/2); n = 5; {a, b} = {0, 10}; diskMethod[f, n, {a, b}]

f[x_] := (x/2); n = 10; {a, b} = {0, 10}; diskMethod[f, n, {a, b}]

Volume of The Parabolic Nose Cone Text SubSection 12.1.2

f[x_] := (Sqrt[x]); n = 10; {a, b} = {0, 10}; diskMethod[f, n, {a, b}]

Volume of a Spear Text SubSection 12.1.3

f[x_] := ((x^2)/50); n = 10; {a, b} = {0, 10}; diskMethod[f, n, {a, b}]

Exercise

Exercise 12.1.3

Plot the cone with radius function  r = x/2  sliced into 20 slices.

Exercise

Plot a sphere sliced into 10 "disks" by defining the proper function  y = f[x]  to rotate about the x-axis and using the diskMethod package as in the examples above.