Is an odd function differentiable at zero if it is differentiable elsewhere (and has no vertical tangent)

calculus

Let $f: \mathbb{R} \to \mathbb{R}$ be an odd function that is differentiable everywhere except possibly at $x = 0$. Suppose that $f$ does not have a vertical tangent at $x = 0$ (so, an example like $y = x^{1/3}$ doesn't count). Does it follow that $f$ is differentiable at zero?

If that is true, how about if we weaken the hypothesis of differentiability on $\mathbb{R} \backslash \{0\}$ to just continuity on $\mathbb{R} \backslash \{0\}$?

Edit: I meant to assume that the function is also continuous at $0$.

Best Answer

I’ll assume you want to ask the function to be continuous at $0$; otherwise, the example by @player3236 gives a counterexample because the lack of continuity at $0$ messes you up even before you get started.

Let $f(x)$ be defined by $$f(x) = \left\{\begin{array}{ll} |x|\sin\left(\frac{1}{x}\right) &\text{if }x\neq 0,\\ 0&\text{if }x=0. \end{array}\right.$$ Then for any $x\neq 0$ we have $$f(-x) = |-x|\sin\left(\frac{1}{-x}\right) = -|x|\sin\left(\frac{1}{x}\right) = -f(x),$$ so $f$ is odd. It is also differentiable everywhere other than $0$, and is continuous at $0$. However, $$\lim_{x\to 0^+}\frac{f(x)-f(0)}{x} = \lim_{x\to 0^+}\sin\left(\frac{1}{x}\right)$$ does not exist, so it does not have a derivative at $x=0$.