Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Trouble calculating a volume

  • To: mathgroup at
  • Subject: [mg33830] Re: [mg33806] Trouble calculating a volume
  • From: BobHanlon at
  • Date: Fri, 19 Apr 2002 02:28:07 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

In a message dated 4/16/02 7:10:06 AM, jdm111 at 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
>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
>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
>Which, if you substitute r1=0 and r2=r you get the volume of
>a cone.
>I am using Mathematica Version
>running on Windows 2000

Use the assumptions option

   Element[{h,r1,r2}, Reals]&&h>=0 && r2>0]

(1/3)*h*Pi*(r1^2 + r2*r1 + r2^2)

Bob Hanlon
Chantilly, VA  USA

  • Prev by Date: Re: Driving me nuts
  • Next by Date: MathML Conference: First Announcement
  • Previous by thread: Trouble calculating a volume
  • Next by thread: Re: Trouble calculating a volume