# Is there a function like this?

Let $A=[0,1]$ and $C=\{0\}\cup\{\frac{1}{n},\ n\in\mathbb{N}\}$.

i) Is there a function $f:A\rightarrow\mathbb{R}$ such that $f\in C^{r}(A)$, $r\geq 2$ and the set of critical "Values" of $f$ is $C$?

ii) Is there a function $f:A\rightarrow\mathbb{R}$ such that $f\in C^{1}(A)$ and the set of critical "Values" of $f$ is $-C\cup C$?

This is a problem from a course of differential topology that i did last year. Is related with Morse theory. I couldn't figure out any good solution for it. I appreciate some help.

EDIT: A critical value is image of a critical point, i.e. if $f'(x)=0$ then $f(x)$ is a critical value.

Thanks

-
To be sure: $C$ is the set you describe at the top of your post, while $C^r$ is the set of continuously differentiable functions of order $r$? – Adam Saltz Sep 29 '12 at 14:02
you are right.. – Tomás Sep 29 '12 at 15:24
You can obtain example (ii) by gluing two copies of example (i). To be more precise, suppose $f:[0,1]\to [0,1]$ satisfies (i) and additionally $f(0)=0=f'(0)$. Then the odd extension $f(-x)=-f(x)$ is in $C^1[-1,1]$ and satisfies (ii). Of course, $[-1,1]$ can be changed to $[0,1]$ by a linear transformation. – user31373 Sep 30 '12 at 2:56
(ii) is clearly wrong because $-C\not\subset A$. – celtschk Oct 4 '12 at 21:54

The answer to question (i) is no, the answer to question (ii) is yes. (Thanks to Tomas for pointing out a mistake in my previous argument.)

(ii) Existence of the $\mathcal{C}^1$ function. Let $F:[0,1]\to[0,1]$ be a $\mathcal{C}^1$ function such that $F(0)=0$, $F(1)=1$, $F'(0)=F'(1)=0$, and such that $F'(x)>0$ for all $x \in (0,1)$. (E.g., one could use $F(x) = \sin^2 \frac{\pi x}{2}$.)

Now let $a_n$ be a strictly decreasing positive sequence with $a_1 = 1$ and $\lim\limits_{n\to\infty} a_n = 0$. Define the function $f$ on the interval $[a_{n+1},a_n]$ by $$f(x) = \frac{1}{n+1} + \left(\frac1n - \frac{1}{n+1}\right) F\left(\frac{x-a_{n+1}}{a_{n}-a_{n+1}}\right)$$ for all $n$. I.e., $f$ is an affine version of $F$ with $f(a_n) = \frac1n$ and $f(a_{n+1}) = \frac1{n+1}$. This already gives us a (strictly increasing) $\mathcal{C}^1$ function $f:(0,1] \to \mathbb{R}$ with critical values $\{ \frac1n:n \in \mathbb{N} \}$. Extending it to $[0,1]$ by $f(0)=0$ makes the function continuous. Now we just have to find a sequence $(a_n)$ for which this function satisfies $\lim\limits_{x\to 0} f'(x) = 0$. Then the odd extension of $f$ to $[-1,1]$ is $\mathcal{C}^1$ and has critical values $C \cup (-C)$.

Letting $M = \sup F'$, we get for all $x\in[a_{n+1},a_n]$ that $$0<f'(x) \le M\frac{\frac1n - \frac{1}{n+1}}{a_n - a_{n+1}}.$$ As $x\to 0$, we get $n\to\infty$, so we have to find a sequence such that $$\lim\limits_{n\to\infty} \frac{\frac1n - \frac1{n+1}}{a_n - a_{n+1}} = 0.$$ Many sequences work here, e.g., $a_n = \frac1{\sqrt{n}}$ or $a_n = \frac{1}{1+ \ln n}$. This finishes the argument.

