4

Let $a<b<c<d$ be real values, and let $f \in C^{\infty}([a,b])$ and $g \in C^{\infty}([c,d])$. Is there a way to "connect" these functions in a smooth way? That is, is there a function $h \in C^{\infty}([a,d])$ such that $h=f$ on $[a,b]$ and $h=g$ on $[c,d]$?

If this is true, how is the proven? Is the proof non-constructive, or is there an explicit way to do it?

Sambo
  • 6,243
  • The usual solution makes use of mollifiers. – Siminore May 22 '18 at 18:51
  • 1
    I don't know if it helps but the answer is yes. And the proof I know uses the notion of convolution to make the function smooth. (It's easy to construct a continuous $h$, you need convolution to smooth it out). – Yanko May 22 '18 at 19:14
  • 1
    Yes, there exist very many ways to do so. So many ways it becomes difficult to answer without given more information of what kind of functions or demands we make on the solution. – mathreadler Aug 10 '18 at 17:38
  • @mathreadler The OP just wants a smooth extension to $[a,d].$ Can you share one way to do this? – zhw. Aug 10 '18 at 21:11
  • @mathreadler Preferably the extension $h$ would stay between $f(b)$ and $f(c)$ – Sambo Aug 10 '18 at 22:01
  • @Sambo What if $f(b)=f(c)?$ Or $f(b) > f(c)$ and $f'(b)>0?$ – zhw. Aug 11 '18 at 04:20
  • Intuitively, it is clear that you can always do this since $b\ne c;$ otherwise I don't think it can be done, all other conditions unchanged. – Allawonder Aug 11 '18 at 10:45
  • Good point; that condition isn't crucial. The idea was to be able to have an easy bound on the integral of this function. – Sambo Aug 11 '18 at 12:24
  • @Sambo An integral bound of which kind? – zhw. Aug 11 '18 at 16:31
  • E.g., if we want to approximate (in $L^1$) the characteristic function on $[-1,1]$ by smooth functions, we could connect the zero function on $(-\infty, -1-\epsilon] \cup [1+\epsilon, \infty)$ to constant 1 function on $[-1,1]$ by smooth functions. But we'd have to make sure that as $\epsilon \rightarrow 0$, the integral on the region $(-1-\epsilon,-1) \cup (1,1+\epsilon)$ also goes to zero. – Sambo Aug 11 '18 at 20:00
  • I asked this question originally with the idea of approximating two linear functions "stuck together", but I stopped looking into it. I was still curious about whether there was a systematic way to connect smooth functions, since it seemed like it should by possible, so I started the bounty. The comment by @mathreadler prompted me giving the extra suggestion, but it wasn't really a fully-realized idea. – Sambo Aug 11 '18 at 20:04

2 Answers2

6

There is a well known result of Borel that will be useful here.

Borel's theorem on power series: Let $x_0\in \mathbb R.$ Given $a_0,a_1, \dots \in \mathbb R,$ there exists $f\in C^\infty(\mathbb R)$ such that

$$\tag 1 D^nf(x_0) = a_n, n=0,1,\dots.$$

This is stated here, with a sketch of the proof, at the very end: http://math.caltech.edu/~nets/lecture12.pdf. The statement there is not exactly $(1),$ but the two are clearly equivalent. (I'd refer you to the wikipedia page on this, but the author there gets all caught up in stating a very general version, which we don't need.)

Corollary: If $f\in C^\infty[a,b],$ then there exists $F\in C^\infty(\mathbb R)$ such that $F= f$ on $[a,b].$

Proof: By Borel, there exists $f_1 \in C^\infty(\mathbb R)$ such that

$$D^nf_1(a) = D^nf(a), n=0,1,\dots.$$

There also exists $f_2 \in C^\infty(\mathbb R)$ such that

$$D^nf_2(b) = D^nf(b), n=0,1,\dots.$$

Now define

$$F(x) = \begin{cases} f_1(x) ,\qquad x \le a \\ f(x) , \qquad x\in [a,b] \\ f_2(x) ,\qquad x \ge b \\ \end{cases}$$

This $F$ does the job: It equals $f$ on $[a,b],$ it's clearly in $C^\infty(\mathbb R\setminus \{a,b\}),$ and Borel gives us exactly the match-up at $a,b$ we need to see $F\in C^\infty(\mathbb R).$

So now to your set up with $f\in C^\infty([a,b]),g\in C^\infty([c,d]): $ We choose $F$ relative to $f,$ and $G$ relative to $g,$ as in the corollary. We also choose "blending" functions $\alpha, \beta \in C^\infty(\mathbb R)$ that do the following:

$$\alpha (x) = \begin{cases} 1, \qquad x\in (-\infty,b] \\ 0, \qquad x\in [c,\infty)\\ \end{cases}$$

$$\beta (x) = \begin{cases} 1, \qquad x\in [c,\infty) \\ 0, \qquad x\in (-\infty,b]\\ \end{cases}$$

