# Function $L^1_{\mathrm{loc}}(\mathbb{R})$

how we can explain that $\log|x|$ isn't defined on $\mathbb{R}$, but we have $\log|x| \in L^1_\text{loc}(\mathbb{R})$? Why isn't $\log|x|$ defined on $x=0$ but $\displaystyle \int_{-a}^a \log|x| \, dx <+\infty$?

• $\log |x| \in L^1_{loc}$ because the sequence $f_n(x) = 1_{|x| > 1/n} \log |x|$ converges in $L^1([a,b])$ for every $|a-b| < \infty$. Note how for $f \in L^1$ the Lebesgue integral essentially constructs such a sequence converging to $f$ in $L^1$. Commented Nov 13, 2017 at 16:34

$L^p$ spaces or $L^p_\text{loc}$ spaces only see functions up to a set of measure zero. Hence, it suffices to know a function only up to a set of measure zero to tell whether it is in $L^1_\text{loc}$. To be more precise, you actually define two functions to be the same if they only differ on a set of measure zero.
$$f(x) := \begin{cases}\log(|x|) & x\neq 0\\ 1 & x =0\end{cases}$$ This function is defined on the whole real axis and it is easy to check that it is in $L^1_{loc}$. Again, since you don't care about measure zero sets, there is not need to define your function on these sets. Thus, saying $\log|x| \in L^1_\text{loc}$ is a valid statement keeping in mind what I have explained.
• sorry, i don't understant. The elements of $L^1_{loc}$ or $L^1$ are defined in a set of mesure not be zero. No? Commented Nov 13, 2017 at 15:32
• I am saying that the elements of $L^p$ must be defined on the whole space except for a set of measure zero. Then you're fine. Recall the definition of $L^p$ spaces. You say $f=g$ in $L^p$ if $f-g =0$ almost everywhere. This means that the set $\{ x: f(x) \neq g(x)\}$ has measure zero. You understand this? Commented Nov 13, 2017 at 15:37
• Ok i understand this. Then for $\log|x|$ is defined almost every where on $\mathbb{R}^\star$ . But how we can gives a value of $\log(0)$ when $\log(0)$ have no sens? Commented Nov 13, 2017 at 15:59
• $\log|x|$ is defined a.e. on $\mathbb{R}$. There is no need to give value at $x=0$. If you want you can assign any value you want and the function is the same in the $L^p$ sense. Commented Nov 13, 2017 at 21:45