# Evaluate the limit $\lim\limits_{n\rightarrow \infty}\int_{0}^{\pi}\left|\sin(x)-\sin(2nx)\right|\text{ d}x$ [closed]

$$\lim_{n\rightarrow \infty}\int_{0}^{\pi}\left|\sin(x)-\sin(2nx)\right|\mathrm d x$$

I put proper big numbers to $$n$$ using calculator to estimate the answer. And then I figured out that the answer seems like $$\frac{8}{\pi}$$, but unfortunately I dont have any clues.

• What numbers did you add? Any techniques you used? Please add those to your question so that the answer would be more appropriate for you. Commented Aug 10, 2022 at 18:22
• i put like 12 at Wolfram and evaluate the difference with \frac{8}{\pi}. And it was almost 0. So i think the limit actually converge to it really fast, but i dont know any techniques that we can use to evaluate such limits including absolute value so,,, Commented Aug 10, 2022 at 18:26
• Does the limit exist in the first place?
– fwd
Commented Aug 10, 2022 at 18:58
• yes sir! n is the positive integers as usual Commented Aug 10, 2022 at 19:02
• just compute the integral explicitly for a given $n$ by splitting the domain to two regions according to whether $\sin x \geq\sin 2n x.$ Commented Aug 10, 2022 at 19:20

\begin{align} \int_0^\pi \left|\sin x - \sin(2nx)\right|\mathrm d x &= \frac1{2n}\int_{0}^{2n\pi} \left|\sin\left(\frac{x}{2n}\right) - \sin(x)\right|\mathrm dx\\ &= \frac{1}{2n} \sum_{k=0}^{n-1}\int_{2k\pi}^{2(k+1)\pi}\left|\sin\left(\frac{x}{2n}\right) - \sin(x)\right|\mathrm dx\\ &= \frac{1}{2n}\sum_{k=0}^{n-1}\int_0^{2\pi}\left|\sin(x) - \sin\left(\frac{x+2k\pi}{n}\right)\right|\mathrm d x\\ &\underset {n\to \infty} \to \frac1{4\pi} \int_0^{2\pi}\int_{0}^{2\pi}\left|\sin x - \sin y\right|\mathrm dx\,\mathrm dy\\ &= \frac1{2\pi} \int_0^{\pi}\int_{0}^{\pi}\left(\left|\sin x - \sin y\right| + \left|\sin x + \sin y\right|\right)\mathrm dx\,\mathrm dy\\ &= \frac2{\pi} \int_0^{\frac\pi2}\int_{0}^{\frac\pi2}\left(\left|\sin x - \sin y\right| + \left|\sin x + \sin y\right|\right)\mathrm dx\,\mathrm dy\\ &= \frac2\pi \int_0^{\frac\pi2}\int_{0}^{\frac\pi2}\left(\left|\sin x - \sin y\right| + \left|\sin x + \sin y\right|\right)\mathrm dx\,\mathrm dy\\ &= \frac4{\pi} \int_0^{\frac\pi2}\left(\int_{0}^{y}\sin y\,\mathrm dx + \int_{y}^{\frac\pi 2}\sin x\,\mathrm d x\right)\mathrm dy\\ &= \frac4\pi\int_0^{\frac\pi2} \left(y\sin y + \cos y\right)\mathrm d y\\ &= \frac4\pi \left[-y\cos y + 2\sin y\right]_{0}^{\frac\pi2}\\ &= \frac8\pi \end{align}

• In my opinion, last equality cannot be derived with just of the definition of double integral. Commented Aug 10, 2022 at 19:43
• That's a clever use of the definition of a single variable integral - after exchange of series and integral which is possible due to dominated convergence theorem. Once you have your final expression, you can subdivide $[0,2\pi]^2$ into several triangles and squares on which $\sin(x)-\sin(y)$ has no sign change on which you can evaluate the integral without the absolute value. The double integral evaluates to $32$ and the whole expression to $\frac{8}{\pi}$. Really nice and clever. Commented Aug 10, 2022 at 22:09
• @R_doxpikkx but you can derive it using dominated convergence theorem. Commented Aug 10, 2022 at 23:01
• yes i see~ i wrote it cz ur integral was 1/(2) * (integral) at first! Your solution is awesome~ Commented Aug 11, 2022 at 3:19

