Infinitely differentiable functions: how to prove that $e^\frac{1}{x^2-1}$ has derivative of any order?

Let $f:\Bbb{R}\to\Bbb{R}$ be a function given by

$$f(x)=\begin{cases} \exp\left(\frac{1}{x^2-1}\right) & \text{if }\vert x\vert\lt 1\\ 0 & \text{if }\vert x\vert\geqslant 1 \end{cases}$$

I would like to prove that $f\in C^\infty$, that is, $f\in C^k$ for all $k\in \mathbb{N}$. I think that it can be done by induction on $k$. If $\vert x\vert\gt1$, the problem is trivial. On other points, the base case is the simplest and the only that I'm be able to do. Can someone help me?

Thanks.


Solution 1:

Do it for $$f(x)=\begin{cases}\exp\left(-\frac 1 x\right)&x>0\\ 0&x\leq 0\end{cases}$$

Note that everywhere but in the origin, $f$ is infinitely differentiable. Moreover, for $x>0$

$$\eqalign{ f'\left( x \right) &= \frac{1}{{{x^2}}}f\left( x \right) \cr f''\left( x \right) &= \left( {\frac{1}{{{x^4}}} - \frac{2}{{{x^3}}}} \right)f\left( x \right) \cr f'''\left( x \right)&= \left( {\frac{1}{{{x^6}}} - \frac{6}{{{x^5}}} + \frac{6}{{{x^4}}}} \right)f\left( x \right)\cr &\&c \cr} $$

You can thus prove inductively that for $x>0$, $$f^{(k)}(x)=P_{2k}(x^{-1})f(x)$$ where $P_{2k}$ is a polynomial of degree $2k$.

As $x\to 0^+$ this amounts to looking at $$\lim_{x\to +\infty}P(x)\exp(-x)=0$$ for any polynomial $P$.

So, for any $k$, the limit as $x\to 0$ of the derivative is $0$. Now we use a slightly underrated theorem

Theorem (Spivak) Suppose $f$ is continuous at $x=a$, that $f'(x)$ exists for all $x$ in a neighborhood of $a$. Suppose moreover that $$\lim_{x\to a}f'(x)$$ exists. Then $f'(a)$ exists and $$f'(a)=\lim_{x\to a}f'(x)$$

Proof By definition, $$f'(a)=\lim_{h\to 0 }\frac{f(a+h)-f(a)}h$$

Consider $h>0$. For $h$ sufficiently small, $f$ will be continuous over $[a,a+h]$, and differentiable over $(a,a+h)$. Thus, by Lagrange, we can find $a<\alpha_h<a+h$ such that $$\frac{f(a+h)-f(a)}h=f'(\alpha_h)$$

As $h\to 0^+$; $\alpha_h\to a$, and since the limit exists, $$f'(a)^+=\lim_{h\to 0^+}\frac{f(a+h)-f(a)}h=\lim_{h\to 0^+}f'(\alpha_h)=\lim_{x\to a}f'(x)$$ The case $h<0$ is analogous. $\blacktriangle$.

The above lets you conclude that indeed $f^{(k)}(0)=0$ for all $k$, whence $f$ is $C^k$ for any $k$. Now, note your function is $$g(x)=f(1-x^2)$$