Real Analysis – Differentiability at a Point vs. Neighborhood

examples-counterexamplesreal-analysis

(Write $[]$ for the Iverson bracket.)

I recently learned about the function $$\mathbb{R} \rightarrow \mathbb{R}$$
$$x \mapsto [x \in \mathbb{Q}]x^2 +[x \notin \mathbb{Q}](-x^2)$$

which is differentiable at $0$ but nowhere else.

Question.

Let $P$ denote one of the conditions:

  1. $r$-times differentiable
  2. $r$-times continuously differentiable
  3. smooth
  4. analytic

Consider a function $f : \mathbb{R} \rightarrow \mathbb{R},$ and fix
$x_0$ in $\mathbb{R}$. Do all possible implications of the form "If
$f$ satisfies $P$ at $x_0$, then $f$ satisfies $P$ in some
neighbourhood of $x_0$" fail?

I'd especially appreciate explicit counterexamples, or references to where such counterexamples can be found.

Best Answer

  1. Take an everywhere continuous but nowhere differentiable function $g$ such as the Weierstrass function. Then $f(x) = x^2g(x)$ is once differentiable at $0$, but not anywhere else. Integrate this $r-1$ times to find a function that is $r$ times differentiable at $0$ but nowhere else.

  2. Let $g$ have a derivative that is bounded globally but not continuous at $0$ -- for example, $$ g(x)=x^2\sin(1/x) $$ Then, $$f(x)=\sum_{n=1}^\infty \frac{g(x-1/n)}{2^n} $$ is differentiable and its derivative is continuous at $0$, but has discontinuities arbitrarily close to $0$. Integrate this $r-1$ times to find a counterexample for $r>0$.

  3. The function $$ f(x) = \sum_{n=1}^\infty \max(0,x-1/n)^n $$ converges for $x<1$. It is differentiable arbitrarily often at $0$, but the $n$th derivative fails to exist at $x=1/n$, so it is not smooth in any neighborhood of $0$.

  4. As noted in comments, being analytic at a point implies being analytic in a neighborhood of it.

Related Question