I was calculating the volume of Reuleaux Cube , something like Reuleaux Tetrahedron.
1/24 (-24+24 Sqrt[2]-36 ArcCos[(2 Sqrt[2])/3]+54 ArcCot[Sqrt[2]]-13 ArcSin[Sqrt[2/3]]+13 ArcSin[1/Sqrt[3]]+5 ArcTan[1/Sqrt[2]]-108 ArcTan[5/Sqrt[2]]-39 ArcTan[Sqrt[2]]-20 ArcTan[3-2 Sqrt[2]]+108 ArcTan[3+2 Sqrt[2]])
It was really complicated.
I know the answer can be written as $\sqrt{2}-1 + \frac{97 \pi }{12}-27 \arctan\left(\sqrt{2}\right)$ or $\sqrt{2}-1+\frac{4 \pi }{3}-\frac{9}{2}\arcsin \left(\frac{23}{27}\right)$.
I tried this way to simplify it:
ArcTogether[expr_] := FullSimplify[
expr //. k_ (f : (ArcSin | ArcCos | ArcTan | ArcCot))[x_] :>
ArcTan[TrigExpand@Tan[k f[x]]] + k f[x] - ArcTan[Tan[k f[x]]]]
ArcExpand[expr_] := First@SortBy[expr /. a : ArcTan[x_] :> Table[
k ArcTan[z] /. First@Solve[{TrigExpand[Tan /@ (a == k ArcTan[z])],
a == k ArcTan[z]}, z, Reals], {k, 2, 20, 1}], LeafCount]
Then I use ArcExpand@ArcTogether[Last@ans] // FullSimplify
and got:
$$V=\sqrt{2}-1-\frac{\pi }{6}+\frac{3}{2} \arctan\left(\frac{1633}{13870 \sqrt{2}}\right)$$
This still a bit complex. I need some more powerful way to simplify.
This code $8X$ faster than the original one:
reg=Reduce[{(x+1/2)^2+(y+1/2)^2+(z+1/2)^2<1,x>0,y>0,z>0}]
int=Sequence@@(reg/.{And->List,Inequality[a_,Less,x_,Less,b_]:>{x,a,b}});
AbsoluteTiming[8 Integrate[1,int]]//FullSimplify