Crazy $\int_0^{\frac\pi{2}}\frac {\cos\left((1-2n)\arcsin\left(\frac{\sin(\theta)}{\sqrt 2}\right)\right)}{\sqrt{1-\frac{\sin^2 \theta}{2}}}d\theta$ $$\int_0^{\frac\pi{2}}\frac {\cos\left((1-2n)\arcsin\left(\frac{\sin(\theta)}{\sqrt 2}\right)\right)}{\sqrt{(1-\frac{\sin^2 \theta}{2})}}d\theta$$
I tried using some sort of substitutions but I think this must have some other way to solve and gave me another different integral and gamma functions and all
which now I'm uncertain if it's my cup of tea!
 A: $$\begin{align*}\int_0^{\frac\pi{2}}\frac {\cos\left((1-2n)\arcsin\left(\frac{\sin(\theta)}{\sqrt 2}\right)\right)}{\sqrt{(1-\frac{\sin^2 \theta}{2})}}d\theta
& = \frac{\pi}{2}{_2F_1}{(1-n, n;1;\frac 1{2})}\\
& = \frac {\pi}{2}\frac {\sqrt \pi}{\Gamma(1-\frac n{2})\Gamma(\frac 1{2} + \frac n{2})}\\& = \frac {\pi}{2}P_{-n}(1-2x)|_{x = \frac 1{2}}\\
\end{align*}$$


*

*In reply to the comment:
$\phi = \sin^{-1}(\sqrt x \sin(\theta))$
$$\left|\int_0^{\sin^{-1}\sqrt x} \frac {\cos\left((1-2n)\phi\right)}{\sqrt{(x-\sin^2\phi)}}d\phi = \frac {\pi}{2}{_2F_1}(1-n,n;1;x)\right|_{x = \frac 1{2}}$$


*

*#Curiosity
$$(1-y^2)^{-1/2}\cos(2n\sin^{-1} y) ={_2F_1}(\frac 1{2}+n, \frac 1{2}-n;\frac 1{2};y^2)$$
$(y, 2n)  ≡ (\sqrt x \sin \theta, 1-2n)$ & integrating w.r.t $\theta$ over $(0, \pi/2)$
A: $$\int_0^{\pi/2}\frac{\cos\left((1-2n)\arcsin\left(\frac{\sin\theta}{\sqrt 2}\right)\right)}{\sqrt{(1-\frac{\sin^2\theta}2)}}\,d\theta$$
Let,
$$u=\arcsin\frac{\sin\theta}{\sqrt{2}}\implies du=\frac1{\sqrt{1-\frac{sin^2\theta}2}}\frac{\cos\theta}{\sqrt2}d\theta$$
Multiply and divide by $\cos\theta$
$$\int_0^{\frac\pi2}\frac {\cos\left((1-2n)\arcsin\left(\frac{\sin(\theta)}{\sqrt2}\right)\right)}{\sqrt{(1-\frac{\sin^2\theta}2)}}\frac{\cos\theta}{\cos\theta}\,d\theta$$
And note that if $u=\arcsin\left(\frac{\sin\theta}{\sqrt2}\right)$ then $\cos \theta=\sqrt{1-2\sin^{2} u}$
$$\int_0^{\pi/4}\frac{\cos(u(1-2n))}{\sqrt{1-2\sin^{2} u}}du $$
By the double angle formulas we have $\cos2x=\cos^2x-\sin^2x$.
$$\int_0^{\pi/4}\frac{\cos(u(1-2n))}{\sqrt{\cos2u}}\,du$$
I hope you can go from here.
A: $$I = \int_0^{\frac {\pi}{2}}\frac{\cos{\left((1-2n)\sin^{-1}\left(\sqrt x\sin(\phi)\right)\right)}}{\sqrt{(1-x\sin^2(\phi))}}d\phi$$
$$\begin{align*} (1-x^2)^{-\frac 1{2}}\cos(2n\sin^{-1}x)
& = _2F_1(0.5 + n, 0.5-n;0.5;x^2)\\
& = \text{let, }2n =1-2n \text{ & } x = \frac {\sin\phi}{\sqrt 2} \text {integrating both sides w.r.t } \phi \text{ over } \in [0, \pi/2]\\
\int_0^{\frac {\pi}{2}} \frac {\cos{\left((1-2n)(\sin^{-1}\left(\frac {\sin\phi}-{\sqrt 2}\right)\right)}}{\sqrt{(1-\frac {\sin^2\phi}{2})}}d\phi
&=\int_0^{\frac {\pi}{2}} {_2F_1(1-n,n;0.5;\frac{\sin^2\phi}{2})}d\phi\\
& =\sum_{k\geq0}\frac {(1-n)_k(n)_k}{(0.5)_kk!2^k}\int_0^{\frac {\pi}{2}}{\sin^{2k}\phi}d\phi\\
& =\sum_{k\geq0}\frac {(1-n)_k(n)_k}{(0.5)_kk!2^k}\beta(0.5,k+0.5)\\
& =\sum_{k\geq0}\frac {(1-n)_k(n)_k}{\color{red}{(0.5)_k}k!2^k}\frac{\sqrt\pi\times \color{red}{\Gamma{(k+0.5)}}}{2\Gamma{(k+1)}}\\
& =\frac {\sqrt\pi}{2}\sum_{k\geq0} {\frac {(1-n)_k(n)_k}{(1)_k}\frac {(0.5)_k}{k!}}\\
& = \frac {\sqrt\pi}{2} {_2F_1}(1-n,n;1;0.5)\\
\end{align*}$$
You can use: $$ {_2F_1}(a, 1-a;b;0.5) = \frac {2^{1-b}\sqrt\pi \Gamma(b)}{\Gamma{(\frac{a+b}{2})}\Gamma{(\frac{b-a+1}{2})}}$$
(I don't know what this Identity is called nor do I remember where I read these all)
Now, Where I found that very first formula and all is other part of the story(I found that by differentiating 0.5sin(2narcsinx)/n = F(0.5+n,0.5-n;0.5;x^2)
If any typo let it be  blamed in the name of Dyslexia
Cheers:))
