Re: Trouble calculating a volume

*To*: mathgroup at smc.vnet.net*Subject*: [mg33830] Re: [mg33806] Trouble calculating a volume*From*: BobHanlon at aol.com*Date*: Fri, 19 Apr 2002 02:28:07 -0400 (EDT)*Sender*: owner-wri-mathgroup at wolfram.com

In a message dated 4/16/02 7:10:06 AM, jdm111 at psu.edu writes: >I am attempting to calculate the volume of the frustum of a cone. >I have been able to calculate the volume of a cone using a triple >integral as follows: > >Integrate[1, {x, 0, h}, {y, (-r)*(x/h), r*(x/h)}, > {z, -Sqrt[(r*(x/h))^2 - y^2], Sqrt[(r*(x/h))^2 - y^2]}] > >This integral does evaluate to the correct answer > >(1/3)*h*Pi*r^2 > >where r is the base diameter and h is the height. > >In order to calculate the volume of the frustum of a cone, I have used >the >following equation : > >Simplify[Integrate[1, {x, 0, h}, > {y, -(r1 + ((r2 - r1)*x)/h), r1 + ((r2 - r1)*x)/h}, > {z, -Sqrt[(r1 + ((r2 - r1)*x)/h)^2 - y^2], > Sqrt[(r1 + ((r2 - r1)*x)/h)^2 - y^2]}]] > > >where r1 and r2 are the top and bottom radii of the section and h >is the height. This integral evaluates to include Logarithms and >imaginary numbers > >(I*Sqrt[h^2*r2]*(r1^2 + r1*r2 + r2^2)* > (Log[-2*I*h*r2] - Log[2*I*h*r2]))/(3*Sqrt[r2]) > >when the solution should be > >(1/3)*h*Pi*(r1^2+r1*r2+r2^2) > >Which, if you substitute r1=0 and r2=r you get the volume of >a cone. > >I am using Mathematica Version 4.1.2.0 >running on Windows 2000 > Use the assumptions option Simplify[ Integrate[1,{x,0,h}, {y,-(r1+((r2-r1)*x)/h),r1+((r2-r1)*x)/h}, {z,-Sqrt[(r1+((r2-r1)*x)/h)^2-y^2], Sqrt[(r1+((r2-r1)*x)/h)^2-y^2]}], Element[{h,r1,r2}, Reals]&&h>=0 && r2>0] (1/3)*h*Pi*(r1^2 + r2*r1 + r2^2) Bob Hanlon Chantilly, VA USA