Density of smooth functions in Musielak-Orlicz spaces
We provide necessary and sufficient conditions for the space of smooth functions with compact supports $C^\infty_C(Ω)$ to be dense in Musielak-Orlicz spaces $L^Φ(Ω)$ where $Ω$ is an open subset of $\mathbb{R}^d$. In particular we prove that if $Φ$ satisfies condition $Δ_2$, the closure of $C^\infty_C(Ω)\cap L^Φ(Ω)$ is equal to $L^Φ(Ω)$ if and only if the measure of singular points of $Φ$ is equal to zero. This extends the earlier density theorems proved under the assumption of local integrability of $Φ$, which implies that the measure of the singular points of $Φ$ is zero. As a corollary we obtain analogous results for Musielak-Orlicz spaces generated by double phase functional and we recover the well known result for variable exponent Lebesgue spaces.