# Counterexample: For real functions existence of all higher order derivatives doesn't imply analycity.

In the lecture we had an example for a function $f: \mathbb R \to \mathbb R$, which is not analytic. We defined, that a function is said to be analytic at some point $x_0$ if a Taylor series expansion is valid at that point.

The following example is supposed to demonstrate that for real functions the existence of all higher order derivatives does not imply analycity.

Let $f: \mathbb R \to \mathbb R$ be a real function defined by $f(x) = e^{-1/x^2}$. Then $f$ is infinitely many times differentiable and $f^{(n)}(0) = 0$, $\forall n \in \mathbb N \cup \{0\}$. But $f \ne 0$ in some neighbourhood of $x = 0$ and therefore $f$ is not analytic.

I understand the logic behind that counterexample, but I don't understand why we are allowed to take the point $x = 0$, since $f$ is actually not defined at that point?!

Thanks for help.

• If that is presented as an example, it should absolutely be explicitly defined as $f(0) = 0$. In other contexts, it is forgivable to tacitly assume that case. – Daniel Fischer Dec 11 '13 at 15:36

Actually you define $f(x):=e^{-\frac{1}{x^2}}$ for all $x\neq 0$ and $f(0):=0$. Then you check continuity at $x=0$ and go on with the proof.