I recently found out that $f \in L^{p}(\mathbb R)$ does not necessarily imply that $\lim\limits_{\vert x \vert \to \infty} f(x)=0$. Take for example, $f(x)=\begin{cases} n, \text{if } x \in [n,n+\frac{1}{n^{3}}]\\ 0, \text{if } x \in ]n+\frac{1}{n^{3}},n+1[\end{cases}$, $n \in \mathbb N$ it is clear that $\lim\limits_{\vert x \vert \to \infty} f(x)$ does not exist and further $\vert\vert f\vert \vert_{p}=\sum\limits_{n \in \mathbb N}\frac{1}{n^{2}}<\infty$.
But in my proof to show that $f_{n}\xrightarrow{L^{p}([-N,N])} f$ on every $N \in \mathbb N$ and $\vert \vert f_{n} \vert \vert_{p}\xrightarrow{n \to \infty}\vert\vert f\vert \vert$ implies that $f_{n}\xrightarrow{L^{p}(\mathbb R)} f$
In this proof I used the fact that since $\vert \vert f_{n} \vert \vert_{L^{p}([-N,N])}\xrightarrow{n \to \infty}\vert \vert f \vert \vert_{L^{p}([-N,N])}$ and $\vert \vert f_{n} \vert \vert_{p}\xrightarrow{n \to \infty}\vert\vert f\vert \vert$ then for $A_{N}:=\mathbb R\setminus[-N,N]$: $\vert \vert f_{n} \vert \vert_{L^{p}(A_{N})}\xrightarrow{n \to \infty}\vert \vert f \vert \vert_{L^{p}(A_{N})}$
This is all logical, but now I see a flaw in my following argument:
Let $\epsilon > 0$. We can thus choose an $N \in \mathbb N$, so that $\int_{A_{N}}\vert f_{n}\vert^{p}d\mu<\epsilon$. I used ths path in my solution, and it was marked as correct, but surely this cannot be true by the paragraph I highlighted above? Am I missing something in this proof?
Fix $p\in ]1,\infty]$. Then $f\in L^p(\Bbb R)$ doesn't imply $\lim_{|x|\to\infty} f(x)=0$, but it does imply that $\lim_{N\to\infty} \|f_n |_{A_N}\|_p=0$. But the $L^p$ norms of "tail of the function" does converge to $0$:
Define the sequence $a_N:=\int_0^N |f_n|^p \,\mathrm d\mu$. By definition, this sequence converges and $$\lim_{N\to\infty} a_N = \underbrace{\int_0^\infty |f_n|^p \,\mathrm d\mu}_{\displaystyle=:l}.$$
So (see remark) $$\lim_{N\to\infty} \int_{N}^\infty |f_n|^p \,\mathrm d\mu = \lim_{N\to\infty} \int_{N+1}^\infty |f_n|^p \,\mathrm d\mu = \lim_{N\to\infty} l -a_N = l -\lim_{N\to\infty} a_N = \color{orange}0.$$
By the same argumentation, we have $$\lim_{N\to-\infty} \int_{-\infty}^N |f_n|^p \,\mathrm d\mu= \color{blue}0.$$
It follows that $$\lim_{N\to\infty} \int_{A_N} |f_n|^p \,\mathrm d\mu = \color{orange}0+\color{blue}0=0.$$
Remark. In order to use $\int_N^\infty |f_n|^p \,\mathrm d\mu = \lim_{N\to\infty} l -a_N$, I would first have to prove that $\int_N^\infty |f_n|^p \,\mathrm d\mu$ converges and then use the fact that $a_N+\int_{N+1}^\infty |f_n|^p \,\mathrm d\mu = l$. The proof of convergence is very similar to the proof for series.