I know the definition of uniform convergence of a sequence of functions, but I'm having a hard time showing/proving it. In proofs, I see people manipulating |f(x)-f_n(x)| to obtain something like |f(x)-f_n(x)| < {something in terms of n}, and then stating that that directly proves uniform convergence. For example, this comment https://math.stackexchange.com/a/459438. Why does uniform convergence follow from this? I feel like I'm missing something obvious.
Edit: I don't think I'm allowed to vote/comment yet? Thank you both for your answers. If I understand correctly, the fact that this inequality does not have an x on the right side is why the sequence is uniformly convergent. Would the right side then be equal to epsilon? Or less than?
In one of the answers to the Q in your link, it is shown that each $f_n:[0,1]\to R$ satisfies $\forall x\in [0,1]\;(\;0\leq f_n(x)\leq 1/8 n\;).$ So, given $e>0,$ there exists $n_0$ such that $e<1/8 n_0.$ Then $\ \forall n\geq n_0\;\forall x\; (\;|f_n(x)|<e\;).$ Which is uniform convergence of $f$ to $0.$
For an example of non-uniform convergence, let $g_n(x)=0$ for $1/2 n\leq x\leq 1$ , and $g_n(x)=4 n(\frac {1}{2 n}-x)$ for $\frac {1}{4 n}\leq x\leq \frac {1}{2 n},$ and $g_n(x)=4 n x$ for $0\leq x\leq \frac {1}{4 n}.$ (Draw the graph).
Then $g_n(x)\to 0$ for each $x\in [0,1]$ as $n\to \infty$ because $\{n:g_n(x)\ne 0\}$ is finite. But $g_n(1/4 n)=1.$