How to find $\lim\limits_{n \to \infty}n\int_{0}^{1}(\cos x-\sin x)^ndx$? I want to compute 
$$\lim\limits_{n \to \infty}n\int_{0}^{1}(\cos x-\sin x)^ndx$$
Someone helped me find the limit of the integral, which is $0$, but now I can't figure out this one. Also tried squeeze theorem but I only get only one side of it to converge to $1$. Moreover, I'm bound to using elementary calculus. 
 A: There is another elementary way to get going. First, notice that:
$$\cos x - \sin x = \sqrt{2}\sin(\pi/4 - x).$$ 
Therefore, your integral, which we denote by $I_n$ is equal to:
$$I_n = n2^{\frac n2}\int_0^1\sin^n(\pi/4 - x)dx.$$
On the other hand, you can use integration by parts twice to show that:
$$\int\sin^nxdx = \frac{-\cos x \hspace{3pt} \sin^{n-1}x}{n} + \frac{(n-1)}{n} \int \sin^{n-2} x dx.$$
You can combine these two to obtain an explicit formula for $I_n.$
Update: This turned out to be interesting if we restrict ourselves to only elementary calculus. First, write:
$$I_n = n2^{n/2}\int_0^{\tfrac{\pi}{4}}\sin^n\left(\frac{\pi}{4}-x\right)dx+n2^{n/2}\int_{\tfrac{\pi}{4}}^1\sin^n\left(\frac{\pi}{4}-x\right)dx = $$
$$ = n2^{n/2}\int_0^{\tfrac{\pi}{4}}\sin^n\left(x\right)dx+n2^{n/2}\int_{\tfrac{\pi}{4}-1}^0\sin^n\left(x\right)dx = A_n+B_n.$$
Now, using $\sin x\leq x:$
$$|B_n|\leq n2^{n/2}\int_{\tfrac{\pi}{4}-1}^0|\sin^n\left(x\right)|dx=n2^{n/2}\int^{1-\tfrac{\pi}{4}}_0\sin^n\left(x\right)dx\leq$$
$$\dfrac{n}{n+1}\left(1-\dfrac{\pi}{4}\right)\left(\sqrt{2} - \dfrac{\pi}{2\sqrt{2}}\right)^n\to 0.$$
Therefore, we simply need to study $A_n,$ which satisfies a rather simple recurrence relation (from integration by parts):
$$A_n = \dfrac{2n-2}{n-2}A_{n-2} - 1,\,\, A_1 = \sqrt{2}-1,\,\, A_2 = \dfrac{\pi}{2}-1.$$
Numerical evidence suggests that $A_n$ is positive, increasing and converging to $1$ as desired. Moreover, odd indices are of the form $\sqrt{2}a_n-b_n$ and the even indices are of the form $\pi c_n -d_n,$ where $a_n,b_n,c_n,d_n$ are all positive integers. In fact, one can easily find a closed form for $a_n:$
$$a_n = \dfrac{2^{3n}(n!)^2}{(2n)!},$$
while the closed form for $b_n$ seems to be very difficult, if possible at all. 
However, based on what I have tried, finishing using only elementary approach from here seems rather difficult. A naive method is to use induction to prove the monotonicity. But that amounts to showing the following estimate:
$$A_n>\dfrac{n}{n+2}$$
or equivalently:
$$\int^{\tfrac{\pi}{4}}_0\sin^n\left(x\right)dx>\dfrac{1}{2^{n/2}(n+2)} (\dagger)$$ 
But above seems tricky as using the naive inequality $\sin(x)\geq\dfrac{2\sqrt{2}}{\pi}x$ on $[0,\pi/4]$ proves to be a too crude. I tried strenghtening it further by using:
$$\sin(x)\geq \dfrac{3}{\pi}x\cdot 1_{[0,\pi/6]}+\left(\dfrac{6(\sqrt{2}-1)}{\pi}x+\dfrac{3-2\sqrt{2}}{2}\right)\cdot 1_{[\pi/6, \pi/4]}$$ 
which was again too strong. 
Lastly, one can technically find a explicit formula by doing the following:
$$\dfrac{A_{2n+1}}{(2n+1)2^n\sqrt{2}} = -\int_0^{\tfrac{\pi}{4}}(\sin^2(x))^nd(\cos x) = \int_{\tfrac{1}{\sqrt{2}}}^1(1-t^2)^ndt = $$
$$\sum_{k=0}^n\binom{n}{k}(-1)^{n-k}\cdot\dfrac{1-2^{-k-\frac 12}}{2k+1}.$$
But again, this is not the nicest looking sum to manipulate. 
Update: An elementary proof was found in this question and it was just a repeated application of integration by parts. Namely,
\begin{align}\int_0^{1/\sqrt{2}}\frac{t^n\,dt}{(1-t^2)^{1/2}}&=\frac{1}{n+1}\left(\left.\frac{t^{n+1}}{(1-t^2)^{1/2}}\right|_0^{1/\sqrt{2}}-\int_0^{1/\sqrt{2}}\frac{t^{n+2}\,dt}{(1-t^2)^{3/2}}\right)\\&=\frac{1}{n+1}\left(2^{-n/2}-\frac{1}{n+3}\left.\frac{t^{n+3}}{(1-t^2)^{3/2}}\right|_0^{1/\sqrt{2}}+\ldots\right)\\&>\frac{2^{-n/2}}{n+1}\left(1-\frac{1}{n+3}\right)=2^{-n/2}\frac{n+2}{(n+2)^2-1}>\dfrac{2^{n/2}}{n+2}.\end{align}
Thus, the proof is complete and should completely fall in the elementary calculus scope. 
A: I'm not sure how much calculus you know, if anything is foreign let me know and I'll try to leave an addendum in an edit. Also, I've been editing this answer over and over because I keep finding mistakes so hopefully it's converged to something sensible by now, but I can't be sure. 
Let $f(x)=\cos(x)-\sin(x)$. First, some facts about $f$ on $[0,1]$:


