Method to approximate continuous functions by smooth functions?

687 Views Asked by At

Sorry that this is informal, I don't know what formalizes this idea.

Let's say we have a function, which, like $|x|$ has many "sharp corners" or even perhaps cusps. Well, I don't like those sharp corners because they're not infinitely differentiable. Is there a method to approximate a zig-zag or cusp-filled function by a smooth function with rounded corners?

2

There are 2 best solutions below

0
On

In the case of $f(x) = |x|$ on $\mathbb R,$ we could let $f_n(x)=\sqrt {1/n^2+x^2}, n=1,2, \dots$ Then each $f_n$ is smooth and $|f_n(x)-f(x)|\le 1/n$ for all $n$ and all $x.$

0
On

There is a general approach of approximating $f \in C(\mathbb{R})$ by functions $f_h = f * \rho_{h}$, sometimes called mollification of $f$. Notably, we have $f_h \in C^{\infty}(\mathbb{R})$ and $f_h \to f$ uniformly on compact subsets of $\mathbb{R}$. Moreover, if $f$ is differentiable, then $(f_h)' = (f')_{h}$, so we get convergence of derivatives too. There are also convergence results for rougher $f$, e.g. $f \in L^p(\mathbb{R})$.