Prove $f_n:\mathbb{R}\to\mathbb{R}$ defined by $f_n(x)=\frac{x^n}{x^n+1}$ converges pointwise to $f(x)=\frac{1}{2}1_{\{1\}}(x)+1_{(1,2]}(x)$. Prove that $\lim_{n\to\infty}\int_0^2\frac{x^n}{x^n+1}dx=\int_0^2f(x)dx$, even thought the convergence $f_n\to f$ is not uniform.
It's obvious that $f_n\to f$ pointwise and that $\int_0^2f(x)dx=1$. Furthermore, since each $f_n$ is continuous while $f$ is not, so we cannot have uniform convergency $f_n\to f$.
I'm stuck trying to prove $\lim_{n\to\infty}\int_0^2\frac{x^n}{x^n+1}dx=1$. I don't know how to deal with the integral; the best I could do was to notice $\frac{x^n}{x^n+1}=1-\frac{1}{x^n+1}$, so we could change the problem to proving that $\lim_{n\to\infty}\int_0^2\frac{dx}{x^n+1}=1$, but that didn't really help me.
Any suggestions?
Take $\varepsilon\in(0,1)$. Since $(f_n)_{n\in\mathbb N}$ converges uniformly to $f$ on $[0,1-\varepsilon]$ as well as on $[1+\varepsilon,1]$,$$\lim_{n\to\infty}\int_0^{1-\varepsilon}f_n(x)\,\mathrm dx=\int_0^{1-\varepsilon}f(x)\,\mathrm dx=0$$and$$\lim_{n\to\infty}\int_{1+\varepsilon}^2f_n(x)\,\mathrm dx=\int_{1+\varepsilon}^2f(x)\,\mathrm dx=1-\varepsilon.$$Furthemore,$$0\leqslant\int_{1-\varepsilon}^{1+\varepsilon}f_n(x)\,\mathrm dx\leqslant2\varepsilon.$$It follows from this that$$\lim_{n\to\infty}\int_0^2f_n(x)\,\mathrm dx=1=\int_0^2f(x),\mathrm dx.$$