First continuous derivative of g(x) Let $f(x)$ be a function with second continuous derivative and $f(0)$ $=$ $f'(0)$ $=$ $0$
Determine a function $g$ by $g(x)$ = \begin{cases} \frac {f(x)}{x}, & \text{if $x$ $\neq$ 0 } \\  0, & \text{if $x$ = 0} \end{cases}
Then, which of the following statements is TRUE?
$(a)$ $g(x)$ has a first continuous derivative at $0$
$(b)$ $g(x)$ has a first derivative at 0 which is not continuous
$(c)$ $g(x)$ is discontinuous at $0$
$(d)$ $g(x)$ is continuous but fails to have a derivative at $0$
what i know
For first continuous derivative $g'(x)$ should exist and $g'(x)$ must continuous at $0$. ( am i correct?)
I have calculated $g'(x)$ = $\lim_{h\to 0}$ $\frac{g(x+h)-g(x)}{h}$ 
$g'(x)$ = $\frac{f''(x)}{2}$
But at $x$=0 ,
$g'(0)$ =  0
Clearly $g'(x)$ is not continuous at 0.
I also know that since $g'(x)$ = $\frac{f''(x)}{2}$ and $f''(x)$ is a continuous function so $g'(x)$ is also continuous but why I'm getting it wrong by definition where am i wrong ?
 A: To improve our understanding of $g$, the simplest path is to ask ourselves these questions of increasing difficulty :

*

*Is $g$ continuous at $0$ ?

*Then, is $g$ derivable at $0$ ?

*Then, is $g'$ continuous at $0$ ?

*(not asked in your problem) Then, is $g'$ derivable at $0$ ?

*(not asked in your problem) Then, is $g''$ continuous at $0$ ?

If one of them is false, all the other that follows are also false.

*

*As $f(0)=0$ we have for all $x \neq 0 $ :
$$g(x)=\dfrac{f(x)}{x}= \dfrac{f(x)-f(0)}{x-0}$$
thus $\lim\limits_{x \to 0} g(x) = f'(0)=0 = g(0)$, and $g$ is continuous at $0$.


*We have, for $x \neq 0$:
$$\dfrac{g(x) - g(0)}{x-0} =\dfrac{\frac{f(x)}{x}-0 }{x}= \dfrac{f(x)}{x^2}.$$
As $f$ is two-times derivable at $0$, we have
$$f(x) = f(0)+f'(0).x+\dfrac{f''(0)}{2}.x^2 + o(x^2) = \dfrac{f''(0)}{2}.x^2 + o(x^2)$$
thus
$$\dfrac{g(x) - g(0)}{x-0} = \dfrac{f''(0)}{2} + o(1).$$
Therefore $\lim\limits_{x \to 0}\dfrac{g(x) - g(0)}{x-0} = \dfrac{f''(0)}{2}$ , and $g$ is derivable at $0$ and $g'(0) = \dfrac{f''(0)}{2}$.


*Is $g'$ continuous at $0$ ? Surely $f'$ and $f''$ are, but as the denominator defining $g$ is zero when $x = 0$ (and as $g(0)$ is not defined thanks to $f$...), we cannot use that to conclude that $g'$ is continuous. We have to show whether $\lim\limits_{x \to 0} g'(x) = g'(0)$ or not.
We first compute $g'(x)$ for $x \neq 0$. As $g(x) =\dfrac{f(x)}{x}$ for $x \neq 0$, we get :
$$\forall x \neq 0,\quad g'(x) = \dfrac{f'(x).x-f(x)}{x^2}$$
As $f(x) = \dfrac{f''(0)}{2}.x^2 + o(x^2)$ and $f'(x) = f'(0)+f''(0).x + o(x) =f''(0).x + o(x)$, we get
$$ g'(x) = \dfrac{f'(x).x-f(x)}{x^2} = \dfrac{f''(0).x^2 + o(x^2)-(\frac{f''(0)}{2}.x^2 + o(x^2))}{x^2} = \dfrac{\frac{f''(0)}{2}.x^2 + o(x^2)}{x^2} = \frac{f''(0)}{2} + o(1).$$
Therefore $\lim\limits_{x \to 0} g'(x) = \frac{f''(0)}{2}$, and as we saw that $g'(0) =  \frac{f''(0)}{2}$, we have $\lim\limits_{x \to 0} g'(x) = g'(0)$ and $g'$ is continuous.


*To know if $g'$ is derivable, we have to look at $\lim\limits_{x \to 0} \dfrac{g'(x)-g'(0)}{x}.$ For $x \neq 0$, and using our previous Taylor expansion :

$$\dfrac{g'(x)-g'(0)}{x} = \dfrac{ \frac{f''(0)}{2}+o(1) - \frac{f''(0)}{2}}{x} = \dfrac{o(1)}{x}$$
Here, we cannot conclude : we need one more order for our Taylor Expansion, which can't be obtained here as $f$ is not assumed 3-times derivable.
For example, if we take $f(x) = |x|^{5/2}$, $f$ has a continuous second derivative on $\mathbb{R}$, but $g(x)= x^{3/2}$ on $\mathbb{R}_+$ is not 2-times derivable at $0$.