*

*$f(x)\leq1-x$, as you know from your other question,

*$f(x)\geq1-\frac{3}{2}x$, as $f(x) = \sqrt{2}\sin(\pi/4 - x)$ and so its derivative is never less than $-\sqrt{2}>-3/2$.


These together imply that for any $\delta\in(0,1)$ there exists an $0< M < 1$ so that $\vert f(x)\vert<M$ on the interval $[\delta,1]$.  
The idea behind the following is that for large $n$ most of the integral comes from a small neighbourhood of $0$, so we only keep a small slice around it.
Notice that $f''(0)<0$, so the function is concave on some interval $I=[0,x_0]$, i.e. for any $\delta\in I:$
$$
\forall t\in[0,\delta]:f(t)>1-\frac{t}{\delta}(1-f(\delta))
$$
This is because the RHS is a linear function connecting the points $(0,f(0))$ and $(\delta,f(\delta))$ and its derivative is smaller than $f'(0)$. Now split your integral as:
\begin{align*}
\int_0^1(\cos(u)-\sin(u))^n\mathrm{d}u=\int_0^\delta(\cos(u)-\sin(u))^n\mathrm{d}u+\int_\delta^1&(\cos(u)-\sin(u))^n\mathrm{d}u=\\
&=S_1(\delta;n) + S_2(\delta;n)
\end{align*}
Notice that as $\vert f(x)\vert<M$ on $[\delta,1]$, so we can estimate:
$$
\vert S_2(\delta;n)\vert<\left\vert\int_\delta^1(\cos(u)-\sin(u))^n\mathrm{d}u\right\vert<\int_\delta^1M^n\mathrm{d}u<M^n
$$
On the other hand, we can also estimate $S_1$:
$$
S_1(\delta;n)>\int_0^\delta\left(1-\frac{u}{\delta}(1-f(\delta)) \right)^n\mathrm{d}u=\delta\frac{1-f(\delta)^{n+1}}{1-f(\delta)}\frac{1}{n+1}
$$
Observe that
\begin{align*}
\lim_{n\rightarrow\infty}\delta\frac{1-f(\delta)^{n+1}}{1-f(\delta)}\frac{n}{n+1}&=\frac{\delta}{1-f(\delta)}\\
\lim_{n\rightarrow\infty}nM^n &=0
\end{align*}
The limits follow because $\vert f(\delta)\vert < 1$ and $\vert M\vert < 1$ and so those terms fall exponentially fast. Therefore:
\begin{align*}
nS_1(\delta;n)&>\frac{\delta}{1-f(\delta)}+\epsilon_1(n;\delta)\\
nS_2(\delta;n)&=0+\epsilon_2(n;\delta)
\end{align*}
Here $\epsilon_1$ and $\epsilon_2$ vanish in the limit of large $n$ for each $\delta$.
We finally have that for all $\delta\in(0,x_0]$:
$$
n\int_0^1(\cos(u)-\sin(u))^n\mathrm{d}u=nS_1(\delta;n)+nS_2(\delta;n)>\frac{\delta}{1-f(\delta)}+\epsilon_1(n;\delta)+\epsilon_2(n;\delta)
$$
We can quickly evaluate by L'Hospital's rule that 
$$
\lim_{\delta\rightarrow 0}\frac{\delta}{1-f(\delta)}=\lim_{\delta\rightarrow 0}\frac{1}{0-(-\sin(\delta)-\cos(\delta))}=1
$$
So for all $n,\delta$ (the left $\geq$ follows from estimates with $1-x$ that you've done yourself):
$$
1\geq n\int_0^1(\cos(u)-\sin(u))^n\mathrm{d}u\geq 1+\epsilon_3(\delta)+\epsilon_1(n;\delta)+\epsilon_2(n;\delta)
$$
$\epsilon_3$ has analogous meaning to the other two.  
Since we're dealing with functions of $n, \delta$ here, we have to be careful with taking the limit $n\rightarrow\infty$. In fact, just to be sure, let's do it by definition. Pick some $\eta>0$. Then, pick a $\delta'$ so small that $\vert\epsilon_3(\delta')\vert < \eta/3$. At this $\delta'$, we can pick an $N$ so large that $\vert\epsilon_1(n;\delta')\vert<\eta/3$ and $\vert\epsilon_2(n;\delta')\vert<\eta/3$ for all $n>N$. Due to the above inequalities, we now have
$$
\forall n>N:1+\eta>1\geq n\int_0^1(\cos(u)-\sin(u))^n\mathrm{d}u>1-\eta/3-\eta/3-\eta/3=1-\eta
$$
Thus we've directly established
$$
\lim_{n\rightarrow\infty}n\int_0^1(\cos(u)-\sin(u))^n\mathrm{d}u=1
$$
A: Alternative solution
For $n\ge 4$, we have
\begin{align*}
I_n &= n\int_0^{1/\sqrt{n}} (\cos x - \sin x)^n \mathrm{d} x
+ n\int_{1/\sqrt{n}}^{\pi/4} (\cos x - \sin x)^n \mathrm{d} x\\
&\quad + n\int_{\pi/4}^1 (\cos x - \sin x)^n \mathrm{d} x\\
&= I_{n, 1} + I_{n, 2} + I_{n, 3}.
\end{align*}
Let us prove that $\lim_{n\to \infty} I_{n, 1} = 1$, $\lim_{n\to \infty} I_{n, 2} = 0$,
and $\lim_{n\to \infty} I_{n, 3} = 0$.

*

*First, since $|\cos x - \sin x| = \sin x - \cos x \le \sin x \le \sin 1$ for all $x$ in $[\pi/4, 1]$, we have
$$|I_{n, 3}| \le n\int_{\pi/4}^1 |\cos x - \sin x|^n \mathrm{d} x
\le n (\sin 1)^n (1 - \pi/4).$$
Since $\lim_{n\to \infty} n (\sin 1)^n (1 - \pi/4) = 0$, by the squeeze theorem, we have
$$\lim_{n\to \infty} I_{n, 3} = 0.$$


*Second, it is easy to prove that $0\le \cos x - \sin x
\le \cos \frac{1}{\sqrt{n}} - \sin \frac{1}{\sqrt{n}} \le 1 - \frac{1}{\sqrt{n}}$ for
all $n\ge 4$ and all $x$ in $[1/\sqrt{n}, \pi/4]$. Thus, we have
$$0 \le I_{n, 2} \le n\left(1 - \tfrac{1}{\sqrt{n}}\right)^n\frac{\pi}{4}.$$
Since $\lim_{n\to \infty} n\left(1 - \tfrac{1}{\sqrt{n}}\right)^n = 0$, by the squeeze theorem, we have
$$\lim_{n\to \infty} I_{n, 2} = 0.$$


*Third, with the substitution $x = \frac{y}{\sqrt{n}}$, using $(\cos x - \sin x)^2 = 1 - \sin 2x$, we have
$$I_{n, 1}
= \int_0^1 \sqrt{n}\left(1 - \sin \frac{2y}{\sqrt{n}}\right)^{n/2} \mathrm{d} y.$$
It is easy to prove that, for all $y$ in $[0, 1]$ and all $n\ge 4$,
$$\left(1 - \frac{1}{n}\right)\frac{2y}{\sqrt{n}} \le \sin \frac{2y}{\sqrt{n}} \le \frac{2y}{\sqrt{n}}.$$
Thus, we have
$$\int_0^1 \sqrt{n}\left(1 - \frac{2y}{\sqrt{n}}\right)^{n/2} \mathrm{d} y \le I_{n, 1} \le \int_0^1 \sqrt{n}\left(1 -  \left(1 - \frac{1}{n}\right)\frac{2y}{\sqrt{n}}\right)^{n/2} \mathrm{d} y$$
which results in
$$\frac{n \left(1 - \left(1 - \frac{2}{\sqrt{n}}\right)^{n/2 + 1}\right)}{n+2}
\le I_{n, 1} \le \frac{n^2 \left(1 - \left(1 - \left(1 - \frac{1}{n}\right)\frac{2}{\sqrt{n}}\right)^{n/2 + 1}\right)}{(n+2)(n-1)}.$$
Since
\begin{align*}
\lim_{n\to \infty} \frac{n \left(1 - \left(1 - \frac{2}{\sqrt{n}}\right)^{n/2 + 1}\right)}{n+2} &= 1, \\
\lim_{n\to \infty} \frac{n^2 \left(1 - \left(1 - \left(1 - \frac{1}{n}\right)\frac{2}{\sqrt{n}}\right)^{n/2 + 1}\right)}{(n+2)(n-1)} &= 1,
\end{align*}
by the squeeze theorem, we have $\lim_{n\to \infty} I_{n, 1} = 1$.
Thus, we have $\lim_{n\to \infty} I_n = 1$.
We are done.
