# Limit of integral with cos and sin

Calculate

$$\lim _{n\to \infty }\left(n-n^2\int _0^{\frac{\pi }{4}}(\cos x-\sin x)^ndx\:\right)$$

I have tried many substitutions but nothing seems to work. How can I approach this ?

EDIT : I have tried writing $\cos x = \sin(\pi/2-x)$ and then apply the formula for $\sin a - \sin b$

• @Dr.SonnhardGraubner I edited and that's the form I got most value from ( I think). Any other substitution to rewrite the bounds were kind of useless – Liviu Mar 3 '17 at 17:41

Noticing that

$$\cos x - \sin x = \sqrt 2 \left( \frac 1 {\sqrt 2} \cos x - \frac 1 {\sqrt 2} \sin x \right) = \sqrt 2 \left( \cos \frac \pi 4 \cos x- \sin \frac \pi 4 \sin x \right) = \sqrt 2 \cos \left( x + \frac \pi 4 \right) ,$$

the integral inside the limit becomes

$$I_n = \sqrt 2 ^n \int \limits _0 ^{\frac \pi 4} \cos^n \left( x + \frac \pi 4 \right) \ \Bbb d x = \sqrt 2 ^n \int \limits _{\frac \pi 4} ^{\frac \pi 2} \cos^n t \ \Bbb d t .$$

The substitution $t = \arccos u$ transforms it into:

$$I_n = \sqrt 2 ^n \int \limits _{\frac 1 {\sqrt 2}} ^0 u^n \frac {-1} {\sqrt {1 - u^2}} \ \Bbb d u = \sqrt 2 ^n \int \limits _0 ^{\frac 1 {\sqrt 2}} \frac {u^n} {\sqrt {1 - u^2}} \ \Bbb d u = - \sqrt 2 ^n \int \limits _0 ^{\frac 1 {\sqrt 2}} u^{n-1} \frac {-2u} {2 \sqrt {1 - u^2}} \ \Bbb d u = \\ - \sqrt 2 ^n u^{n-1} \sqrt{1-u^2} \Bigg| _0 ^{\frac 1 {\sqrt 2}} + \sqrt 2 ^n \int \limits _0 ^{\frac 1 {\sqrt 2}} (n-1) u^{n-2} \sqrt{1-u^2} \ \Bbb d u = \\ - 1 + (n-1) \sqrt 2 ^n \int \limits _0 ^{\frac 1 {\sqrt 2}} u^{n-2} \frac {1-u^2} {\sqrt{1-u^2}} \ \Bbb d u = \\ - 1 + (n-1) \sqrt 2 ^n \int \limits _0 ^{\frac 1 {\sqrt 2}} \frac {u^{n-2}} {\sqrt{1-u^2}} \ \Bbb d u - (n-1) \sqrt 2 ^n \int \limits _0 ^{\frac 1 {\sqrt 2}} \frac {u^n} {\sqrt{1-u^2}} \ \Bbb d u = \\ - 1 + 2 (n-1) I_{n-2} - (n-1) I_n ,$$

whence we get that

$$I_n = - \frac 1 n + 2 \frac {n-1} n I_{n-2} .$$

If the expression given in the problem is

$$x_n = n - n^2 I_n$$

then

$$I_n = \frac 1 n- \frac 1 {n^2} x_n ,$$

so combining this with the recursion found above gives us

$$\frac 1 n- \frac 1 {n^2} x_n = - \frac 1 n + 2 \frac {n-1} n \left( \frac 1 {n-2} - \frac 1 {(n-2)^2} x_{n-2} \right) ,$$

whence, for $n \ge 3$, we finally get the recursion

$$x_n = \frac {2n} {n-2} + 2 \frac {n(n-1)} {(n-2)^2} x_{n-2} .$$

Assuming that $x_n \to l \in \Bbb R$ then, passing to the limit, we get $l = 2 + 2l$, i.e. $l = -2$. Of course, it remains to show that $l \ne \pm \infty$. I am too tired now, though, so I'll leave it for another time.

• This is a long answer that underwent many modifications before being posted. If anybody sees errors (hopefully none of them fatal), please signal them to me in comments, and I shall fix them tomorrow. Thank you. – Alex M. Mar 3 '17 at 22:04
• I've came back at this problem and realised I didn't find any way to prove that the limit exists. Can you help me out, please ? – Liviu Mar 11 '17 at 21:53

A beginning: Near $0,$ $\cos x - \sin x = 1-x +O(x^2).$ Let's ignore the $O(x^2)$ term. Then we're looking at

$$\tag 1 n-n^2\int_0^{\pi/4} (1-x)^n\,dx = n-n^2[1/(n+1) - (1-\pi/4)^{n+1}/(n+1)].$$

Verify that $(1) \to 0.$ So I would guess the limit is $0.$ That's not a proof of course.

I would also point out that since $(\cos x - \sin x)^n \to 0$ exponentially fast on $[a,\pi/4]$ for any $a\in (0, \pi/4),$ that part of of the integral can be ignored. It's all about what's happening on $[0,a].$

This is related to a uniformly convergence $f_n(x)=(cos(x)-sin(x))^n$

Theorem: if $f_n(x)$ uniformly converges to $f(x)$ and each is integrable then $f(x)$ is integrable and $lim$$\int_a^b f_n(x) \,dx =\int_a^b f(x) \,dx$

Prove that the function uniformly converges to $0$ on your interval and use the theorem above.

The function does converges to $1$ at $x=0$, split the integral to $\int_{0}^{\epsilon} +\int_\epsilon^{\pi/4}$ and show that the right integral converges to zero and the left can be made as small as you wish.

• Just one word: no. – Alex M. Mar 3 '17 at 21:57