A smooth version of the $\log$ function

187 Views Asked by At

How to construct a smooth modification of the $\log$ function? We want to construct a concrete function $\log^\varepsilon x$ with the following characteristics:

  1. $\log^\varepsilon(x)$ is smooth function in $[0,+\infty)$
  2. $\log^\varepsilon(x)=\log x, \forall x\ge \varepsilon$
  3. $|(\log^\varepsilon(x))'|\le C\cdot 1/x , \forall x\ge 0 $ where $C$ is not depend on $\varepsilon$.
2

There are 2 best solutions below

0
On BEST ANSWER

We can achieve this using a cut-off function.

enter image description here

where $p_\epsilon$ is a smooth cut-off function and $(p_\epsilon)'\le \frac{C}{\epsilon}$, $q_\epsilon:=1-p_\epsilon$.

Define $\log^\epsilon(x):=q_\epsilon(x)\log(\epsilon )+p_\epsilon(x)\log(x)$, then $\log^\epsilon(x)$ is a smooth function, $\log(x)=\log^\epsilon(x),\forall x\ge\epsilon$ and \begin{align*} (\log^\epsilon(x))'=&p_\epsilon(x)\frac{1}{x}+\log(\epsilon) q_\epsilon'(x)+p_\epsilon'(x)\log(x)\\ \le& C\frac{1}{x}+(\log(x)-\log(\epsilon))p_\epsilon'(x)\\ \le& C\frac{1}{x}+C|\log(x/\epsilon)|\frac{1}{\epsilon}. \end{align*} We just need to consider the case $\frac{\epsilon}{2}\le x\le \epsilon$, in that case $|\log(x/\epsilon)|\frac{1}{\epsilon}\le C\frac{1}{x}$. So we obtain $$(\log^\epsilon(x))'\le C\frac{1}{x}, \forall x\ge 0,$$ where $C$ is not depend on $\epsilon$.

15
On

Maybe using a smooth transition function you could built what you want.

As example think of $$q(x)=\dfrac{2}{1+\exp\left({\dfrac{1}{16x^2}}\right)}$$ which is a flat function near zero, this will make the trick.

Now let $f(x)$ be your objective functiom $$f(x)=\log(x)$$

then an smooth approximation will be: $$r(x)=f(x)\cdot q(x)\equiv \dfrac{2\log(x)}{1+\exp\left({\dfrac{1}{16x^2}}\right)}$$

which you could see in Desmos:

example