Spherical Ring

Author

Eric W. Weisstein
September 24, 2014

This notebook downloaded from http://mathworld.wolfram.com/notebooks/SolidGeometry/SphericalRing.nb.

For more information, see Eric's MathWorld entry http://mathworld.wolfram.com/SphericalRing.html.

©2014 Wolfram Research, Inc. except for portions noted otherwise

Definitions

ineq=x^2+y^2+z^2<=R^2&&x^2+y^2>=r^2;

implreg=ImplicitRegion[ineq,{x,y,z}];

reg=RegionDifference[Ball[{0,0,0},R],Cylinder[{{0,0,-R},{0,0,R}},r]];

assum=0<r<R;

vol=(4/3) π (((-(r^2)+(R^2)))^(3/2));

Graphics

Diagram

Show[SolidData["SphericalRing","Image"],ImageSize->Small,Method->{"ShrinkWrap"->True}]

DiscretizeRegion

Block[{R=1,r=.4},Show[DiscretizeRegion[reg],ImageSize->Small]]//Timing

...hangs...

bug(280685); fixed in V10.0.2

RegionPlot3D

Block[{R=1,r=.4},
RegionPlot3D[ineq,{x,-R,R},{y,-R,R},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},Boxed->False,Axes->False,Method->{"ShrinkWrap"->True},ImageSize->Small,PlotPoints->75]
]

Block[{R=1,r=#},
RegionPlot3D[ineq,{x,-R,R},{y,-R,R},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},Boxed->False,Axes->False,PlotPoints->30,Method->{"ShrinkWrap"->True},ImageSize->Small]
]&/@{.8,.5,.3}

Block[{R=1,r=#},
RegionPlot3D[ineq,{x,-R,R},{y,-R,R},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},Boxed->False,Axes->False,Method->{"ShrinkWrap"->True},ImageSize->Small,PlotPoints->75]
]&/@{.8,.5,.3}

Properties

Centroid

Integrate Cylindrical

Assuming[assum,FullSimplify[(vol^(-1))Integrate[{ρ Cos[θ],ρ Sin[θ],z},{θ,0,2π},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,r,(Sqrt[(R^2)-(z^2)])}]]]//Timing

Integrate Cartesian

V8

