$ \lim_{n \to \infty} \int_0^2 f_n(x)dx$ and $ \lim_{n \to \infty} f_n(x) \text{ for } x \in [0,2]$ For $n \in \mathbb{N}$ let $f_n:[0,2] \to \mathbb{R}$ be defined by
$$f_n(x) = 
\left\{
\begin{array}{ll}
n^3x^2, \text{ if } 0 \leq x \leq \frac{1}{n} \\ 
2n - n^2x \text{ if } \frac{1}{n} < x \leq \frac{2}{n} \\ 
0, \text{ else}
\end{array} 
\right.
$$
How can one calculate the following limits (if they exist):
$$ \lim_{n \to \infty} \int_0^2 f_n(x)dx$$
and 
$$ \lim_{n \to \infty} f_n(x) \text{ for } x \in [0,2]$$
And does it converge uniformly on $[0,2]$?
What I'm struggling with is calculating the integrals because I don't understand how it's done with the conditions $\text{ if } 0 \leq x \leq \frac{1}{n}$ and $\text{ if } \frac{1}{n} < x \leq \frac{2}{n}$
Can someone show me how it's done?
 A: For $n\geq1$, $$\displaystyle \displaystyle \int_0^2 f_n(x)\,dx=\int_0^{\frac{2}{n}}f_n(x)\,dx$$ 
$$\displaystyle  =\int_0^{\frac{1}{n}}n^3x^2\,dx+ \int_{\frac{1}{x}}^{\frac{2}{n}}(2n-n^2x)\,dx$$
$$ = \frac{1}{3}n^3x^3 \bigg|_0^{\frac{1}{n}} + (2xn-\frac{1}{2}n^2x^2)\bigg|_\frac{1}{n}^{\frac{2}{n}}$$
$$ = \frac{1}{3}-0+(4-2)-(2-\frac{1}{2})=\frac{5}{6}$$
Hence the limit, too is $\displaystyle \frac{5}{6}$. 
And no, it does not converge uniformly. There is no $n$ such that $|f_n(x)|<\epsilon$ on $(0,2)$ for any $\epsilon$. 
A: Just integrate:
$\displaystyle \int_0^2 f_n(x) \, dx = \int_0^{1/n} f_n(x) \, dx + \int_{1/n}^{2/n} f_n(x) \, dx = \int_0^{1/n} n^3x^2 \, dx + \int_{1/n}^{2/n} 2n-n^2x \, dx $
$\displaystyle = n^3\frac{x^3}{3} \Bigg \vert_0^{1/n} + 2nx -n^2 \frac{x^2}{2} \Bigg \vert_{1/n}^{2/n} = \frac{1}{3} + \left[4 -2 - \left(2 - \frac{1}{2}\right) \right] = \frac{1}{3} + 2 - \frac{3}{2} = \frac{5}{6}$
Thus, $\displaystyle \lim_{n \to \infty} \int_0^2 f_n(x) \, dx = \lim_{n \to \infty} \frac{5}{6} = \frac{5}{6}$
Note that $f_n(x)$ converges pointwisely to $f(x)=0$ on $[0,2]$. You can see it by fixing $x \in [0,2]$ and as $n$ goes to $\infty$ eventually you get $\frac{1}{n}<x$. That gives $f_n(x)=0$ for large enough $n$ by definition. So we need to check if this convergence is uniform. This can be done by "sup norm", that is $\displaystyle \lim_{n \to \infty} \sup\limits_{x \in [0,2]} |f_n(x) - f(x)|=0$ ?
Note that also $f_n(x)$ is increasing on $[0,\frac{1}{n}]$ and decreasing on $[\frac{1}{n},\frac{1}{2n}]$ as having negative slope for a line. Hence, the maximum attained at $x=\frac{1}{n}$ which gives $f\left( \frac{1}{n} \right) = n$. So we have
$\displaystyle \lim_{n \to \infty} \sup\limits_{x \in [0,2]} |f_n(x) - f(x)|= \lim_{n \to \infty} \sup\limits_{x \in [0,2]} |f_n(x)|= \lim_{n \to \infty} n = \infty $. That means the convergence is not uniform.
Note: Please feel free edit (to enrich) this answer.
