Differentiability Class/Examples/Class 1 Function

Example of Differentiability Class
Let $f$ be the real function defined as:


 * $\map f x = \begin {cases} 0 & : x < 0 \\ x^2 & : x \ge 0 \end {cases}$

Then $f \in C^1$ but $f \notin C^2$.

Proof
By inspection it is seen that $f$ is continuous everywhere.

We have that:
 * $\map {f'} x = \begin {cases} 0 & : x < 0 \\ 2 x & : x \ge 0 \end {cases}$

By inspection it is seen that $f'$ is continuous everywhere.

So by definition of differentiability class, $f$ is a member of $C^1$.

Then we have that:


 * $\map {f''} x = \begin {cases} 0 & : x < 0 \\ 2 & : x \ge 0 \end {cases}$

Hence $f''$ is not continuous at $x = 0$.

So by definition of differentiability class, $f$ is not a member of $C^2$.