Assuming[assum,FullSimplify[(vol^(-1))Integrate[{x,y,z}Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

V10

Assuming[assum,FullSimplify[(vol^(-1))Integrate[{x,y,z}Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

RegionCentroid

Assuming[assum,Simplify@RegionCentroid[implreg]]//Timing

Assuming[assum,RegionCentroid[reg]]//Timing

InertiaTensor

v

With[{ρ=(M/v)},
ρ Integrate[{{y^2+z^2,-x y,-x z},
{-x y,z^2+x^2,-y z},
{-x z,-y z,x^2+y^2}}Boole[x^2+y^2+z^2<R^2&&x^2+y^2>r^2],
{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<r<R]
]//TraditionalForm

{{-((M (π (r^4) (Sqrt[-(r^2)+(R^2)])+3 π (r^2) (R^2) (Sqrt[-(r^2)+(R^2)])-4 π (R^4) (Sqrt[-(r^2)+(R^2)])))/(10 π (((-(r^2)+(R^2)))^(3/2)))),0,0},{0,-((M (π (r^4) (Sqrt[-(r^2)+(R^2)])+3 π (r^2) (R^2) (Sqrt[-(r^2)+(R^2)])-4 π (R^4) (Sqrt[-(r^2)+(R^2)])))/(10 π (((-(r^2)+(R^2)))^(3/2)))),0},{0,0,-((M (3 π (r^4) (Sqrt[-(r^2)+(R^2)])-π (r^2) (R^2) (Sqrt[-(r^2)+(R^2)])-2 π (R^4) (Sqrt[-(r^2)+(R^2)])))/(5 π (((-(r^2)+(R^2)))^(3/2))))}}

Simplify[{{-((M (π (r^4) (Sqrt[-(r^2)+(R^2)])+3 π (r^2) (R^2) (Sqrt[-(r^2)+(R^2)])-4 π (R^4) (Sqrt[-(r^2)+(R^2)])))/(10 π (((-(r^2)+(R^2)))^(3/2)))),0,0},{0,-((M (π (r^4) (Sqrt[-(r^2)+(R^2)])+3 π (r^2) (R^2) (Sqrt[-(r^2)+(R^2)])-4 π (R^4) (Sqrt[-(r^2)+(R^2)])))/(10 π (((-(r^2)+(R^2)))^(3/2)))),0},{0,0,-((M (3 π (r^4) (Sqrt[-(r^2)+(R^2)])-π (r^2) (R^2) (Sqrt[-(r^2)+(R^2)])-2 π (R^4) (Sqrt[-(r^2)+(R^2)])))/(5 π (((-(r^2)+(R^2)))^(3/2))))}}/.r->(1/2) (Sqrt[-(L^2)+4 (R^2)])]//TraditionalForm

MeanCylindricalRadius

Integrate Cylindrical

Assuming[assum,FullSimplify[(vol^(-1))2π Integrate[ρ ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,r,(Sqrt[(R^2)-(z^2)])}]]]//Timing

Assuming[assum,FullSimplify[Subtract@@{ArcCsc[(R/(Sqrt[-(r^2)+(R^2)]))],ArcCos[(r/R)]}]]

%/.{R->Pi,r->E}//N

FullSimplify[-((3 (-2 (r^3)+r (R^2)+(((R^4) ArcCsc[(R/(Sqrt[-(r^2)+(R^2)]))])/(Sqrt[-(r^2)+(R^2)]))))/(8 ((r^2)-(R^2))))/.ArcCsc[(R/(Sqrt[-(r^2)+(R^2)]))]->ArcCos[(r/R)]]

Factor@FullSimplify[{((3 (-2 (r^3)+r (R^2)))/(8 ((r^2)-(R^2)))),((((R^4) ArcCos[(r/R)])/(Sqrt[-(r^2)+(R^2)]))/(8 ((r^2)-(R^2))))}]

FullSimplify[Subtract@@{(3/8)( ((r ((R^2)-2 (r^2)))/(((R^2)-(r^2))))+(((R^4) ArcCos[(r/R)])/(((-(r^2)+(R^2)))^(3/2)))),-((3 (-2 (r^3)+r (R^2)+(((R^4) ArcCos[(r/R)])/(Sqrt[-(r^2)+(R^2)]))))/(8 ((r^2)-(R^2))))}]

FullSimplify[(3/8)( ((r ((R^2)-2 (r^2)))/(((R^2)-(r^2))))+(((R^4) ArcCos[(r/R)])/(((-(r^2)+(R^2)))^(3/2))))]

Integrate Catrtesian

Assuming[assum,Simplify[(vol^(-1))Integrate[(Sqrt[(x^2)+(y^2)])Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

MeanSphericalRadius

Integrate Catrtesian

Assuming[assum,Simplify[(vol^(-1))Integrate[(Sqrt[(x^2)+(y^2)+(z^2)])Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

Assuming[assum,Simplify[(vol^(-1))Integrate[(Sqrt[(x^2)+(y^2)+(z^2)])Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},GenerateConditions->True]]]//Timing

... wrong ...

Integrate Cylindrical

Assuming[assum,FullSimplify[(vol^(-1))2π Integrate[(Sqrt[(ρ^2)+(z^2)])ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,r,(Sqrt[(R^2)-(z^2)])}]]]//Timing

-((3 (R ((r^2)-2 (R^2)) (Sqrt[-(r^2)+(R^2)])+(r^4) Log[((R+(Sqrt[-(r^2)+(R^2)]))/r)]))/(8 (((-(r^2)+(R^2)))^(3/2))))/.{R->1,r->.5}

Block[{R=1,r=.5},(1/((4/3)π((((R^2)-(r^2)))^(3/2))))NIntegrate[(Sqrt[(x^2)+(y^2)+(z^2)])Boole[ineq],{x,-R,R},{y,-R,R},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}]]//Chop

Limit[-((3 (R ((r^2)-2 (R^2)) (Sqrt[-(r^2)+(R^2)])+(r^4) Log[((R+(Sqrt[-(r^2)+(R^2)]))/r)]))/(8 (((-(r^2)+(R^2)))^(3/2)))),r->0]

MeanSquareCylindricalRadius

Integrate Catrtesian

Assuming[assum,Simplify[(vol^(-1))Integrate[(Sqrt[(x^2)+(y^2)])Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

Assuming[assum,Simplify[(vol^(-1))Integrate[(Sqrt[(x^2)+(y^2)])Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},GenerateConditions->True]]]//Timing

Integrate Cylindrical

Assuming[assum,FullSimplify[(vol^(-1))2π Integrate[(ρ^2)ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,r,(Sqrt[(R^2)-(z^2)])}]]]//Timing

MeanSquareSphericalRadius

Integrate Cylindrical

Assuming[assum,FullSimplify[(vol^(-1))2π Integrate[((ρ^2)+(z^2))ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,r,(Sqrt[(R^2)-(z^2)])}]]]//Timing

(1/5) (2 (r^2)+3 (R^2))/.{R->1,r->.5}

Block[{R=1,r=.5},(1/((4/3)π((((R^2)-(r^2)))^(3/2))))NIntegrate[((x^2)+(y^2)+(z^2))Boole[ineq],{x,-R,R},{y,-R,R},{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])}]]//Chop//Timing

Limit[(1/5) (2 (r^2)+3 (R^2)),r->0]

Integrate Cartesian

Assuming[assum,Simplify[(vol^(-1))Integrate[((x^2)+(y^2)+(z^2))Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

...wrong...

Cf. bug(280688)

Assuming[assum,Simplify[(1/((4/3) π (((-(r^2)+(R^2)))^(3/2))))Integrate[((x^2)+(y^2)+(z^2))Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},GenerateConditions->True]]]//Timing

...wrong...

Cf. bug(280688)

Surface Area

Cylinder (w/o caps) for interior + spherical zone for exterior

S=2(2π r(Sqrt[(R^2)-(r^2)])+2π R(Sqrt[(R^2)-(r^2)]))//FullSimplify

Limiting case of no cylinder -> sphere

Assuming[assum,Simplify[Limit[S,r->0]]]

Limiting case r goes to R -> 0

Assuming[assum,Simplify[Limit[S,r->R]]]

Volume

Cylinder+Caps

vcyl=π r^2 L;
vcap=(1/3)π (h^2)(3R-h);

Solve[L^2/4+r^2==R^2,r]

Solve[L^2/4+r^2==R^2,R]

vhole=FullSimplify[vcyl+2vcap]

FullSimplify[vhole/.h->R-L/2/.r->(1/2) (Sqrt[-(L^2)+4 (R^2)])]

FullSimplify[vhole/.h->R-L/2/.R->(Sqrt[((L^2)/4)+(r^2)]),L>0]

vhole2=FullSimplify[vhole/.h->R-L/2/.r->(1/2) (Sqrt[-(L^2)+4 (R^2)])/.L->2(Sqrt[(R^2)-(r^2)])]

Simplify[(4/3)π (R^3)-vhole2]

Integrate Cylindrical

Assuming[assum,FullSimplify[2π Integrate[ρ,{z,-(Sqrt[(R^2)-(r^2)]),(Sqrt[(R^2)-(r^2)])},{ρ,r,(Sqrt[(R^2)-(z^2)])}]]]//Timing

Integrate Cartesian V9

V9

$Version

Assuming[assum,Simplify[Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

Integrate Cartesian V10.0.0

{$MachineName,$Version,DateString[]}

Assuming[assum,Simplify[Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

...wrong...

Integrate[Boole[x^2+y^2+z^2<R^2&&x^2+y^2>r^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<r<R]//Timing

...wrong...

Integrate Cartesian V10.0.1

{$MachineName,$Version,DateString[]}

Assuming[assum,Simplify[Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

...wrong...

Integrate[Boole[x^2+y^2+z^2<R^2&&x^2+y^2>r^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<r<R]//Timing

...wrong...

Integrate Cartesian V10.1.0

{$MachineName,$Version,DateString[]}

Assuming[assum,Simplify[Integrate[Boole[ineq],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]]//Timing

...wrong...

Integrate[Boole[x^2+y^2+z^2<R^2&&x^2+y^2>r^2],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<r<R]//Timing

...wrong...

Special cases

Simplify[vol/.r->(1/2) (Sqrt[-(L^2)+4 (R^2)]),L>0]

Simplify[vol/.R->(Sqrt[((L^2)/4)+(r^2)]),L>0]

RegionMeasure

Assuming[assum,Simplify@RegionMeasure[reg]]//Timing

Assuming[assum,Simplify@RegionMeasure[implreg]]//Timing

Volume

V10

Assuming[assum,Simplify@Volume[reg]]//Timing

...wrong...

bug(280688)

Assuming[assum,Simplify@Volume[implreg]]//Timing

...wrong...

V10.1

{$HostName,$Version,DateString[]}

Assuming[assum,FullSimplify@Volume[reg]]//Timing

Assuming[assum,Simplify@Volume[implreg]]//Timing