Spherical Wedge

Author

Eric W. Weisstein
April 11, 2006

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

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

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

Plot

V5

<<Graphics`InequalityGraphics`

With[{θ=1,r=1},InequalityPlot3D[x^2+y^2+z^2<r^2&&-Tan[θ/2]<y/x<Tan[θ/2]&&x>0,{x},{y},{z},PlotPoints->20]
]

V6

arctan[x_,y_]:=Module[{res=ArcTan[x,y]},If[res>0,res,2π+res]]

With[{θ=.5,r=1},
RegionPlot3D[x^2+y^2+z^2<r^2&&0<arctan[x,y]<θ,{x,-r,r},{y,-r,r},{z,-r,r},Boxed->False,Axes->False,PlotPoints->50]
]

With[{θ=5,r=1},
RegionPlot3D[x^2+y^2+z^2<r^2&&0<arctan[x,y]<θ,{x,-r,r},{y,-r,r},{z,-r,r},Boxed->False,Axes->False,PlotPoints->50]
]

Volume

Numerical Check

(2/3)1.2

With[{θ=1.2,r=1},NIntegrate[Boole[x^2+y^2+z^2<r^2&&-Tan[θ/2]<y/x<Tan[θ/2]&&x>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]//Chop

Cartesian

v5.2

(v=Integrate[Boole[x^2+y^2+z^2<r^2&&-Tan[θ/2]<y/x<Tan[θ/2]&&x>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<θ<π&&r>0])//Timing

v/.{r->1,θ->1.2}//Chop

...wrong...

V7

(v=Integrate[Boole[x^2+y^2+z^2<r^2&&0<ArcTan[x,y]<θ],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<θ<π&&r>0])//Timing

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

Integrate[Boole[x^2+y^2+z^2<r^2&&0<x Tan[θ]<y],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<θ<π&&r>0,GenerateConditions->True]//Timing

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

With[{θ=.1,r=1},NIntegrate[Boole[x^2+y^2+z^2<r^2&&0<Tan[θ]<y/x],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]]//Chop

v6 byblis2

(v=Integrate[Boole[x^2+y^2+z^2<r^2&&-Tan[θ/2]<y/x<Tan[θ/2]&&x>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<θ<π&&r>0])//Timing

v6 ewwlap

(v=Integrate[Boole[x^2+y^2+z^2<r^2&&-Tan[θ/2]<y/x<Tan[θ/2]&&x>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<θ<π&&r>0])//Timing

With[{r=1,θ=1.2},(1/24) (E^(-I θ)) (-8 (E^(I θ)) π (r^3)+(Sqrt[2+(E^(-I θ))+(E^(I θ))]) π (r^3)+2 (E^(I θ)) (Sqrt[2+(E^(-I θ))+(E^(I θ))]) π (r^3)+(E^(2 I θ)) (Sqrt[2+(E^(-I θ))+(E^(I θ))]) π (r^3)+24 (E^(I θ)) NIntegrate[2 (((r^2)-(x^2)) ArcTan[((x (Sqrt[1+Cos[θ]]) Tan[(θ/2)])/(Sqrt[(r^2)-2 (x^2)+(r^2) Cos[θ]]))]+x (Sqrt[(((r^2)-2 (x^2)+(r^2) Cos[θ])/(1+Cos[θ]))]) Tan[(θ/2)]),{x,0,(Sqrt[((r^2)/(1+((Tan[(θ/2)])^2)))])}]+48 (E^(I θ)) π (r^3) ((Sin[(θ/4)])^2))]//Chop

Refine[Tan[x/2]>0,0<x<π]

Simplify[(Sqrt[((r^2)/(1+((Tan[(θ/2)])^2)))]),r>0&&0<θ<π]

FullSimplify[2 (((r^2)-(x^2)) ArcTan[((x (Sqrt[1+Cos[θ]]) Tan[(θ/2)])/(Sqrt[(r^2)-2 (x^2)+(r^2) Cos[θ]]))]+x (Sqrt[(((r^2)-2 (x^2)+(r^2) Cos[θ])/(1+Cos[θ]))]) Tan[(θ/2)]),r>0&&0<θ<π&&0<x<r Cos[(θ/2)]]

(1/24) (E^(-I θ)) (-8 (E^(I θ)) π (r^3)+(Sqrt[2+(E^(-I θ))+(E^(I θ))]) π (r^3)+2 (E^(I θ)) (Sqrt[2+(E^(-I θ))+(E^(I θ))]) π (r^3)+(E^(2 I θ)) (Sqrt[2+(E^(-I θ))+(E^(I θ))]) π (r^3)+24 (E^(I θ)) Integrate[2 (((r^2)-(x^2)) ArcTan[((x (Sqrt[1+Cos[θ]]) Tan[(θ/2)])/(Sqrt[(r^2)-2 (x^2)+(r^2) Cos[θ]]))]+x (Sqrt[(((r^2)-2 (x^2)+(r^2) Cos[θ])/(1+Cos[θ]))]) Tan[(θ/2)]),{x,0,r Cos[(θ/2)]},Assumptions->0<θ<π&&r>0&&Tan[(θ/2)]>0]+48 (E^(I θ)) π (r^3) ((Sin[(θ/4)])^2))

v6 hammer

Integrate[2 (((r^2)-(x^2)) ArcTan[(((Sqrt[2]) x Sin[(θ/2)])/(Sqrt[(r^2)-2 (x^2)+(r^2) Cos[θ]]))]+x (Sqrt[(r^2)-((2 (x^2))/(1+Cos[θ]))]) Tan[(θ/2)]),{x,0,r Cos[(θ/2)]},Assumptions->r>0&&0<θ<π]

...wrong...

Spherical

Integrate[(r^2)Sin[ϕ],{r,0,R},{θ,0,θ},{ϕ,0,π},Assumptions->R>0&&0<θ<π]

Integrate[(r^2)Sin[ϕ],{r,0,R},{θ,0,θ},{ϕ,0,π},Assumptions->R>0&&0<θ<π,GenerateConditions->True]

Integrate[(r^2)Sin[ϕ],{r,0,R},{θ,0,θ0},{ϕ,0,π},Assumptions->R>0&&0<θ<π]

Integrate[(r^2)Sin[ϕ],{r,0,R},{θ,-θ0/2,θ0/2},{ϕ,0,π},Assumptions->R>0&&0<θ<π]

Integrate[Boole[0<ρ<R&&0<θ<Θ](ρ^2)Sin[ϕ],{ρ,0,∞},{θ,0,2π},{ϕ,0,π},Assumptions->0<Θ<2π&&R>0]

((2 (R^3) Θ)/3)/.Θ->2π

Centroid

(xx=Integrate[x Boole[x^2+y^2+z^2<r^2&&-Tan[θ/2]<y/x<Tan[θ/2]&&x>0],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->0<θ<π&&r>0])//Timing

Integrate[r Cos[ϕ](r^2)Sin[ϕ],{r,0,R},{θ,0,θ0},{ϕ,0,π},Assumptions->R>0&&0<θ<π]

Invertia Tensor

i=With[{ρ=(M/((2 (R^3) q)/3))},ρ Integrate[InertiaTensor[{r,θ,ϕ},"CoordinateSystem"->"Spherical"](r^2)Sin[ϕ],{r,0,R},{θ,0,q},{ϕ,0,π},Assumptions->R>0&&q>0]
]//FullSimplify

TraditionalForm[i/.q->θ]

i/.q->2π