How do you show that $e^{-1/x^2}$ is differentiable at $0$?

Define the real valued function $f(x)$ by $f(x) = e^{-1/x^2}$ if $x \ne 0$ and $0$ if $x = 0$.

  • How do you show that $e^{-1/x^2}$ is differentiable at $0$?
  • How do you show that this function is infinitely differentiable?

It should be clear that for $x \neq 0 $, $f$ is infinitely differentiable and that $f^{(k)}(x)$ is in the linear span of terms of the form $f(x) \frac{1}{x^m}$ for various $m$. This follows from induction and the chain and product rules for differentiation.

Note that for $x \neq 0$, we have $f(x) = \frac{1}{e^{\frac{1}{x^2}}} \le \frac{1}{\frac{1}{n!}(\frac{1}{x^{2}})^n} = n! x^{2n}$ for all $n$.

In particular, for $n=1$, we have $f(x) \le 2 x^2$ for all $x$. It follows that $\lim_{x \to 0} \frac{f(x)-f(0)}{x-0} = 0$, and so $f$ is differentiable at $x=0$, and $f'(0) = 0$.

Now suppose that we have shown that $f^{(k)}(0)=0$. As mentioned above, for $x \neq 0$ we have $f^{(k)}(x)= f(x) \sum_{i=0}^N c_i \frac{1}{x^i}$. Choosing $n$ suitably large above shows that $f^{(k)}(x) \le C x^m$ where $m \ge 2$, from which we get $\lim_{x \to 0} \frac{f^{(k)}(x)-f^{(k)}(0)}{x-0} = 0$, and so $f^{(k)}$ is differentiable at $x=0$ with $f^{(k+1)}(0) = 0$.

It follows that $f$ is infinitely differentiable at $x=0$, and $f^{(k)}(0) = 0$ for all $k$.


The essential thing to know here is that $e^x$ swamps out any polynomial as $x \rightarrow \infty.$ The usual way to see this is by expanding $e^x$ in a Taylor's series and observing that this series always has more terms than any polynomial, so it will always go to $\infty$ faster. Alternatively and equivalently, you can use L'Hospital's rule many times and come to the same conclusion.

$x \rightarrow \infty$ is the same as 1/x $\rightarrow$ 0. Either way, the exponential part of the expression will control what happens.

No matter how many times you differentiate $e^{x^2} $ you will get $e^{x^2}/x^k $ (times various constant terms which have nothing to do with the limit) for some k > 1. Taking the limit as $x \rightarrow 0$ the $1/x^k$ factor will head toward $\infty$, but the $e^{1/x^2}$ will head for zero faster. In every case the exponential term will govern what happens and that term is going to zero, both from the right and left. So you can conclude that all derivatives exist and are 0 at x = 0.

This function is a cumbersome construct whose purpose is to show that a function can have infinitely many derivatives at a point and not be "analytic" there. Analytic can be defined for real functions as meaning that the Taylor's series converges to the original function. I mention this in case you are wondering why anyone asked you this question.


You want to compute $$\lim_{h \to 0}\frac{\exp(-1/h^2)}{h}$$ Show this is equivalent to computing $$ \lim_{k \to +\infty}k{\exp(-k^2)} \qquad \text{and} \qquad \lim_{k \to -\infty}k{\exp(-k^2)}. $$

and show they are equal. Then things get easy.

For your second question, see this.