# Find $\lim_{n \to \infty} \int_0^1 \frac{\cos\left (\frac{x^2}{n}\right)}{1+x^2} dx$

Find $$\lim_{n \to \infty} \int_0^1 \frac{\cos\left (\frac{x^2}{n}\right)}{1+x^2} dx$$

What I've done is use a theorem I found online, Dini's Theorem. The interval $[0,1]$ is compact, and since

$$\lim_{n\to \infty} f_n=\lim_{n\to \infty}\frac{ \cos\left (\frac{x^2}{n}\right)}{1+x^2} = \frac{1}{1+x^2}=f$$ then $f_n$ converges pointwise to $f$. Furthermore, $f_n$ is continuous on $[0,1]$ for each $n \in \mathbb{N}$ and $f$ is also continous on $[0,1]$. Since $f_n$ is monotonally increasing in $[0,1]$, then $f$ converges uniformly to $f$ in $[0,1]$.

Now, each $f_n$ is integrable in $[0,1]$, and the sequence $(f_n)_{n=1}^{\infty}$ is bounded. Thus, we can exchange the limit and the integral and get

$$\lim_{n \to \infty} \int_0^1 \frac{\cos\left (\frac{x^2}{n}\right)}{1+x^2} dx = \int_0^1 f dx = \frac{\pi}{4}$$

My question then is

Is my reasoning correct? Is there a way of proving the uniform convergence of $(f_n)_{n=1}^{\infty}$ to $f$ using only the definition of uniform convergence?

Using $1 - y^2/2 \leqslant \cos y \leqslant 1$, we have for $x \in [0,1]$,
$$\left|\frac{\cos(x^2/n)}{1 +x^2} - \frac{1}{1+x^2}\right| \leqslant |\cos(x^2/n) - 1| \leqslant \frac{x^4}{2n^2} \leqslant \frac{1}{2n^2} \to 0.$$
Hence, $f_n(x) \to f(x)$ uniformly.