Consider a bounded domain $\Omega \subset \mathbb R^d$ and a function $f \in L^2(\Omega)$. Now $f$ can be approximated through a sequence of functions $f_n \in H^1(\Omega)$ (or even $C^\infty(\Omega)$).
My question is: Can I additionally demand $|f_n| \le |f|$ almost everywhere?
Some thoughts / Things I've tried:
- Mollification is hard to control and I do not see a way to "fix" a mollified version of $f$ such that it satisfies the constraint and remains smooth.
- Maybe one could first approximate $L^2$ through step functions (i.e. linear combinations of characteristic functions of rectangular boxes) and then approximate those. Approximating them through smooth functions while satisfying the constraint should not be a problem. I know that step functions are dense in $L^2$, but I'm not sure if the constraint can be met (If the limit was Riemann integrable then the answer should be positive, but what about the general case?)
Note: The assumption $f \in L^\infty(\Omega)$ can be made.