# smooth functional to detect whether a function has a zero

Does there exist a function $F : C^\infty(\mathbb{R}, [0, \infty)) \to \mathbb{R}$ with the following properties:

• $F(f) = 0$ if and only if there exists an $x \in [0,1]$ such that $f(x) = 0$.
• $F$ is smooth in the following sense: if $f(x,t) \in C^\infty(\mathbb{R} \times \mathbb{R}, [0,\infty))$ and $F$ is applied to $f$ in the $x$ variable, the function of $t$ that results is smooth ($C^\infty$).

The second question is whether the following candidate satisfies the smoothness property. For $f \in C^\infty(\mathbb{R}, [0, \infty))$, define $G(f)$ to be $$\left( \int_0^1 \frac{1}{f(x)} \, dx \right)^{-2}$$ if $f$ has no zeros in $[0,1]$, and $0$ otherwise. Then $G$ satisfies the first condition by definition, and one can show that when $f$ is a function of $x$ and $t$ as above, $G(f)$ is (continuous and) differentiable as a function of $t$. Is it smooth?

Edit: Willie Wong answered the second question in the negative. So let's instead define $G(f)$ to be $$\exp \left( -\int_0^1 \frac{1}{f(x)} \, dx \right)$$ if $f$ has no zeros in $[0,1]$, and $0$ otherwise. Is this $G$ smooth?

For the second question only:

For $f(x,t) = (x-t)^2$, you have that if $t > 1$

$$\int_0^1 \frac{1}{f(x,t)} ~dx = \frac{1}{t-x} \Big|^1_0 = \frac{1}{t - 1} - \frac{1}{t} = \frac{1}{t(t-1)}$$

So you functional $$G(f)(t) = \begin{cases} 0 & t \leq 1 \\ t^2(t-1)^2 & t > 1\end{cases}$$

and is not a smooth function of $t$ (not even $C^2$).

This example can of course be circumvented if you take instead of $(\int_0^1 \cdot dx)^{-2}$ something like $\exp - (\int_0^1 \cdot dx)$.

• Thanks, that's very helpful! I've updated the question to take your answer into account. I'd really like to know the answer to the first question! Oct 13, 2016 at 13:11

A functional that works is $$F(f)=\begin{cases} \exp(-\exp(\int_0^1 \frac{1}{f(x)}dx)), & \textrm{if f(x)>0 for all x \in [0,1]} \\ 0, & \textrm{otherwise}. \end{cases}$$ The idea to use this formula and a sketch of the proof that it works are both due to Chengjie Yu. The proof is in the appendix of a paper I wrote with Enxin Wu, Smooth classifying spaces, http://arxiv.org/abs/1709.10517

I don't know whether the functional described in the question, $G(f) = \exp(-\int_0^1 \frac{1}{f(x)} dx)$, works.

Here is the proof that either of the definitions of $G$ in the question satisfy a weaker version of the smoothness condition. I hope that the same ideas can be used to prove that the second definition is in fact smooth. So we'll discuss that case.

Define $G(f)$ to be $\exp(-\int_0^1 dx/f(x))$ if $f$ is non-zero on $[0,1]$, and let $G(f) = 0$ otherwise. Let $f(x,t) \in C^\infty(\mathbb{R} \times \mathbb{R}, [0, \infty))$. We'll show that the first derivative of $G(f)$ with respect to $t$ exists for all $t$. Without loss of generality, we'll do this at $t=0$. If $f(x,0)$ is nonzero on $[0,1]$, then this is also true for $t$ in a neighbourhood of $0$, and $G(f)$ is smooth in this neighbourhood by differentiating under the integral.

If $f(x,0)$ has a zero in $[0,1]$, then $G(f)$ is zero when $t=0$, and we'll show below that there exists $c > 0$ such that $$\int_0^1 \frac{1}{f(x,t)} dx \geq \frac{c}{|t|} \tag{*}$$ for all $t \in [-1,1]$ such that $f(x,t)$ is nonzero for all $x \in [0,1]$. Therefore, $$\exp \left( -\int_0^1 \frac{1}{f(x,t)} dx \right) \leq \exp \left( -\frac{c}{|t|} \right)$$ for such $t$. Therefore, $$G(f) \leq \exp \left( -\frac{c}{|t|} \right)$$ for all nonzero $t \in [-1,1]$, since either $G(f) = 0$, or $G(f)$ is as in the previous equation. It follows that the first derivative of $G(f)$ exists and is zero at $t = 0$.

Can the argument be adapted to handle the higher derivatives?

Proof of the inequality (*):

Let $x_0 \in [0,1]$ be such that $f(x_0,0) = 0$. Then, by smoothness, there exists $C > 0$ such that $$f(x,t) \leq C (t^2 + (x - x_0)^2)$$ for every $t \in [-1,1]$ and $x \in [0,1]$. The squares comes from the fact that $f$ is assumed to be a non-negative smooth function, so $\partial_x f(x_0,0) = \partial_t f(x_0,0) = 0$. In particular, if $|x - x_0| \leq |t| \leq 1$, then $$f(x,t) \leq 2 C t^2 .$$ Choose $t \in [-1,1]$ such that $f(x,t)$ has no zeros for $x \in [0,1]$. Integrating, we get $$\int_0^1 \frac{1}{f(x,t)} dx \geq \int_{\max(x_0 - |t|,0)}^{\min(x_0 + |t|,1)} \frac{1}{f(x,t)} dx \geq \int_{\max(x_0 - |t|,0)}^{\min(x_0 + |t|,1)} \frac{1}{2 C t^2} dx \geq \frac{|t|}{2 C t^2} = \frac{c}{|t|},$$ as claimed. The last inequality comes from the fact that the interval of integration has width at least $|t|$.

That $f$ is non-negative is crucial here: the argument given above does not work if $f$ can be real valued, and this can be seen explicitly for the example $f(x,t) = x-t$. However, in such a situation one could simply replace the integrand $1/f$ with $1 / f^2$.

• The inequality ($*$) makes no sense at $t=0$, so how can it hold for all $t \in [-1,1]$? Also I do not understand the assumptions on $f$ in the sentence If $f(x,0)$ has a zero in $[0,1]$, then ... one can show that ... such that $f(x,t)$ is nonzero for $x \in [0,1]$. Oct 13, 2016 at 16:36
• @NawafBou-Rabee Thanks for pointing out the typo about the case where $t$ might be zero. I've added "nonzero" to that sentence. Regarding your second question, for each fixed $t$, either $f(x,t)$ has a zero for some $x \in [0,1]$, or it doesn't. Which of those is true determines which formula is used to define $G(f)$ for that $t$. Oct 13, 2016 at 16:56
• @NawafBou-Rabee: I am not entirely sure I understand your objection, in part because $f$ depends on two variables and your last comment only talks about support in [1/4,3/4]. Is that in relation to $x$ or to $t$? Oct 13, 2016 at 18:48
• @NawafBou-Rabee: I edited the answer and filled in the proof. Oct 13, 2016 at 19:14
• @NawafBou-Rabee I don't intend to find zeros by practically computing this functional. The use would be to find a local trivialization of a principle $G$-bundle with an associated smooth partition of unity, following Dold's argument in the topological case, which uses the function $g$ that arose in Willie Wong's proof of (*). Oct 13, 2016 at 22:26