Finding the value of $\lim\limits_{n\rightarrow \infty}\sqrt{n}\int^{\frac{\pi}{4}}_{0}\cos^{2n-2}(x)\mathrm dx$ 
Finding the value of $\displaystyle \lim\limits_{n\rightarrow \infty}\sqrt{n}\int^{\frac{\pi}{4}}_{0}\cos^{2n-2}(x)\mathrm dx$

What I tried
Let $\displaystyle I_{k} =\int^{\frac{\pi}{4}}_{0}\cos^{k}(x)\mathrm dx=\int^{\frac{\pi}{4}}_{0}\cos^{k-1}(x)\cdot \cos (x)\mathrm dx$
$$ I_{k}=\left.\cos^{k-1}(x)\sin x\right|^{\frac{\pi}{4}}_{0}+(k-1)\int^{\frac{\pi}{4}}_{0}\cos^{k-2}(x)\left(1-\cos^2 x\right)\mathrm dx$$
$$ k I_{k}=\bigg(\frac{1}{2}\bigg)^{\frac{k}{2}}+(k-1)I_{k-2}$$
How do I solve it? Help me please.
 A: Put
\begin{equation*}
I_{n}=\sqrt{n}\int_{0}^{\pi/4}\cos^{2n-2}(x)\,\mathrm{d}x.
\end{equation*}
Via the substitutions $ y=\sin x $ and $ y=\frac{z}{\sqrt{n-1}} $ we get
\begin{gather*}
I_{n}=\sqrt{n}\int_{0}^{\pi/4}(1-\sin^2(x))^{n-1}\,\mathrm{d}x = \sqrt{n}\int_{0}^{1/\sqrt{2}}(1-y^2)^{n-1}\cdot\dfrac{1}{\sqrt{1-y^2}}\,\mathrm{d}y =\\[2ex]
\dfrac{\sqrt{n}}{\sqrt{n-1}}\int_{0}^{\sqrt{n-1}\left/\sqrt{2}\right.}\left(1-\dfrac{z^2}{n-1}\right)^{n-1}\cdot\dfrac{1}{\sqrt{1-\dfrac{z^2}{n-1}}}\,\mathrm{d}z = \dfrac{\sqrt{n}}{\sqrt{n-1}}\int_{0}^{\infty}f_{n(z)}\,\mathrm{d}z
\end{gather*}
where
\begin{equation*}
f_{n}(z)=\begin{cases}
\left(1-\dfrac{z^2}{n-1}\right)^{n-1}\cdot\dfrac{1}{\sqrt{1-\dfrac{z^2}{n-1}}}&\mbox{ if } 0<z<\sqrt{n-1}\left/\sqrt{2}\right.\\
0&\mbox{ if } z>\sqrt{n-1}\left/\sqrt{2}\right.
\end{cases}
\end{equation*}
Then $ 0 \le f_{n}(z)<e^{-z^2}\cdot \dfrac{1}{\sqrt{1-1/2}} $ and $\displaystyle \lim_{n\to \infty}f_{n}(z) = e^{-z^2}.$
Consequently, according to  Lebesgue's dominated convergence theorem
\begin{equation*}
\lim_{n\to \infty}I_{n} = \int_{0}^{\infty}e^{-z^2}\,\mathrm{d}z =\dfrac{\sqrt{\pi}}{2}.
\end{equation*}
Remark. This is an alternative answer where we use the beta function and the gamma function. From 
https://en.wikipedia.org/wiki/Beta_function
we get 
\begin{equation*}
\sqrt{n}\int_{0}^{\pi/2}\cos^{2n-2}(x)\,\mathrm{d}x = \dfrac{\sqrt{n}\,\Gamma(n-\frac{1}{2})}{\Gamma(n)}\cdot\dfrac{\sqrt{\pi}}{2}\to \dfrac{\sqrt{\pi}}{2}, \mbox{ as } n\to \infty
\end{equation*}
where we find the limit here https://en.wikipedia.org/wiki/Gamma_function
Since
\begin{equation*}
0 \le \sqrt{n}\int_{\pi/4}^{\pi/2}\cos^{2n-2}(x)\,\mathrm{d}x \le  \sqrt{n}\,2^{1-n}\cdot\dfrac{\pi}{4} \to 0, \mbox{ as } n\to \infty
\end{equation*}
we are ready.
A: Result
Let
$$f(n) = \int_0^\frac{\pi}{4} \cos(x)^n\,dx$$
then
$$\lim_{n\to \infty } \, \sqrt{n} f(n)=\sqrt{\frac{\pi }{2}} \simeq 1.2533141373155001\tag{1}$$
and
$$\lim_{n\to \infty } \, \sqrt{n} f(2n)=\frac{\sqrt{\pi }}{2} \simeq 0.8862269254527579\tag{2}$$
Here $(2)$ is the limit asked for in the OP.
Derivation
Decomposing the integration region we write
$$f(n) = i_1(n) - i_2(n)$$
where
$$i_1(n) = \int_0^\frac{\pi}{2} \cos(x)^n\,dx$$
$$i_2(n) = \int_\frac{\pi}{4}^\frac{\pi}{2} \cos(x)^n\,dx$$
Because in the integration interval of $i_2$ we have $\cos(x) \le \cos(\frac{\pi}{4})=\frac{1}{\sqrt{2}}$ we see immediately that $i_2$ goes to zero exponentially for $n\to\infty$. 
Hence we focus on $i_1$.
Changing variables $x\to\arctan(t)$, $dx\to\frac{1}{1+t^2}$ gives
$$i_1(n) = \int_0^{\infty } \left(t^2+1\right)^{-\frac{n}{2}-1} \, dt$$
then $t\to \frac{1}{\sqrt{r}}$ gives
$$i_1(n) = \frac{1}{2} \int_0^{\infty } r^{-\frac{3}{2}} \left(\frac{1}{r}+1\right)^{-\frac{n}{2}-1} \, dr$$
And finally $r\to \frac{1}{z}-1$ leads to
$$i_1(n) = \frac{1}{2} \int_0^1 z^{-\frac{1}{2}} (1-z)^{\frac{n}{2}-\frac{1}{2}} \, dz \\
= \frac{1}{2} B(\frac{1}{2},\frac{n+1}{2})=\frac{1}{2}
\frac{\Gamma(\frac{1}{2}) \Gamma(\frac{1+n}{2})} {\Gamma(1+\frac{n}{2})}\tag{3}$$
The asymptotic behavour is then found using Stirling's formula to give the results announced in the beginning.
Notice that for (2) we have to let $n\to 2n$ in $(3)$ before taking the limit.
Remark
Herewith we have also found that for the more general integral we have for any positive $k$ that
$$\lim_{n\to \infty } \, \sqrt{k n}\int_0^\frac{\pi}{4} \cos(x)^{k n}\,dx = \sqrt{\frac{\pi}{2}}\tag{4}$$
