Evaluate
$$\int_0^{\pi / 2} \frac{dx}{\sin x + \cos x + \tan x + \sec x + \csc x + \cot x} .$$
As in the linked question, applying the classical Weierstrass substitution, $$x = 2 \arctan t, \qquad dx = \frac{2 \,dt}{t^2 + 1},$$ transforms the integral to
$$
\int_0^1 \frac{2 t (1 - t)}{2 t^4 - 3 t^3 + 3 t^2 + t + 1}.
$$
One can show that the Galois group of the polynomial $$f(t) := 2 t^4 - 3 t^2 + 3 t^2 + t + 1$$ in the denominator of the integrand
is $D_8$, suggesting applying a transformation that takes advantage of that symmetry.*
The following shows one way of doing so, in particular transforming the integrand to one to which the Method of Partial Fractions can be applied somewhat more easily than the one in $t$. I don't know whether the particular substitution used here is in any sense the nicest choice.
Let $\alpha := \cot \frac{3 \pi}{8} = \sqrt{2} - 1$. Applying to the original integral the substitution
$$x = \frac{\pi}{4} - 2 \arctan (\alpha u), \qquad dx = -\frac{2 \alpha \,du}{\alpha^2 u^2 + 1} ,$$
simplifying considerably, and taking advantage of the evenness of the integration in $u$ gives that the integral is equal to
$$\frac{2 (8 + 5 \sqrt{2})}{7} \int_0^1 \frac{1 - u^2}{u^4 + \beta^4} du , \qquad \textrm{where } \beta := \frac{\sqrt{5 + 4 \sqrt{2}}}{\sqrt[4]{7}} .$$ Remark 1 The substitution $x \rightsquigarrow u$ is related to the Weierstrass substitution, $x \rightsquigarrow t$ by the linear fractional transformation $$t = \frac{\alpha (1 - u)}{\alpha^2 u + 1} .$$
Remark 2 Perhaps despite appearances the substitution $x \rightsquigarrow u$ is not particularly clever: It is the composition of a translation that centers the domain of integration on the origin, the classical Weierstrass substitution, and a dilation to make the coefficients and limits in the resulting integrand nicer.
Over $\Bbb Q(\beta) = \Bbb Q(\beta, \sqrt{2})$ (or just $\Bbb R$), the denominator of the integrand in $u$ factors into irreducible polynomials as
$$u^4 + \beta^4 = (u^2 + \sqrt{2} \beta u + \beta^2) (u^2 - \sqrt{2} \beta u + \beta^2),$$ so the rest of the computation can be handled with standard techniques: Applying the Method of Partial Fractions gives the decomposition
$$\frac{1 - u^2}{u^4 + \beta^4} = \frac{A u + B}{u^2 + \sqrt{2} \beta u + \beta^2} + \frac{C u + D}{u^2 - \sqrt{2} \beta u + \beta^2} .$$
Evenness of the integrand implies that $C = -A, D = B$, reducing the equation in the unknown coefficients to a $2 \times 2$ system in $A, B$, and some elementary algebra gives
$$A = -\frac{\beta^2 + 1}{2 \sqrt{2} \beta^3}, \qquad B = -\frac{1}{\beta^2} .$$
Separating each summand into the sum of a scalar multiple of $$\frac{u}{u^2 \pm \sqrt{2} \beta u + \beta^2} \qquad \textrm{and one of} \qquad \frac{1}{u^2 \pm \sqrt{2} \beta u + \beta^2} ,$$ and integrating respectively gives antiderivatives
$$\frac{1}{2} \log \left[\sqrt{2} \beta u \pm (\beta^2 + u^2)\right] \qquad \textrm{and} \qquad \arctan \left(1 \pm \frac{\sqrt{2} u}{\beta}\right) .$$ We can combine the two $\log$ terms with the identity $\operatorname{artanh} x = \frac{1}{2} \log \left(\frac{1 + x}{1 - x}\right)$, yielding
$$\operatorname{artanh} \left(\frac{u^2 + \beta^2}{\sqrt{2} \beta u}\right),$$
and we can combine the two $\arctan$ terms with the arctan sum identity, $\arctan x + \arctan y = \arctan \left(\frac{x + y}{1 - xy}\right)$, yielding
$$
\arctan \left(\frac{\beta^2}{u^2}\right) .
$$
Putting this all together gives essentially the given exact form, and a numerical evaluation suggests that the expressions indeed agree, with value $0.1760244214\ldots$.
*The discriminant of the irreducible quartic $f$ is $\Delta := 2^5 7^3$; now, (a) $f$ remains irreducible over $\Bbb Q(\sqrt{\Delta}) = \Bbb Q(\sqrt{14})$, and (b) the cubic resolvent of $f$ factors over $\Bbb Q$ as a product of an irreducible quadratic and a linear polynomial (up to a scalar multiple, $(2 x − 1) (4 x^2 − 4 x − 13)$), and these two facts together imply that $\operatorname{Gal}(f) \cong D_8$.