Improper integral containing $\sqrt{\cos x-\frac1{\sqrt 2}}$ in the denominator

$$I=\frac\pi{\sqrt[4]2}+\sqrt{20-14\sqrt2}\ K\!\left(2\sqrt2-3\right)+\sqrt{2+\sqrt2}\ E\!\left(2\sqrt2-3\right)\\-2\sqrt{2-\sqrt2}\ \Pi\left(\sqrt2-1,\,2\sqrt2-3\right)$$ where $K(m), E(m), \Pi(n,m)$ are the complete elliptic integrals of the first, second and third kind: $$K(m)={\large\int}_0^{\pi/2}\frac{d\theta}{\sqrt{1-m\sin^2\theta}}$$ $$E(m)={\large\int}_0^{\pi/2}\sqrt{1-m\sin^2\theta}\,d\theta$$ $$\Pi(n,m)={\Large\int}_0^{\pi/2}\frac{d\theta}{\left(1-n\sin^2\theta\right)\sqrt {1-m\sin^2\theta}}$$ Note that this notation uses the parameter $m=k^2$ rather than the modulus $k$, that may differ from a convention used in other places.


With $t=\cos(x)$, we see it is an elliptic integral, $$ I = \int_{1/\sqrt{2}}^1 \frac{dt}{t^2\sqrt{(1-t^2)(t-1/\sqrt{2})}} $$

added

Maple gets: if $0<a<1$, then $$ \int _{a}^{1}\!{\frac {dt}{{t}^{2}\sqrt { \left( 1-t^2 \right) \left( t-a \right) }}}{} =-{\frac {\sqrt {2}{\bf K} \left( 1 /2\,\sqrt {-2\,a+2} \right) }{a}} +{\frac {\sqrt {2} \left( a+1 \right) {\bf E} \left( 1/2\,\sqrt {-2\,a+2} \right) }{a \left( 1+a \right) }} +\frac{1}{\sqrt {2}} \left( a+1 \right) {\bf \Pi} \left({\frac {a-1}{2a}}, \frac{\sqrt {-2\,a+2}}{2} \right) {a}^{-2} $$ and in particular with $a=1/\sqrt{2}$, $$ I = 2\,{\bf E} \left( 1/2\,\sqrt {2-\sqrt {2}} \right) -2\,{\bf K} \left( 1/2\,\sqrt {2-\sqrt {2}} \right) + \left( 1+\sqrt {2 } \right) {\bf \Pi} \left( 1/4\, \left( -2+\sqrt {2} \right) \sqrt {2},1/2\,\sqrt {2-\sqrt {2}} \right) \approx 3.338954 $$ where Maple's notation uses the modulus $k$.