Bound the error of mollified function I use the standard mollifier:
$ \varphi(x) = c \cdot \exp \left( \frac{-1}{1-x^2} \right) $
for $x \in [-1,1]$, and $0$ elsewhere. Where $c$ is a constant to mormalize the integral.
I use this mollifier for 2 functions:
1) For $f = x \cdot 1_{x \geq 0}$. I saw this in an article, they claimed that 
$ 0 \leq f_\lambda(x) \leq f(x) + \lambda$ 
for $|x| < \lambda$, and $f_\lambda(x) = f(x)$ for $|x| \geq \lambda$. 
How can I show that?
2) For the function 
$g(x) = -x log(x)$
for $x \in [0,1]$, and $0$ elsewhere.
How can I bound 
$| g_\lambda(x) - g(x) |$ ?
In both cases: 
$$f_\lambda(x) = f(x) \ast\varphi_\lambda(x) = \int_{\mathbb{R}^n} f(x-y) \varphi_\lambda(y) dy $$ 
That is the convolution of the two functions, and: $\varphi_\lambda(x) = \lambda^{-1} \varphi(x/\lambda)$
Is there a generic rule for bounding such differences?
 A: I came up with a solution to part 1 only, here it is:


*

*Let $|x| \geq \lambda$. 


*

*If $x \geq \lambda$, then $f(x-t) = x-t$ for all $t \in [-\lambda, \lambda]$, so:
\begin{align*}
 f_\lambda(x) & = \int_{-\lambda}^{\lambda} f(x-t) \varphi_\lambda(t) dt 
 = \int_{-\lambda}^{\lambda} (x-t) \varphi_\lambda(t) dt \\
 & = x \cdot \int_{-\lambda}^{\lambda} \varphi_\lambda(t) dt - \int_{-\lambda}^{\lambda} t \varphi_\lambda(t) dt \\
 & = x \cdot 1 - 0 = x = f(x)
 \end{align*}

*If $x \leq -\lambda$, then $x-t \leq 0$ for all $t \in [-\lambda, \lambda]$, so:
\begin{equation*}
f_\lambda(x) = \int_{-\lambda}^{\lambda} f(x-t) \varphi_\lambda(t) dt 
= \int_{-\lambda}^{\lambda} 0 \cdot \varphi_\lambda(t) dt = 0 = f(x)
\end{equation*}


*Now, let $|x| < \lambda$, then $f(x-t) = 0$ for $x \leq t \leq \lambda$, so:
\begin{align*}
f_\lambda(x) & = \int_{-\lambda}^{\lambda} f(x-t) \varphi_\lambda(t) dt 
= \int_{-\lambda}^{x} (x-t) \varphi_\lambda(t) dt
\end{align*}
We divide to two cases:


*

*If $-\lambda < x \leq 0$, then:
\begin{align*}
f_\lambda(x) &
= \int_{-\lambda}^{x} (x-t) \varphi_\lambda(t) dt
= x \cdot \int_{-\lambda}^{x} \varphi_\lambda(t) dt - \int_{-\lambda}^{x} t \cdot \varphi_\lambda(t) dt
\\ & \leq 0 + \lambda
= f(x) + \lambda 
\end{align*}

*If $0 < x < \lambda$, then:
\begin{align*}
f_\lambda(x) &
= \int_{-\lambda}^{x} (x-t) \varphi_\lambda(t) dt
= x \cdot \int_{-\lambda}^{x} \varphi_\lambda(t) dt - \left( \int_{-\lambda}^{-x} t \cdot \varphi_\lambda(t) dt + \int_{-x}^{x} t \cdot \varphi_\lambda(t) dt \right)
\\ & \leq x - (-\lambda + 0) = f(x) + \lambda
= f(x) + \lambda 
\end{align*}


