# Continuous function $f$ such that $X^n f$ is of the class $C^n$

Let $f: R \rightarrow R$ be continuous on $R$ ( with $f(0)=0$ if necessary) and of class $C^\infty$ on $R \setminus \{0\}$. Assume that for each $n \in N$ the function $g_n(x)=x^n f(x)$, for $x \in R$, is of the class $C^n$ on $R$.

Is it true that $f$ is of the class $C^\infty$ on $R$ ?

Thanks

-

## 1 Answer

No, the absolute value function $x \mapsto \begin{cases} x, & \mbox{if } x \ge 0 \\ -x, & \mbox{if } x \lt 0 \end{cases}$ is a counterexample.

-
It's the first thing that comes to mind.. =) – Patrick Da Silva Aug 11 '11 at 12:38