First off, I will leave it as an exercise to the reader to calculate that for a constant $$a \in [-1, 1]$$, we have $$\int_0^{2\pi} |a - \sin x| \, dx = 4 \sqrt{1-a^2} + 4a \arcsin a.$$ (As a hint, first consider the case $$a \ge 0$$. Using periodicity you can replace the interval of integration with $$[\arcsin a, 2\pi + \arcsin a]$$. Now split this interval into $$[\arcsin a, \pi - \arcsin a]$$ where $$a - \sin x \le 0$$ and $$[\pi - \arcsin a, 2\pi + \arcsin a]$$ where $$a - \sin x \ge 0$$.)

Now, in the original integral, suppose we split it into intervals $$[0, 2\pi/n], [2\pi/n, 4\pi/n], \ldots, [2k\pi/n, 2(k+1)\pi/n], \ldots, [2\pi - 2\pi/n, 2\pi]$$; and in each interval, choose some $$x_k^* \in [2\pi(k-1)/n, 2\pi k/n]$$. Then the $$\sin x$$ term is almost a constant, and if we replace $$\sin x$$ with the constant $$\sin x_k^*$$, we have $$\int_{2(k-1)\pi/n}^{2k\pi/n} |\sin x_k^* - \sin (2nx)| \, dx = \frac{1}{2n} \int_{2(k-1)\pi}^{2k\pi} |\sin x_k^* - \sin t| \, dt = \\ \frac{1}{2n} \int_0^{2\pi} |\sin x_k^* - \sin t| \, dt = \frac{2}{n} \left(\sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*)\right).$$ The error in this approximation is at most $$\int_{2(k-1)\pi/n}^{2k\pi/n} |\sin x - \sin x_k^*| \, dx$$. Fix $$\varepsilon > 0$$; then since the sine function is uniformly continuous, if $$n$$ is sufficiently large then we can bound $$|\sin x - \sin x_k^*|$$ by $$\frac{\varepsilon}{2\pi}$$. Thus, the total error over all intervals is bounded above by $$\int_0^{2\pi} \frac{\varepsilon}{2\pi} \,dx = \varepsilon$$.

The upshot from the error bounds above: we see that $$\int_0^{2\pi} |\sin x - \sin(2nx)|\,dx$$ has the same limit as $$\sum_{k=1}^n \frac{2}{n} \left( \sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*) \right) = \\ \frac{1}{\pi} \sum_{k=1}^n \left( \sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*) \right) \cdot \frac{2\pi}{n} = \\ \frac{1}{\pi} \sum_{k=1}^n \left( \sqrt{1 - \sin^2 x_k^*} + \sin x_k^* \arcsin(\sin x_k^*) \right) \Delta x_k$$ which has limit $$\frac{1}{\pi} \int_0^{2\pi} \left( \sqrt{1 - \sin^2 x} + \sin x \arcsin(\sin x) \right) dx.$$ In this final integral, by symmetry, we can reduce to evaluating the integral over $$[0, \pi/2]$$ and multiplying by 4. On this interval, the function being integrated is equal to $$\cos x + x \sin x$$. Therefore, the final result is equal to $$\frac{4}{\pi} \int_0^{\pi/2} (\cos x + x \sin x) dx = \frac{8}{\pi}.$$

Hint:

Split the interval $$I = [0,\pi]$$ to: $$I = \bigcup\limits_{k=0}^{2n-1} I_k$$ where $$I_k = \left[\dfrac{\pi k}{2n}, \dfrac{\pi (k+1)}{2n}\right).$$ You should be easily able to calculate a closed formula for: $$J_k = \int_{I_k}|\sin x - \sin 2nx|dx$$ because the choice of $$I_k$$ restricts $$2nx\in [\pi k, \pi (k+1)).$$ For instance, if you have an odd $$k$$, the absolute value can be forgotten because $$\sin x\geq 0$$ while $$\sin 2nx\leq 0.$$ For even $$k$$, you just need to do a little more work.

• Thank u! I actually tried it (Spliting the Interval) but it was quite demanding. But let me try it once again! Commented Aug 10, 2022 at 19:44