Integral from MIT Integration Bee 2023 Quarterfinals – $\lim_{n\to\infty} \frac{1}{n} \int_{0}^{n} \cos^2(\pi x^2/\sqrt{2}) \, \mathrm{d}x$

definite integralsintegration

This question is from the MIT Integration Bee 2023 Quarterfinal #2. I'm doing these integrals to improve my quick math skills, and was wondering if there's a way to solve this within two minutes.
The goal is to show that $$\lim_{n\to\infty} \frac{1}{n} \int_{0}^{n} \cos^2\left(\frac{\pi x^2}{\sqrt{2}}\right) \,\textrm{d}x = \frac{1}{2} $$

I've tried L'Hospital's Rule then FTC1 but I don't think the first part would even apply here. I'm not sure how to approach such a problem, especially if it's to be solved within two minutes.

Best Answer

Let $x=nt$ and then \begin{eqnarray} &&\frac{1}{n} \int_{0}^{n} \cos^2\left(\frac{\pi x^2}{\sqrt{2}}\right) \,\textrm{d}x \\ &=&\frac12 + \frac12\int_0^1\cos\left(\sqrt2\pi n^2t^2\right) \textrm{d}t\\ &=&\frac12 + \frac12\int_0^1\frac{1}{2\sqrt2\pi n^2t}\textrm{d}\sin\left(\sqrt2\pi n^2t^2\right)\\ &=&\frac12 + \frac{1}{4\sqrt2\pi n^2t}\sin\left(\sqrt2\pi n^2t^2\right)\bigg|_0^1+\frac{1}{4\sqrt2\pi n^2}\int_0^1\frac{\sin\left(\sqrt2\pi n^2t^2\right)}{t^2}\textrm{d}x. \end{eqnarray} Note $$ \frac{1}{4\sqrt2\pi n^2t}\sin\left(\sqrt2\pi n^2t^2\right)\bigg|_0^1=\frac{1}{4\sqrt2\pi n^2}\sin\left(\sqrt2\pi n^2\right). $$ Since $$\frac{1}{4\sqrt2\pi n^2}\bigg|\frac{\sin\left(\sqrt2\pi n^2t^2\right)}{t^2}\bigg|\le\frac14,$$ one has, by DCT, $$ \lim_{n\to\infty}\frac{1}{4\sqrt2\pi n^2}\int_0^1\frac{\sin\left(\sqrt2\pi n^2t^2\right)}{t^2}\textrm{d}x=\int_0^1\lim_{n\to\infty}\frac{1}{4\sqrt2\pi n^2}\frac{\sin\left(\sqrt2\pi n^2t^2\right)}{t^2}\textrm{d}x=0.$$ So $$\lim_{n\to\infty} \frac{1}{n} \int_{0}^{n} \cos^2\left(\frac{\pi x^2}{\sqrt{2}}\right) \,\textrm{d}x = \frac{1}{2}. $$