Let $n\geq 2$. Consider $f\in L^1_{loc}(\mathbb{R}^n)$ and $g\in C^{\infty}_c(\mathbb{R}^n)$. It is true that $$fg\in L^2(\mathbb{R}^n)?$$ If it is true, could anyone explain me why? Or, if it false, could anyone give me a counterexample?
Thank you in advance!
Of course it’s false. Take Your favourite function that is $L^1\setminus L^2(B_1(0))$. Extend it by zero. Multiply by a test function $g$ that is identically one on $B_1(0)$. Then $fg=f$ is not $L^2$
PS the dimension played no role at all