Then $h=\alpha F + \beta G$ solves your problem with room to spare: It belongs to $C^\infty(\mathbb R),$ it equals $f$ on $[a,b],$ and equals $g$ on $[c,d].$

zhw.
  • 105,693
  • Could you give an example of the blending functions? – Sambo Aug 11 '18 at 19:54
  • 2
    @Sambo Suppose we're dealing with $[0,1].$ Then there is a bump function $\phi$ on $[0,1].$ I.e., a smooth function $\phi$ on $\mathbb R$ such that $\phi =0$ on $(-\infty,0] \cup [1,\infty)$ with $\phi > 0$ in between. We can choose this $\phi$ such that $\int_0^1\phi =1.$ Then set $\beta (x) = \int_0^x\phi.$ Then $\beta \in C^\infty$ and $\beta = 0$ on $(-\infty,0],$ $\beta = 1$ on $[1,\infty),$ and $0< \beta <1$ in between. $\alpha (x) = 1- \beta (x)$ is like $\beta $ backwards. We can easily move $[0,1]$ to any other $[a,b].$ – zhw. Aug 12 '18 at 01:59
  • Wonderful, thank you! – Sambo Aug 12 '18 at 04:17
  • Sure, and thank you. Ask if you have further questions. – zhw. Aug 12 '18 at 15:22
  • Thank you and I really like your idea. Could you give an example of the bump function $\phi$ with compact support on $[a,b]$ and $\int_a^b\phi=1$? I am thinking about $\phi=e^{-\frac{1}{a-(x-b)^2}}$ but have no further idea. Thank you. – user431550 Sep 23 '21 at 07:54
  • 1
    @user431550 $\phi(x)=e^{-1/[(x-a)(b-x)]}$ is $C^\infty$ with support in $[a,b],$ with $\phi>0$ on $(a,b).$ Let $C=\int_a^b\phi.$ Then $(1/C)\phi$ will do the job. – zhw. Sep 23 '21 at 15:41
  • Great. Thank you so much! – user431550 Sep 24 '21 at 01:52
0

If you extent $f(x)$ $\forall \epsilon>0$ from $[a,b]$ to $[a,b+\epsilon]$ (which I guess can be done in the sense of the series-expression as all derivatives are defined), so that you are free to do whatever you want on $(b,b+\epsilon]$ and likewise $g(x)$ from $[c,d]$ to $[c-\epsilon,d]$, then you can blend it by $$ h(x) = \left\{\Theta\left[ a \leq x \leq b \right] + \varphi_\epsilon\left(x-b\right)\right\} f(x) + \left\{\Theta\left[ c \leq x \leq d \right] + \varphi_\epsilon\left(c-x\right)\right\} g(x) $$ where $$ \Theta\left[ a \leq x \leq b \right] = \begin{cases} 1 \qquad a \leq x \leq b \\ 0 \qquad {\rm else} \end{cases} $$ and $$ \varphi_\epsilon\left(x\right) = \begin{cases} 0 \qquad x \leq 0 \\ \tanh^2\left(\frac{1}{x\cosh\left(\frac{1}{x-\epsilon}\right)}\right) \qquad 0 < x < \epsilon \\ 0 \qquad \epsilon \leq x\end{cases} \, . $$

Diger
  • 6,197
  • 2
    "which I guess can be done in the sense of the series-expression as all derivatives are defined" But the Taylor series of $f$ need need not converge in any interval of positive length centered at $b.$ – zhw. Aug 10 '18 at 17:09
  • If that is the case as in $e^{-1/x^2}$ then however also the function vanishes in an entire neighbourhood. Or can you give a more concrete example? – Diger Aug 10 '18 at 23:15
  • The Taylor series in that case converges everywhere. I'm saying it's possible for the Taylor series of $f$ at $b$ to diverge at each $x\ne b.$ – zhw. Aug 11 '18 at 04:25
  • You are picky ;-). Then define it via the Borel-Transform or even multiple Borel transforms until it converges. – Diger Aug 11 '18 at 04:39
  • If $f(x)=\sum_n a_n , x^n$ diverges then write ${\cal B}(f)(x)=\sum_n a_n/n! , x^n$ and use the function defined this way to calculate $f(x)=\int_0^\infty {\cal B}(f)(tx) , e^{-t} , {\rm d}t$ – Diger Aug 11 '18 at 04:52
  • I doubt this can work. Take $a_n=(n!)^n$ for example. – zhw. Aug 11 '18 at 16:34
  • @zhw if it doesnt (and is analytic) then it must have a pole at the spot. – mathreadler Aug 11 '18 at 21:26
  • @mathreadler I don't know what you mean. Please explain. – zhw. Aug 12 '18 at 02:03
  • I would guess that this procedure is not limited to the kernel $\exp(-t)$. So taking some function $f$ that yields $n^{n!} = \int_0^\infty t^n , f(t) , {\rm d}t$, $\sum_n \frac{(n!)^n}{n^{n!}} , x^n$ again converges. – Diger Aug 12 '18 at 17:06