I have the following task in my homework:
We consider a sequence of functions $(f_n)_{n\in\mathbb{N}}$ given by $f_n: \mathbb{R} \to \mathbb{R}$ for all $n\in\mathbb{N}$.
Prove that $f_n(x) = 1 - χ_{[-n,n]}(x)$ converges pointwisely, but not uniformly, to 0.
Here, the function $χ_{[-n,n]}: \mathbb{R} \to \mathbb{R}$ is defined by
$$χ_{[-n,n]}(x) = \begin{cases} 1\text{ if } x \in [-n,n] \\ 0 \text{ else}. \end{cases} $$
So... this confuses me. First and foremost, this only converges to 0 when $χ_{[-n,n]}(x)$ is 1 and thus when x is only between -n and n, but outside of those bounds, so for x larger than n, I do not see how this is supposed to converge to 0 when $χ_{[-n,n]}(x)$ is 0 too... Perhaps I just don't fully understand the definition of pointwise and uniform convergence, but I don't see how this is supposed to converge to 0.
Pointwise convergence of the sequence $f_n$ to $f$ works as follows:
$$ \forall x:\ \lim_{n\to\infty} |f_n(x) - f(x)| = 0$$
and uniform convergence works differently. In that type of convergence, it is not looking at a single point but it is looking at all points at the same time, i.e.,
$$ \lim_{n\to\infty} \sup_{x\in\mathbb{R}}|f_n(x) - f(x)| = 0. $$
In your case, it works that for all $x$, $f_n(x) \to 0$. Since for all $x\in\mathbb{R}$ we can find an $n\in\mathbb{N}$ such that $|x| \leq n$. Hence for $m\geq n$, we have $f_m(x) = 0$, which implies that the limit equals $0$.
As you already suggested, this $n$ does not work for all $x\in\mathbb{R}$ at the same time. Indeed, for all $m\in\mathbb{N}$ we have $$ \sup_{x\in\mathbb{R}} |f_n(x) - 0| = 1, $$ which thus does not converge to $0$.
I think that the definition of the types of convergence should be more clear now. If you have any questions, feel free to ask them!