(i) Non-existence of the $\mathcal{C}^2$ function. Assume that $f$ is $\mathcal{C}^2$ on $[0,1]$ with critical values $C$. Then there exists a sequence of disjoint intervals $I_n = [a_n,b_n]$ with critical points $a_n$, $b_n$, no critical points in $(a_n,b_n)$, and $f(a_n) \ge \frac1n$ or $f(b_n) \ge \frac1n$. (This is shown by an elementary, but not quite trivial argument.) This implies that $$|f(a_n)-f(b_n)| \ge \frac1n - \frac1{n+1}= \frac1{n(n+1)}\ge \frac{1}{2n^2}.$$ By the Mean Value Theorem there exists $c_n \in (a_n,b_n)$ with $$|f'(c_n)|\ge \frac{1}{2n^2(b_n-a_n)}.$$ Since $f'(a_n) = 0$, another application of the Mean Value Theorem to $f'$ shows that there exists $d_n \in (a_n,c_n)$ with $$|f''(d_n)| \ge \frac{1}{2n^2(c_n-a_n)(b_n-a_n)} \ge \frac{1}{2n^2(b_n-a_n)^2}.$$ By assumption $f$ is $\mathcal{C}^2$, so $|f''| \le M$ for some constant $M$, implying that $$b_n-a_n \ge \frac{1}{n\sqrt{2M}}.$$ This gives $\sum\limits_{n=1}^\infty (b_n-a_n) = +\infty$. However, since these intervals are mutually disjoint subsets of $[0,1]$, we have $\sum\limits_{n=1}^\infty (b_n-a_n) \le 1$, which is the desired contradiction.

-
You just showed that $f'(0)=0$. I cant see why $f\in C^{2}$ on zero or even why $\in C^{1}$ on zero. – Tomás Oct 4 '12 at 12:01
You are right, there is an additional argument needed. I'll see if this construction is fixable. – Lukas Geyer Oct 4 '12 at 18:36
OK, if all of the piecewise functions (from the lemma) are affine versions of each other, it is not too hard to show that this function will be $\mathcal{C}^1$ (implying a positive answer to (ii)), but it won't be $\mathcal{C}^2$. I'll update my answer later today. – Lukas Geyer Oct 4 '12 at 18:50
OK, fixed the $\mathcal{C}^1$ construction, and showed that $\mathcal{C}^2$ is in fact not possible. Not the most elegant proof in the world, but I hope it is correct this time... :) – Lukas Geyer Oct 4 '12 at 21:32
Just to make it clear. When you change the interval $[-1,1]$ to $[0,1]$ the set of critival values still the same? – Tomás Oct 5 '12 at 0:23

In each case, the answer is yes. Check out this post by Mate on the Topology Q+A board. To adapt it to your question:

You need this lemma, which isn't so hard to prove if you already know about bump functions:

For any $a,b,c,d \in \mathbb{R}$ with $a<b$, there exists a smooth function $f:[a,b] \rightarrow \mathbb{R}$ such that $f(a) = c, f(b) = d$, and all the derivatives of $f$ vanish at $a$ and $b$.

Now let $r: \mathbb{N} \rightarrow \mathbb{Q}$ be your favorite enumeration the set $C$ (or $-C \cup C$). Extend $r$ to a smooth function $f$ on the (positive) real numbers using the lemma. This function satisfies all your requirements.

-
Hi Adam Saltz. I think your argument dont prove the statement. It is a good argument when the function $f$ is defined on $\mathbb{R}$, but in our case the function is defined on $[0,1]$. I cant see a clean way to adapt the demonstration for this case. If you do, please show me. – Tomás Sep 29 '12 at 14:59
Indeed, some care needs to be taken with the smoothness of $f$ at the endpoints $0$ or/and $1$. – user31373 Sep 30 '12 at 2:52
You are both quite right. I misread your question, Kaye and I agree that it is difficult to adapt for the reason LVK states. – Adam Saltz Oct 1 '12 at 3:55