My textbook is making an example of how uniform convergence of sequences of functions is important. As and important the author shows that, in general, pointwise convergence does not preserve some desired properties (when the sequence of functions is compared its limiting function $f$). Here's the example sequence: let $f_n(x)$ be defined, for $n \geq 2$ by
$$f_n(x) = \begin{cases} n^2x,& 0 \leq x \leq 1/n \\ -n^2(x -\frac{2}{n}), &1/n \leq x \leq 2/n \\ 0, &\text{ otherwise} \end{cases}$$
The author claims that clearly the the area under the piecewise defined curve is $1$ for all $n \geq 2$. I understand this and agree, and have shown this simply by appealing to the geometric formula for the area of a triangle. But then the author claims that it can be shown by the reader that $ f_n \to 0 $ so that
$$\int_0^1 f(x)\, dx = 0 \neq 1 = \lim\int_0^1 f_n(x) \, dx$$
But I disagree with the author. I do not believe that $f_n \to 0$.
Suppose $f_n \to 0$, then for $\epsilon = 1$ and for each $x \in [0, \frac{2}{n}]$ there exists some $K \in \mathbb{N}$ such that
$$|f_n(x) - 0 | < 1 \, , \, \, \forall n \geq K$$
Which considering the first part of the defined sequence we can shorten our interval to $x \in [0, \frac{1}{n}]$. So we have
$$n^2x < 1 \, , \, \, \forall n \geq K$$
This is only true when $x = 0$, so the statement is a contradictory as far as I can tell.
I don't know much about Dirac sequences but this strikes me as one. And if I recall correctly their limiting function value is infinite. Which is what I think I'm seeing here. So, I'm probably wrong (normally am versus the text), but what am I missing?
You have a confusion about the quantifiers.
Suppose $(f_n)_n$ converges to $0$ pointwise. This means that, for every fixed $x$, we have $$ \lim_{n\to \infty} f_n(x) = 0\tag{1} $$ Setting $\varepsilon = 1$ as you did, this would require that
Note that $K$ depends on $x$ (which is why I explicitly denoted it $K_x$, to make this explicit to the reader's eye). But this is true: indeed, taking $K_x = \frac{1}{\lvert x\rvert +1}$ (for instance), we have that if $n\geq K_x$ then $x > 2/n$, and therefore $f_n(x)=0$. So (1) is not contradicted.