Consider the function $f_n(x)$, which is a spike of height $n$ at $x = 1 / n$, then returns to 0 at $x = 2/n$, remaining at 0 until $x = 1$.
Claim: $f_n(x) \to 0$ for all $x \in [0,1]$.
Proofs: $f_n(0) = 0$ and therefore goes to 0. Let $a \in (0,1]$, then there exists some $N \in \mathbb N$ such that for $n \geq N$, $1 / n < a / 2$ and thus $2 / n < a$, so $f_n(a) = 0$, i.e. $f_n(a) \to 0$ as $n \to \infty$. Thus $f_n(x) \to 0$ for all $x \in [0,1]$. To see that the convergence is not uniform, consider $x_n = 1 /n$, then $f_n(x_n) = n$, i.e. for $\epsilon > 0$ given (WLOG choosing $\epsilon < 1$) we have displayed a sequences $x_n = 1 / n \in [0,1]$ such that $|f_n(x_n) - f(x_n)| = n \geq \epsilon$, ie.e we have a sequenced of continuous functions $f_n$ converging pointwise but not uniformly to a continuous $f$. Notice, as well
$$ \int_0^1 f_n = 1 \quad \text{however} \quad \int_0^1 \lim f_n = 0 $$
i.e. $\lim \int_0^1 f_n \neq \int_0^1 \lim f_n$.
Question: when is $\lim \int_I f_n = \int_I \lim f_n$?
Theorem: Let $(f_n)$ be a sequence of integrable functions on $I = [a,b]$. Suppose $f_n \rightrightarrows f$ on $I$. Then $f$ is Riemann integrable on $I$ and $\lim \int_I f_n = \int_I \lim f_n = \int_I f$
Proof: Since $f_n \rightrightarrows f$ on $I$, let $\epsilon > 0$ be given, there exists some $N \in \mathbb N$ such that if $n /geq N$,
$$ |f_n(x) - f(x)| < \frac{\epsilon}{4(b-a)} \qquad \forall x \in I $$
for this $N$, $f_N$ is integrable, thus there exists a partition $P = \{ x_0, x_1, \ldots, x_n \}$ of $I$ such that $U_{f_N}(P) - L_{f_N}(P) < \epsilon/2$.
$$ f(x) - f_n(x) \leq |f_n(x) - f(x)| < \frac{\epsilon}{4(b-a)} \quad \text{for }n \geq N $$
then $f(x) < \epsilon / 4(b-a) + f_N(x)$ for all $x \in I$. Thus
$$ \sup \{ f(x) : x \in [x_{k-1}, x_k] \} \leq \frac{\epsilon}{4(b-a)}+\sup\{ f_N(x) : x \in [x_{k-1}, x_k] \} $$
i.e. $U_f(P) \leq \frac{\epsilon}{4} + U_{f_N}(P)$ since
$$ \sum_{k=1}^n \frac{\epsilon}{4(b-a)}(x_k - x_{k-1}) = \frac{\epsilon}{4(b-a)}\sum_{k=1}^n x_k - x_{k-1} = \frac{\epsilon}{4(b-a)}(b - a) = \frac{\epsilon}{4} $$
similarly $L_{f_N}(P) \leq \epsilon / 4 + L_f(P)$ so that
$$ U_f(P) - L_f(P) \leq U_{f_N}(P) - L_{f_N}(P) + \frac{\epsilon}{4} + \frac{\epsilon}{4} < + \frac{\epsilon}{2} + + \frac{\epsilon}{2} = \epsilon $$
i.e. $f$ is integrable on $I$. Furthermore
$$ \left| \int_a^b f - \int_a^b f_n \right| = \left| \int_a^b f - f_n \right| \leq \int_a^b |f_n - f| \leq \int_a^b \frac{\epsilon}{4(b-a)} = \frac{\epsilon}{4} < \epsilon $$
i.e. $\lim \int_I f_n = \int_I f = \int_I \lim f_n$ and so $\int_I f_n \to \int_I f$.
What about the derivative? if $f_n \to f$ does $f_n' \to f'$?
No. Consider $f_n(x) = x^n$ on $[0,1]$
$$ f_n(x) \to f(x) = \begin{cases} 0 & x \in [0,1] \\ 1 & x = 1 \end{cases} $$
i.e. $(f_n)$ differentiable but $f_n \to f$ where $f$ is not even continuous, much less differentiable. Of course, the convergence here is not uniform, since $f$ is not continuous, but each $f_n$ is!
Weierstrass displayed the function
$$ f(x) = \sum_{k=1}^\infty \frac{\cos(3^k x)}{2^k} $$
if we consider $f_n(x) = \sum_{k=1}^n \frac{\cos(3^k x)}{2^k}$ we will show that $f_n \rightrightarrows f$ on $\mathbb R$. However, $f$ is continuous everywhere but nowhere differentiable, showing that even uniform convergence is not strong enough to guarantee the limit is differentiable.
Theorem: Let $J \subseteq \mathbb R$ be a bounded interval and $(f_n)$ be a sequence of functions from $J$ to $\mathbb R$. Suppose there exists some $x_0 \in J$ such that $f_n(x_0)$ converges and suppose that $(f_n')$ exists on $J$ and converges uniformly on $J$ to $g$. Then $(f_n)$ converges uniformly on $J$ to a function $f$ that is differentiable and $f' = g$.
Proof: next time