Circular Sector Line Picking

Author

Eric W. Weisstein
August 2, 2010

This notebook downloaded from http://mathworld.wolfram.com/notebooks/ComputationalGeometry/CircularSectorLinePicking.nb.

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

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

Additional Authors

Formula due to
P. Le Conte
May 10, 2007

Formula

(d1=(16/(5(ϕ^2)))(Integrate[(r^2),{α,0,ϕ},{θ,0,(π/2)-(α/2)},{r,0,((Sin[α])/(Sin[θ+α]))}]+Integrate[(r^2),{α,0,ϕ},{θ,(π/2)-(α/2),(π/2)},{r,0,2Cos[θ]}]))//Timing

(d2=(16/(5(ϕ^2)))(Integrate[(r^2),{α,0,ϕ},{θ,0,(π/2)-(α/2)},{r,0,((Sin[α])/(Sin[θ+α]))},Assumptions->0<ϕ<π]+Integrate[(r^2),{α,0,ϕ},{θ,(π/2)-(α/2),(π/2)},{r,0,2Cos[θ]},Assumptions->0<ϕ<π]))//Timing

dd=FullSimplify[d2,0<ϕ<π]

dd=(1/(135 (ϕ^2)))2 (-48 ArcTanh[Cot[(ϕ/4)]]-6 Cos[2 ϕ]+3 (-9 Cos[ϕ]+Cos[3 ϕ]) Log[1+Csc[(ϕ/2)]]-744 Sin[(ϕ/2)]-2 Sin[((3 ϕ)/2)]+6 (1-4 I π+64 ϕ+Log[16]+4 Log[Csc[ϕ]]+Sin[((5 ϕ)/2)]));

dist[ϕ_]:=(1/(5 (ϕ^2)))16 ((4/27) (12 ϕ-27 Sin[(ϕ/2)]+Sin[((3 ϕ)/2)])+(1/216) (6-24 I π-6 Cos[2 ϕ]+3 Log[256]+24 Log[1-Cot[(ϕ/4)]]-24 Log[1+Cot[(ϕ/4)]]+24 Log[Csc[ϕ]]-27 Cos[ϕ] Log[Csc[(ϕ/2)] (((Cos[(ϕ/4)]+Sin[(ϕ/4)]))^2)]+3 Cos[3 ϕ] Log[Csc[(ϕ/2)] (((Cos[(ϕ/4)]+Sin[(ϕ/4)]))^2)]+120 Sin[(ϕ/2)]-34 Sin[((3 ϕ)/2)]+6 Sin[((5 ϕ)/2)]));

FullSimplify[d-dd]

Plot[#,{ϕ,0,2π},PlotRange->All]&/@{d,dd}

Plot[d,{ϕ,0,2π},PlotRange->{0,1},PlotStyle->Red,AxesLabel->TraditionalForm/@{θ,HoldForm[d][θ]}]

dist2[ϕ_]:=(8/((45^2)(ϕ^2)))(Log[Sin[(1/2)ϕ]+1](((Cos[ϕ])^3)-3Cos[ϕ]-2)-(((Cos[ϕ])^3)-3Cos[ϕ]+2)Log[Sin[(1/2)ϕ]]+32ϕ+(1/2)Sin[(5/2)ϕ]+((Sin[ϕ])^2)-62Sin[(1/2)ϕ]-(1/6)Sin[(3/2)ϕ])

FullSimplify[dist[ϕ]-d]

Limit[(8/((45^2)(ϕ^2)))(Log[Sin[(1/2)ϕ]+1](((Cos[ϕ])^3)-3Cos[ϕ]-2)-(((Cos[ϕ])^3)-3Cos[ϕ]+2)Log[Sin[(1/2)ϕ]]+32ϕ+(1/2)Sin[(5/2)ϕ]+((Sin[ϕ])^2)-62Sin[(1/2)ϕ]-(1/6)Sin[(3/2)ϕ]),ϕ->2π]

%/.ϕ->.021

Special Values

expr=FullSimplify[Limit[d,ϕ->#,Direction->1]&/@{π/2,π,2π}]

N[expr,20]

<<Utilities`Simplify`

FunctionExpand[expr]//FullSimplify//LogExpand

FullSimplify[6Log[2(Sqrt[2])-2]+48π-94(Sqrt[2])+3]//LogExpand

FullSimplify[Subtract@@{(3-94 (Sqrt[2])+48 π+6 Log[2]+Log[99-70 (Sqrt[2])]),3-94 (Sqrt[2])+48 π+6 Log[2]-6 Log[1+(Sqrt[2])]}]

FullSimplify[Limit[dist[ϕ],ϕ->#,Direction->1]]&/@{π/2,π,2π}

FullSimplify[Limit[dist[ϕ],ϕ->#,Direction->-1]]&/@{π/2,π,2π}

Quadrant

pts=With[{n=10^7},#[[1]]{Cos[#[[2]]],Sin[#[[2]]]}&/@Transpose[{Sqrt[RandomReal[1,n]],RandomReal[Pi/2,n]}]
];//Timing

ListPlot[Take[pts,10^4],AspectRatio->Automatic,PlotRange->All]

d=Norm[Subtract@@#]&/@Partition[pts,2];//Timing

d=Sqrt[(#[[1]]-#[[2]]).(#[[1]]-#[[2]])]&/@Partition[pts,2];//Timing

Through[{Mean,Variance}[d]]

(dist[π/2]//FunctionExpand//FullSimplify)/.Log[512]->9Log[2]

FullSimplify[%]

N[%]

Half-Disk

pts=With[{n=10^7},#[[1]]{Cos[#[[2]]],Sin[#[[2]]]}&/@Transpose[{Sqrt[RandomReal[1,n]],RandomReal[Pi,n]}]
];//Timing

ListPlot[Take[pts,10^4],AspectRatio->Automatic,PlotRange->All]

d=Sqrt[(#[[1]]-#[[2]]).(#[[1]]-#[[2]])]&/@Partition[pts,2];//Timing

Through[{Mean,Variance}[d]]

Limit[dist[ϕ],ϕ->π]//FullSimplify

N[%]

Disk

pts=With[{n=10^7},#[[1]]{Cos[#[[2]]],Sin[#[[2]]]}&/@Transpose[{Sqrt[RandomReal[1,n]],RandomReal[2Pi,n]}]
];//Timing

ListPlot[Take[pts,10^4],AspectRatio->Automatic,PlotRange->All]

d=Sqrt[(#[[1]]-#[[2]]).(#[[1]]-#[[2]])]&/@Partition[pts,2];//Timing

Through[{Mean,Variance}[d]]

Limit[dist[ϕ],ϕ->2π,Direction->1]//FullSimplify

N[%]