# Reducing the proof of the smoothness of a multivariable function to that of a $\mathbb{R} \rightarrow \mathbb{R}$ function

Let $$g_1 (x)=\frac{1}{e^{\frac{1}{x}}}, g_2 \equiv 0.$$ Can someone please explain to me how to show, that the function $$f:\mathbb{R} \rightarrow \mathbb{R},\ x \mapsto \begin{cases} g_1 (x) & x>0\\ g_2 (x) & \text{else}\\ \end{cases}$$ is in $C^ \infty(\mathbb{R})$ ?

I wasn't even able to manage to prove that $f|_{(0,\infty)}$ is in $C^ \infty(0,\infty)$ (let alone to prove that all derivatives exist in $0$, which actually seems to me to be the key point), since I wasn't able to guess a general formula for calculating the derivatives (which I did for some values using a CAS), because it just gets horrible complicated after the fourth derivative; my idea was to succesively calculate the derivatives using the chain, sum and product rule and to prove that way, that the function ought to be in $C^ \infty(\mathbb{R})$. Is there maybe a sleeker way to achieve this ?

Afterswards I should use $f$ to prove that $$F:\mathbb{R}^k\rightarrow \mathbb{R}, \ (x_1,\ldots,x_k) \mapsto \begin{cases} G_1 (x_1,\ldots,x_k) & |(x_1,\ldots,x_k)|<1\\ g_2 (x) & \text{else}\\ \end{cases}$$

is also in $C^ \infty(\mathbb{R^k})$ , for $G_1 (x_1,\ldots,x_k)=e^{-\frac{1}{1-|(x_1,\ldots,x_k)|^2}}$. The only thing that came to my mind for this, was to maybe try prove that all partial derivatives of all orders of $F$ are continuously differentiable, since that would imply that $F$ would be smooth and that $$F(x_1,\ldots,x_k)=f(1-|(x_1,\ldots,x_k)|^2),$$ but I'm not sure about that.

-
This is Lemma 2.20 in John Lee's Introduction to Smooth Manifolds for which the author provides a thorough proof, including the induction argument that Boston alludes to. – ItsNotObvious Mar 19 '12 at 18:37

It is clear that $g_2$ is $C^\infty$ with derivatives equal to $g_2$.

A proof by induction shows that $g_1$ is $C^\infty$ on $(0,+\infty)$ with $g_1^{(n)}(x)=\frac{P_n(x)}{x^{2n}}e^{-1/x}$ with $(P_n)$ a sequence of polynomials satisfying $P_{n+1}(x)=x^2 P_n'(x)+(1-2nx)P_n(x)$. From the latter, you can easily deduce that $P_n$ has degree $n-1$.

The problem is at $0$. From the formula above, it follows that $f$ is also infinitely many times differentiable at $0$ with derivatives equal to $0$.

Therefore $f$ is $C^\infty$ on $\mathbb{R}$.

Then you can use $f$ and the appropriate composition to show that $F$ is $C^\infty$.

-

For $x>0$, $h(x)=-1/x$ is a smooth function because it's a rational function (i.e. polynomial $-1$ divided by polynomial $x$) and the denominator (i.e. $x$) is non-zero. This then implies that $e^{-1/x}=e^{h(x)}$ is smooth (for $x>0$) since it is the composition of smooth functions.

For $x<0$, $g_2(x)=0$ is obviously smooth.

This takes care of $f(x)$ for all $x\not=0$. Thus the only potential problem spot is $x=0$. Notice that for $x<0$, $f(x)=0$, so all derivatives of all orders must be $0$ at $x=0$ to match this data.

$\lim\limits_{h\to 0^+} \frac{f(0+h)-f(0)}{h} = \lim\limits_{h\to 0^+} \frac{e^{-1/h}-0}{h} = \lim\limits_{h\to 0^+} \frac{e^{-1/h}}{h} = \lim\limits_{t\to \infty} \frac{e^{-t}}{1/t} = \lim\limits_{t\to \infty} te^{-t}=0$ (use L'Hopital on $t/e^t$ or some other method). Thus the derivative from the right is 0. This matches the left hand limit so $f'(0)$ exists and is $0$.

Consider $\ell(x)=\frac{e^{-1/x}}{x^k}$ then $\ell'(x) = \frac{e^{-1/x}}{x^{k+2}}-\frac{e^{-1/x}k}{x^{k+1}}$

Now for $x>0$, $f'(x)=-\frac{e^{-1/x}}{x^2}$ and by the line above $f^{(m)}(x)$ is a linear combination of terms of the form $e^{-1/x}$ divided by a positive power of $x$. At this point a slight adjustment of the above limit will establish that the $m$-th derivative from the right is $0$. So derivatives of all orders exist at $0$ and are equal to $0$.

This will show that $f(x)$ is smooth. Then your final function is smooth because it is the composition of smooth functions.

-