# Real Analysis - Integral of a sequence of functions

I am given the following function.

For $n \in \mathbb{N}$, define $f_n:[-1,1] \to \mathbb{R}$ by

$$f_n(x)=\sqrt{x^2+\frac1n \left( \cos \left( x^n \right) \right)^2}.$$

I need to determine

$$\lim_{n \to \infty}\int_{-1}^1f_n(x) \ dx.$$

I am trying to use the following theorem:

Let $(f_n)$ be a sequence of integrable functions that converge uniformly on $[a,b]$ to a function $f$, then $f$ is integrable on $[a,b]$ and

$$\lim_{n \to \infty}\int_a^bf_n=\int_a^bf.$$

I have proved that $f_n$ has pointwise limit function $f(x)=x \ \ \forall x \in [-1,1]$, but I am struggling to prove that $f_n$ converges uniformly to $f$. Here is what I have done so far.

\begin{align} \sup_{x \in [-1,1]}\left| f_n(x)-f(x) \right|&=\sup_{x \in [-1,1]}\left| \sqrt{x^2+\frac1n\left( \cos \left( x^n \right) \right)^2} -x\right| \\ &\leq \sup_{x \in [-1,1]}\left| \sqrt{x^2+\frac1n}-x \right|. \end{align}

But the $\sup$ of this is when $x=-1$, and so I have $\left| \sqrt{1+\frac1n}+1 \right| \to 2 \neq 0$ as $n \to \infty$.

Any help would be great!

• Are you sure it does not converge to $f\colon x\mapsto \lvert x\rvert$? – Clement C. Nov 30 '15 at 21:08
• Ah, that's true. So we have that $\lim_{n \to \infty}f_n(x)=\sqrt{x^2}=|x|?$ – Will Nov 30 '15 at 21:10
• Yes. ${}{}{}{}$ – Clement C. Nov 30 '15 at 21:19

If $f(x)=|x|$ we have \begin{eqnarray} \sup_{x \in [-1,1]}\left| f_n(x)-f(x) \right|&=&\sup_{x \in [-1,1]}\left| \sqrt{x^2+\frac1n\left( \cos \left( x^n \right) \right)^2} -|x|\right| \\ &\leq& \sup_{x \in [-1,1]}\left| \sqrt{x^2+\frac1n}-\sqrt{x^2} \right|\\ &=& \sup_{x \in [-1,1]}\frac{\left| \sqrt{x^2+\frac1n}-\sqrt{x^2} \right|\left| \sqrt{x^2+\frac1n}+\sqrt{x^2} \right|}{\left| \sqrt{x^2+\frac1n}+\sqrt{x^2} \right|}\\ &=& \sup_{x \in [-1,1]}\frac{\frac{1}{n}}{\left| \sqrt{x^2+\frac1n}+\sqrt{x^2} \right|}\to 0\\ \end{eqnarray}
Alternatively, for any $x\in [-1,1]$, $$|x| \leq f_n(x) \leq |x| + 1/n$$ where the second inequality is apparent by squaring both sides. Hence, $$|f_n(x) - |x|| \leq 1/n \quad\forall x\in [-1,1]$$ which proves uniform convergence.