$\{f_n\}$ is a sequence of functions, where $f_n : \mathbb{R}\rightarrow\mathbb{R}$ is defined as: $$\begin{equation*} f_n(x)=\begin{cases} 0, \quad \quad \quad \quad \quad \quad \quad \quad \quad x<n-\frac{1}{n} \ \ or \ \ x>n+\frac{1}{n} \\ n(x-(n-\frac{1}{n})), \quad \quad \ \ \ n-\frac{1}{n}\leq x\leq n \\ n(n+\frac{1}{n}-x), \quad \quad \ \ \ \ \ n\leq x\leq n+\frac{1}{n} \end{cases} \end{equation*}$$ I'm not able to mathematically describe the function to which the above sequence converges. Since,

$$\begin{equation*} f_1(x)=\begin{cases} 0, \quad \quad \quad \quad \quad x<0 \ or \ x>2\\ x, \quad \quad \quad \quad \quad 0\leq x\leq 1 \\ 2-x, \quad \quad \ \ \ \ \ 1\leq x\leq 2 \end{cases} \end{equation*}\implies f_(1) =1$$ $$\begin{equation*} f_2(x)=\begin{cases} 0, \ \ \ \quad \quad \quad \quad \quad x<1.5 \ \ or \ \ x>2.5\\ 2x-3, \ \quad \quad \quad 1.5\leq x\leq 2 \\ 5-2x, \ \quad \quad \ \ \ \ \ 2\leq x\leq 2.5 \end{cases} \end{equation*} \implies f_2(2) =1$$ $$\begin{equation*} f_5(x)=\begin{cases} 0, \ \ \ \quad \quad \quad \quad \quad x<4.8 \ \ or \ \ x>5.2\\ 5x-24, \quad \quad \quad 4.8\leq x\leq 5 \\ 26-5x, \ \quad \quad \ \ \ \ \ 5\leq x\leq 5.2 \end{cases} \end{equation*}\implies f_5(5) =1$$It seems that it eventually converges to $0$ as $n\rightarrow\infty$ $\forall x \in \mathbb{R}$ except at $\infty$ where $f_n(n)\rightarrow1$ as $n\rightarrow\infty$.

Can I write that $\{f_n\}$ converges pointwise to $f$, where $f:\mathbb{R}\rightarrow\mathbb{R}$ is defined as: $$\begin{equation*} f(x)=\begin{cases} 0, \quad \quad \quad x<\infty \ \ or \ \ x>-\infty \\ 1, \quad \quad \ \ \ \ x=n, \ n\rightarrow\infty \end{cases} \end{equation*}\ \ \ ?$$ Is this the correct way of expressing a function Or is it that $\{f_n\}$ isn't convergent at all?


The pointwise limit means we are interested in what happens to $f_n(x)$ for fixed $x$ as $n \to \infty$. In this case, notice how if we fix $x$, then for any $n > x + 1$ (for example), we must have $f_n(x) = 0$ since $$ x < n - 1 < n - \frac{1}{n}. $$ Hence as $n \to \infty$, $f_n(x) \to 0$ (and indeed equals $0$ for $n$ large). Therefore the pointwise limit is precisely $f(x) = 0$ for all $x$.

What you are finding with your observation that $f_n(n) = 1$ for all $n$ is that whilst the pointwise limit is $0$, this convergence is not uniform. This is definitely a very important observation about the sequence $f_n$, but it does not affect the pointwise behaviour.