https://math.stackexchange.com/questions/4978106/working-through-a-difficult-integral-i-got-stuck-evaluating-the-subsequent-inte
In[]:=
θtest=RandomVariate[UniformDistribution[],10];​​Join[{{"θ (approx.)","{a, b}","{α, β, γ}","OP integral","closed form"}},Table[results[θ],{θ,θtest}]]//TableForm
Out[]//TableForm=
θ (approx.)
{a, b}
{α, β, γ}
OP integral
closed form
281π
1000
6.31021
2.21702
4.09319
8.52723
1.08327
0.16188
0.16188+0.
287π
1000
6.86979
3.49711
3.37268
10.3669
2.07379
0.171829
0.171829+0.
133π
1000
4.36242
2.02513
2.33729
6.38755
1.73288
0.0440731
0.0440731+0.
39π
200
8.99411
4.36844
4.62567
13.3626
1.88878
0.0677738
0.0677738+0.
11π
500
3.0413
2.37294
0.668355
5.41424
7.10085
0.00137273
0.00137273+0.
77π
250
5.19078
5.13086
0.0599203
10.3216
171.256
0.310676
0.310676+0.
63π
1000
7.18847
5.33713
1.85134
12.5256
5.76568
0.00777194
0.00777194+0.
259π
1000
2.07995
2.00142
0.0785287
4.08137
50.973
0.311701
0.311701+0.
103π
1000
5.91617
4.56287
1.3533
10.479
6.74335
0.0232981
0.0232981+0.
12π
125
7.41856
5.80002
1.61855
13.2186
7.16693
0.0181041
0.0181041+0.
In[]:=
θtest2=RandomVariate[UniformDistribution[],10];​​Table[results2[θ],{θ,Evaluate[θtest+π/2]}]//TableForm
Out[]//TableForm=
0.55879
0.55879
1.134
1.134
0.567512
0.567512
0.364606
0.364606
0.0387528
0.0387528
1.02902
1.02902
0.169472
0.169472
1.10111
1.10111
0.147161
0.147161
0.167568
0.167568

​

In[]:=
results[θ_]:=​​Module[​​{a=RandomReal[{2,10}],​​b,α,β,γ},​​​​b=RandomReal[{2,a}];​​α=a-b;​​β=a+b;​​γ=(β-α)/α;​​​​   {Rationalize[Round[θ/π,.001]]π,​​{a,b},​​{α,β,γ},​​NIntegrate[Sin[x]/Sqrt[a-bSin[x]],{x,0,θ}],​​    (2Sqrt[2])/Sqrt[-b]​​    (EllipticE[ArcSin[Sqrt[b/(b-a)]],(b-a)/(2b)]-​​EllipticE[ArcSin[Sqrt[b/(b-a)(1-Sin[θ])]],(b-a)/(2b)])-​​2/Sqrt[a-b](EllipticF[π/4,(2b)/(b-a)]-​​EllipticF[π/4-θ/2,(2b)/(b-a)])​​        }​​​​]
results2[θ_]:=​​Module[​​{a=RandomReal[{2,10}],​​b,α,β,γ},​​​​b=RandomReal[{2,a}];​​α=a-b;​​β=a+b;​​γ=(β-α)/α;   ​​   {​​   NIntegrate[Sin[x]/Sqrt[a-bSin[x]],{x,π/2,θ}],​​   ​​   2/Sqrt[α]NIntegrate[2Sqrt[1-x^2]/Sqrt[1+γx^2]-1/(Sqrt[1-x^2]Sqrt[1+γx^2]),{x,0,Sqrt[(1-Sin[θ])/2]}]   ​​   }​​​​]