# Procedure for “rounding the corner” of a piecewise smooth function

Let $f : \mathbb{R} \to \mathbb{C}$ be a piecewise smooth function which is continuous everywhere and smooth at all but one point $a \in \mathbb{R}$.

I would like to know if there is a procedure for taking $f$ and modifying it slightly to get $F \in C^\infty(\mathbb{R})$ such that $F = f$ everywhere except for a small interval around $a$.

Intuitively, I think the idea is to replace $f$ on some small interval $(a + \epsilon, a - \epsilon)$ by a smooth function, and then connect that function up to $f$ on either end (in a smooth way). But I'm not exactly sure if or how this can done (for instance, can we only get $F \in C^N(\mathbb{R})$?). I imagine that a convolution may need to be used.

Is there a standard analysis book that gives a proof of this procedure, if in fact it can be done?

Solutions or reference suggestions are greatly appreciated.

• Subtract off a smooth function which is equal to $f$ except on $[a-\delta,a+\delta]$, and which is equal to zero on $[a-\delta/2,a+\delta/2]$. Mollify the resulting function (whose support is contained in $[a-\delta/2,a+\delta/2]$) using the ordinary approximation by convolution, ensuring that the support of the mollified function is contained in $[a-\delta,a+\delta]$. Then add back in the function that you subtracted at the start. – Ian Nov 1 '15 at 20:18
• @Ian - Thank you for the comment. Could you explain how we know there is a smooth function that equals $f$ except on the $\delta$-neighborhood? If I understand that then your argument makes complete sense. – JZS Nov 1 '15 at 20:22
• Actually, I made a small error already: you subtract a smooth function which is equal to $f$ on except on $[a-\delta,a+\delta]$. You get a function which is supported on $[a-\delta,a+\delta]$ and is smooth except at $a$. You mollify that and you get a function which is smooth and supported on $[a-2\delta,a+2\delta]$. You add back in the function you subtracted. The resulting function is smooth and agrees with $f$ except on $[a-2\delta,a+2\delta]$. – Ian Nov 1 '15 at 20:32
• As for the initial step, try reformulating the question this way: can you make a smooth function defined on $[-1,1]$ with all derivatives at $-1$ and $1$ prescribed in advance? – Ian Nov 1 '15 at 20:32

Take a $C^\infty$ smooth function $\phi:\mathbb{R}\to [0,1]$ such that $\phi(t)=0$ when $|t|\ge \epsilon$ and $\phi(t)=1$ when $|t|\le \epsilon/2$. (You can find a construction by looking up "smooth partition of unity".)
The function $g(x) = \phi(x-a)f(a) + (1-\phi(x-a))f(x)$ has the desired properties. It is smooth since both terms are smooth (the second one vanishes in a neighborhood of $a$). It agrees with $f$ when $|x-a|\ge \epsilon$. Its deviation from $f$ does not exceed the oscillation of $f$ on the $\epsilon$-neighborhood of $a$, which can be as small as one wishes.