Group Abstract Group Abstract

Message Boards Message Boards

Volume of spherical cap

GROUPS:
The circle x² + y² = a² is rotated around the y-axis to form a solid sphere of radius a. A plane perpendicular to the y-axis at y=a/2 cuts off a spherical cap from the sphere. What fraction of the total volume of the sphere is contained in the cap?
POSTED BY: beatriz hernandez
Answer
8 months ago
You could find the volume of the cap with the following integral in Mathematica:
\[Pi] Integrate[a^2 - y^2, {y, a/2, a}]
but you could also solve that integral by hand (it's a very easy one).
The requested ratio can then be calculated as Vcap / Vsphere.
POSTED BY: Luca M
Answer
8 months ago
How would you set it up as an integral?
POSTED BY: beatriz hernandez
Answer
8 months ago
The same result as Luca M gave can also be accomplished leaving more thinking to Mathematica, using Boole, which allows defining region of integration through inequalities:
Integrate[Boole[x^2 + y^2 + z^2 < a^2 && y > a/2],
  {y, -Infinity, Infinity}, {x, -Infinity, Infinity}, {z, -Infinity, Infinity},
  Assumptions -> a > 0]
Mathematica is not always that clever integrating over implicit regions. Even in this case, it's best to use order of y, x, z instead of x, y, z to get result quickly.
POSTED BY: Jari Kirma
Answer
8 months ago

The following figure might help...
POSTED BY: Luca M
Answer
8 months ago
Luca, this is a very nice plot! Just a general advice - avoid using Subscript or similar if you want to paste readable, much more compact code on Community. Subscript of course will not parse as subscript. Instead of Subscript[r, k] you can always use rk or r if it is a function. For other general tips on smooth posting take a look at: How to type up a post: editor tutorial & general tips.
POSTED BY: Moderation Team
Answer
8 months ago
Thanks "Moderation Team" but how I could post some mathematical formulas (with subscripts and superscripts etc.) mixed with text in the Community threads? I had to convert my text to an image to get the desired result. Is there some other way? Would it be possible to insert something like LaTex code?
POSTED BY: Luca M
Answer
8 months ago
For now, if the formulas are not code - images will do. In the future we may implement some functionality for entering formulas.
POSTED BY: Moderation Team
Answer
8 months ago