Is the function $f(x)=\frac{\left(1-x^2+\sqrt{\left(1-x^2\right)^2}\right)}{2}e^{-\frac{x^2}{1-x^2}}$ a bump-function $\in C_c^\infty$? Which autonomous differential equation it fulfill? (note it is not defined piece-wise)
I was viewing this question on MSE and there was given here a pretty clever answer $q(x) = 1-\sqrt{x^2}+\sqrt{\left(1-\sqrt{x^2}\right)^2}$ for a compact-supported function that is not defined piece-wise, and I was trying to us it method to built a proper bump function in $C_c^\infty$ following the definition of Wikipedia (a compact-supported smooth function) that is also not defined piece-wise.
After playing a while with it on Wolfram-Alpha and Desmos, I believe that:
$$f(x)=\textstyle{\frac{\left(1-x^2+\sqrt{\left(1-x^2\right)^2}\right)}{2}}{\Large e}{\begin{array}\displaystyle{ -\frac{x^2}{1-x^2}} \\ \\ \\ \end{array}}$$
it is actually a bump function $\in C_c^\infty$ since their derivatives will be polynomials multiplied again by $f(x)$, which will keep their functions smooth and keeping smoothness at the boundaries of their non-zero values $\partial x = [-1,\,1]$, but my math skills aren´t enough to prove it, so far, I was able only to check the first 6th derivatives and it looks fine when plotted, without having discontinuities (I am worried of the hidden $\text{abs}(1-x^2)$ function which derivatives becomes Dirac's Delta functions $\delta(x \pm 1)$), neither changing their starting and ending values from zero (example).
Since the function $f(x)=0,\,|x|>1$ as intended, I think it is already a smooth function on these points so it stills being a bump-function $\in C_c^\infty$ (if I am right, the only possible analytic function of compact-support is the zero function, so I believe that piecewise zero sections are smooth given they are analytic), and within $|x|<1$ it still being smooth since the term $e^{-\frac{x^2}{1-x^2}}$ will dominate any polynomial, but in the points $x=\{-1,\,1\}$ I don't know if will dominate any derivative of the Dirac's delta function.
Also I would like to know which autonomous differential equation $f'(x) = G(f(x))$ with $G(x)$ at least $C^1$ almost-everywhere will have $f(x)$ as solution, maybe a non linear ODE, or a Delay Differential Equation (DDE) as it was shown here for another bump-function (so far is the only example I know): there is found that a bump-function which fulfill $\varphi'(t)=2\left(\varphi(2t+1)-\varphi(2t-1)\right)$ when the solution is only non-zero inside $[-1;\,1]$, but unfortunately there is no closed-form for this function, but its Fourier Transform is show to be $\hat{\varphi}(\omega) = \prod\limits_{k=0}^{\infty}\frac{\sin\left(\frac{\pi\omega}{2^k}\right)}{\frac{\pi\omega}{2^k}}$.... actually my main objective is to find a finite-duration solution to a differential equation that fulfill what is said in this paper Finite Time Differential Equations... I have the Motivation for this questions explained in this another question.
So summarizing:
- Is $f(x) \in C_c^\infty$?
- Which autonomous differential equation fulfill $f(x)$ as solution? Otherwise, proving it cannot be described through an autonomous diff. eq. is also welcome.
My attempts so far...
I believe that the diff. eq. found by Wolfram-Alpha is wrong: $$f'(x)\left(1-x^2\right)^2+f(x)(4x-2x^3)=0,\qquad f(0)=1$$
But I have had a lot of struggle dealing with the signs, so first, to see if I am not making mistakes, I will list a few things I am using for which I am not sure if they are formally right.
- First, to show explicitly where I have risks for discontinuities, I have made transparent that $\sqrt{(1-x^2)^2} \equiv |1-x^2|$ an absolute value function, so $f(x)$ acquire the form $f(x) = e^{-\frac{-x^2}{1-x^2}}\frac{(1-x^2+|1-x^2|)}{2}$
- Second, for keeping tractable the sign issues and maintain unchanged the solutions of the diff. equation, I have found I have to keep $\frac{1}{\text{sgn}(a)} \neq \text{sgn}(a)$, even when both plotted look the same (honestly for easy-hand-calculation I was using that a lot before).
- When working with the function $s(x) = \log\left(1-x^2+|1-x^2|\right)$, I will have that $s'(x) = -\frac{2x}{|1-x^2|}$, but when integrating $-\frac{2x}{|1-x^2|}$ on Wolfram-Alpha it shows a completely different thing, and even so, when derivating the W-A result it didn´t shows to be $s'(x)$ (even the results has Dirac's delta functions involved). So hereinafter, I will be using $ \int -\frac{2x}{|1-x^2|} dx = \log\left(1-x^2+|1-x^2|\right) + \mathcal{c}$
- Also, noting that $1-x^2+|1-x^2| \equiv |1-x^2|\left(1+\text{sgn}(1-x^2)\right)$
- In all the manipulations I am ignoring possible problems because of dividing by $0$ at the points $x=\{-1,\,1\}$ (they will arise on the topic later).
Using these things, I believe that "a true" diff. equation for $f(x)$ (but not-autonomous) is: $$f'(x)\left(1-x^2\right)^2+2x(1+|1-x^2|)f(x) = 0\qquad \text{Eq. 1}$$
From here, this is equivalent to: $$\frac{f'(x)}{f(x)}=\frac{-2x(1+|1-x^2|)}{\left(1-x^2\right)^2}\qquad \text{Eq. 2}$$
Since $f'(x)/f(x) = \frac{d}{dx}\left(\log(f(x))\right)$, I tried to integrate the left-hand-side of Eq. 2 on Wolfram-Alpha but it was unable to find and antiderivative, but noting that:
$$\frac{-2x(1+|1-x^2|)}{\left(1-x^2\right)^2} = \frac{-2x}{\left(1-x^2\right)^2}+\frac{-2x|1-x^2|}{\left(1-x^2\right)^2} =\frac{-2x}{\left(1-x^2\right)^2}+\frac{-2x}{|1-x^2|}$$ integrating both fractions and using point (3) I will have that: $$\Rightarrow \log(f(x)) = \frac{-x^2}{(1-x^2)}+\log(1-x^2+|1-x^2|)+\mathcal{c} $$ From where it can be seen that by applying both side the $\exp()$ function I will recover $f(x)$ for $c=-\log(2)$, so I believe Eq. 1 is right.
As @blamethelag reccomend on the answer I tried to find a recurrence relation for Eq. 2 using the General Leibniz formula: $$\left(fg\right)^{(n)} = \sum\limits_{k=0}^{n} {n \choose k}f^{(k)}g^{(n-k)} $$ But I wasn´t able to find and useful formula (I get stuck).
But using this formula jointly with the Faà di Bruno's formula for a function composed with an exponential: $$\left(e^{g}\right)^{(n)} = e^{g}B_n(g',g'',\cdots, g^{(n)})$$ where $B_n()$ is the nth complete exponential Bell polynomial.
With these, I tried to expand the nth derivative of f(x): $$\begin{array}{r c l} \frac{d^n}{dx^n} f(x) & = & \sum\limits_{\begin{smallmatrix}k=0 \\m=n-k\end{smallmatrix}}^n {n \choose k} \frac{d^k}{dx^k}\left(e^{-\frac{x^2}{1-x^2}} \right)\frac{d^m}{dx^m}\left(1-x^2+|1-x^2| \right)\\ & = & \sum\limits_{\begin{smallmatrix}k=0 \\m=n-k\end{smallmatrix}}^n {n \choose k} e^{-\frac{x^2}{1-x^2}}B_k\left(\frac{d}{dx}\left(\frac{-x^2}{1-x^2}\right),\frac{d^2}{dx^2}\left(\frac{-x^2}{1-x^2}\right),\cdots,\frac{d^k}{dx^k}\left(\frac{-x^2}{1-x^2}\right) \right) \frac{d^m}{dx^m}\left(1-x^2+|1-x^2| \right)\\ & = & e^{-\frac{x^2}{1-x^2}} \sum\limits_{\begin{smallmatrix}k=0 \\m=n-k\end{smallmatrix}}^n \underbrace{{n \choose k} B_k\left(\frac{d}{dx}\left(\frac{-x^2}{1-x^2}\right),\frac{d^2}{dx^2}\left(\frac{-x^2}{1-x^2}\right),\cdots,\frac{d^k}{dx^k}\left(\frac{-x^2}{1-x^2}\right) \right)}_{\mathbb{P}_{n,k}(x)} \frac{d^m}{dx^m}\left(1-x^2+|1-x^2| \right)\\ & = & e^{-\frac{x^2}{1-x^2}} \sum\limits_{\begin{smallmatrix}k=0 \\m=n-k\end{smallmatrix}}^n \mathbb{P}_{n,k}(x) \left( \frac{d^m}{dx^m}\left(1\right)+\frac{d^m}{dx^m}\left(-x^2\right)+\frac{d^m}{dx^m}\left(|1-x^2|\right) \right) \qquad \text{Eq.3} \end{array}$$
Here, I believe that the term $e^{\frac{-x^2}{1-x^2}}$ is going to "dominate" every possible polynomial $\mathbb{P}_{n,k}(x)$ since it already done it for the classical example of a bump function $\in C_c^\infty$ given by $r(x) = \begin{cases} e^{\frac{-x^2}{1-x^2}},\,|x|\leq 1\\ 0,\,\text{otherwise}\end{cases}$
But I am worried about the other part of the equation, since $\frac{d^m}{dx^m}\left(|1-x^2|\right)$ will make appear Dirac's Delta functions and derivatives of it (the following derivatives were solved by wolfram-alpha, by hand I have differences so maybe I am doing something wrong):
$$\begin{array}{l c l} m = 0 & \rightarrow & |1-x^2| \\ m = 1 & \rightarrow & -2x\,\text{sgn}(1-x^2)\\ m = 2 & \rightarrow & -2\,\text{sgn}(1-x^2)+4\delta(x+1)+4\delta(x-1) \\ m = 3 & \rightarrow & 4\delta(x+1)+4\delta(x-1)+4\delta'(x+1)+4\delta'(x-1)\\ m = p\geq 4 & \rightarrow & 4 \left(\frac{d^{p-3}}{dx^{p-3}}+\frac{d^{p-2}}{dx^{p-2}}\right)\Big(\delta(x+1)+\delta(x-1)\Big)\\ \end{array}$$
And I don´t know if these Dirac's delta functions and its derivatives are actually helping by "killing" things outside $x=\{-1,\,1\}$, or instead are ruining the smoothness of $r(x)$ on the points $x=\{-1,\,1\}$, discarding the hypothesis of the smoothness of $f(x)$ (and it is not seen on the plots because happens only in two zero-measure points $x=\{-1,\,1\}$).
This is why I worried about the smoothness, since for every other points I think is granted by $r(x)$.
At least for the case $m=3$, where the terms $\delta()$ and $\delta'()$, Wolfram-Alpha is able to take the limits $x \to 1$ giving zero value, and it match with their right and left side limits $x \to 1^{\pm}$ in Wolfram-Alpha here and here.
By expanding the terms of Eq. 3 you will have things of the form: $$e^{-x^2/(1-x^2)}\mathbb{P}(x)\delta^{(m)}(x\pm 1)$$ where since $w(x)=e^{-x^2/(1-x^2)}$ will "win" any polynomial on $x \to \pm 1$, I will have that $w(x)\mathbb{P}(x)=0,\,x\to\pm 1$, so by calling $u(x \pm 1) = w(x \pm 1)\mathbb{P}(x\pm 1)$ and $z = x \pm 1$, the "problematic" terms will look like $u(z)\delta^{(m)}(z)$ with $u(0) = 0$.
Now, for $m=3$, the terms with issues are of the form $u(z)\delta(z)$ and $u(z)\delta'(z)$ using the properties of the Dirac's delta function shown on the Spanish version page of Wikipedia:
- $f(x)\delta'(x)=-f'(x)\delta(x)$
- $x^n\delta(x) = 0,\,\forall n>0,\,x\in\mathbb{R}$
- $h(x)\delta(x-a)=h(a)\delta(x-a)$
- $h(x)\delta'(x-a)=h(a)\delta'(x-a)-h'(a)\delta(x-a)$
I believe it could be seen that the terms will vanish since it will behave as terms of the form $\{g(z)\to 0\}\cdot \delta(z)$: this because of the property $z^n\delta(z)=0$, and in this case $g(z)\to 0$ even faster than every possible $z^n$, and if some terms $g(z)\delta(z)\delta(z)\cdots\delta(z)$ arises, they will also become zero since every left-side multiplication will become the term zero for the remaining terms.
Unfortunately, I don´t know how to extend this for $m \geq 4$ since I don't know how to work with higher derivatives of the Dirac's delta function, which at least on Wikipedia are reviewed through Distribution Theory scope, for which I am completely ignorant.
But, if the first property of Wikipedia is right, I believe that every product by the derivatives of the Dirac's delta function could be manipulated into standard Dirac's delta functions, as example:
$$\begin{array}{r c l} u(x)\delta'(x) & = & -u'(x)\delta(x) \iff \delta'(x) = -\frac{u'(x)}{u(x)}\delta(x) \\ \Rightarrow u(x)\delta''(x) & = & u(x)\frac{d}{dx}\left(-\frac{u'(x)}{u(x)}\delta(x)\right) \\ & = & u(x)\frac{d}{dx}\left(-\frac{u'(x)}{u(x)}\right)\delta(x)-u'(x)\delta'(x) \\ & = & u(x)\frac{d}{dx}\left(-\frac{u'(x)}{u(x)}\right)\delta(x)+u'(x)\frac{u'(x)}{u(x)}\delta(x) \end{array}$$
So noting that $\frac{u^{(m)}(x)}{u(x)}\equiv \mathbb{P}(x)$ some polynomial on the variable $x$, all the terms of these derivatives will be of the form $w(x)\mathbb{P(x)}\delta(x)$ for other polynomials $\mathbb{P}(x)$ (I am abusing of the notation), and the same procedure could be extended by construction to higher derivatives of $u(x)\delta^{(m)}(x)$, so If this is right, the function $f(x)$ is keeping is smoothness on the points $x =\{-1,\,1\}$, meaning $f(x)\in C_c^\infty$ inherited by the function $\exp\left(\frac{-x^2}{1-x^2}\right)$.
But since I cannot formally proving it better as I already explained (which is more an intuitive prove than a proper one - there are too many "I believe"), I hope someone could confirm this through some theorem or valid method.
2nd thing added
If the triangular function is defined as: $$\Lambda(x) = \frac{1}{2}\left(|1+x|+|1-x|-2|x| \right)$$
It looks like for bump functions $b(x)$ defined piecewise in $x \in [-1,\,1]$, their domain could be extended by using $g(x) = b(x)\Lambda(x^n)$ with integer $n \geq 2$. Above I have used $\Lambda(x^2) = 1-x^2+|1-x^2|$. Also positive powers of $\Lambda^m(x^n), m\in\mathbb{Z}^+$ will work.
3rd added later - discussion about the definition of f(t)
Due to enriching comments,answers, and explanations by chat, I have a better idea of what the issues are with the proposed function. Since I would like to focus the answers with the problem with the derivatives of the Dirac's Delta function $\delta^{(m)}()$, in this section I do a brief review of the problem with the definition of the function on the points $x=\{-1,\,1\}$.
From what I have seen here, commonly bump functions are defines in open intervals as the example: $$q(x) = \begin{cases} e^{-\frac{x^2}{1-x^2}}, & |x|<1 \\ 0, & |x| \geq 1 \end{cases}$$ where in the points of the "edges" $\partial x = \{-1,\,1\}$, since the function is matching the zero constant, to keep smoothness it also has to happen that $\lim\limits_{x \to \partial x^{\pm}} \frac{d^n}{dx^n}q(x) = 0,\,\forall n \leq 0,\,n \in \mathbb{z}$, in other words, all its right and left side derivatives at the edges must match and been equal to $0$.
So far so good, but, seeing the Wikipedia page for Compact support it is said that for a function defined in an open interval $(-1,\,1)$, its support it still being $[-1,\,1]$, so I think is like being "cheating": the function domain have two points where is undefined by definition, so is discontinuous there (I think), instead of being defined on $[-1,\,1]$ and having the issue of being undefined because of dividing by zero on the exponent.
However, about this forbidden division (which is mentioned by @blamethelag), there is an issue: following Wolfram-Alpha, the limit of $q(x)$ at the edges does not exist, and neither are equal their left and right side limits (solved because of the open interval definition I believe), but the same analysis for the function $f(x)$ shows that actually it is not only having identical right and left hand sides limits (which is the standard way of extending a function), following Wolfram-Alpha the limits at exactly the edges exists and are also zero, so If W-A is right, actually the function $f(x)$ is fulfilling the continuity definition $\lim\limits_{x \to c} f(x) = f(c)$, so if this is right, the function $f(t)$ should be properly defined as a function.
But since it must also fulfill the existence of all its derivatives to be a smooth function, here is where the derivatives of the Dirac's Delta function $\delta^{(m)}()$ could be doing a mess, and its where I am worried about.
Also another discussion was an opinion received in other question here: @CalvinKhor has correctly noted that the function $f(x)$ is still defined piecewise since the absolute value function by definition is defined piecewise. There is no way to refute this, but I believe that in the spirit of the question it is still a function not defined piecewise because of the following: as @blamethelag noted, if I work with the piecewise section within $[-1,\,1]$, the differential equation for the function $f(x)$ will be defined by: $$\frac{f'(x)}{f(x)}=\frac{-2x}{(1-x^2)^2}$$, which solution will be behaving very different from being zero outside the interval $[-1,\,1]$. But differently from it, using the definition of $f(x)$ presented here I was able to found the differential equation: $$\frac{f'(x)}{f(x)}=\frac{-2x}{(1-x^2)^2}+\frac{-2x}{|1-x^2|}$$ which, If I am right, it will be describing a function that actually behaves as the zero function outside the interval $[-1,\,1]$.
Note aside
If I have a function $y(x) = e^{p(x)}(1-x^2+|1-x^2|)$, using point (3) its trivial differential equation will be given by: $$\frac{y'(x)}{y(x)} = \frac{d}{dx}p(x)-\frac{2x}{|1-x^2|}$$ So I was trying to found some $p(x)$ that fulfills: $$y(x)\left(\frac{d}{dx}p(x)-\frac{2x}{|1-x^2|}\right) = 2y(2x+1)-2y(2x-1)$$ for matching the solution with an already known result, this unsuccessfully, but maybe someone else have an idea of how to made the matching...
Or maybe found some $p(x)$ so the differential equation take an autonomous form $f'(x) = G(f(x))$ with $G(x)$ at least $C^1$ almost-everywhere.
English language is not native for me, so probably this have a lot of mistakes: my apologies in advance