0

According to Wikipedia https://en.wikipedia.org/wiki/Mollifier, one of the uses of Mollifer functions is to smooth a function. How could you smooth with a mollifer function the function $f(x)=|x|$ at the origin (the "corner")? (I would like to be able to understand this illustrative example) Thank you.

eraldcoil
  • 3,508

1 Answers1

1

you can observe behavior of $f_{\epsilon} := f * \Phi_{\epsilon}$ to see how it gets smoother. for any $\epsilon >0$, $f_{\epsilon}$ is $C^{\infty}$. I can give you some illustration for specific choose of $\Phi$ (Wikipedia example). (cause you mention you need illustrative example!, tell me if you need more technical details). you can see $f_{\epsilon} \xrightarrow[]{\epsilon \rightarrow 0} f$ (in some sence of convergence). more precisely since $f(x) = |x| \in L^p_{loc}(\mathbb{R})$ therefore $f_{\epsilon} \rightarrow f$ in $L^p_{loc}(\mathbb{R})$. enter image description here

  • Thank you so much. This is the answer she was waiting for. What program is that? What commands allow you to graph the convolution in that program? Thank you. – eraldcoil Feb 10 '23 at 18:29
  • 1
    actually this is numerical convolution of $|x|$ and $\Phi(x)$ for some mesh of $x \in [-3,3]$, which numerically converge to functional convolution. (as mesh size goes to zero). I used MATLAB to plot the functions. command conv taking convolution of two array in this software. – Abolfazl Chaman motlagh Feb 10 '23 at 19:11
  • 1
    I write it's code in python and upload it to my google drive, hope it's helpful : python code – Abolfazl Chaman motlagh Feb 10 '23 at 19:12
  • Thank you very much for the code. What commands did you use for Matlab? I was trying it in Scilab but I can't get it to look like your graph. What will be wrong? // Time vector x = -3:0.5:3; // Functions f = abs(x); phi = (1/0.5)*exp(1/((x/0.5).^2-1)) // Convolution c = conv(f, phi); // c = c(1:length(x)); // Plot plot(x, f, 'r'); plot(x, c, 'b'); // Legend legend('f', 'c'); – eraldcoil Feb 10 '23 at 20:23
  • 1
    you're welcome. happy to help. i think at least 3 things are wrong in your code. first, function $\Phi$ has this expression in $x \in [-1,1]$. outside of this $\Phi$ is zero (you can plot your $\Phi$ and see that it's not okay to consider whole domain). second, you need a normalization factor for $\Phi$ so it's integral gives you 1. third, I'm not familiar with Scilab syntaxes, but maybe it's not right to just select first length(x) elements. use conv(A,B "same") instead. – Abolfazl Chaman motlagh Feb 10 '23 at 22:01
  • 1
    here's a simple code for matlab : Matlab Code – Abolfazl Chaman motlagh Feb 10 '23 at 22:02