Find y'' for y = |x³|. Does y''(0) exist?
Find $y''$ for $y = \bigl|x^{3}\bigr|$. Does $y''(0)$ exist?
Explanation of Method
Twice differentiable everywhere, three times almost everywhere.
Step 1: A single formula for the function
Since $\bigl|x^{3}\bigr| = |x|^{3} = x^{2}|x|$, the function can be written without cases: \[y = x^{2}|x| = \begin{cases} x^{3}, & x\ge0,\\ -x^{3}, & x\lt 0. \end{cases}\]
Step 2: First derivative away from the origin
\[ y' = 3x^{2} \ \ \bigl(x>0\bigr), \qquad y' = -3x^{2} \ \ \bigl(x\lt 0\bigr). \]
Step 3: First derivative at the origin
Straight from the definition: \[y'(0) = \lim_{h\to0}\frac{|h|^{3}}{h} = \lim_{h\to0}h^{2}\cdot\frac{|h|}{h} = 0,\]
since the second factor is bounded by $1$ and the first tends to zero. Both branches and the origin are covered by the single formula
\[ y' = 3x|x|. \tag{1} \]
Step 4: Second derivative
Away from the origin, differentiating (1) gives $6x$ for $x>0$ and $-6x$ for $x\lt 0$, i.e. $6|x|$ in both cases. At the origin, again from the definition: \[y''(0) = \lim_{h\to0}\frac{y'(h)-y'(0)}{h} = \lim_{h\to0}\frac{3h|h|}{h} = \lim_{h\to0}3|h| = 0.\]
This agrees with $6|x|$ at $x = 0$, so one formula holds everywhere.
Step 5: The third derivative fails
$y'' = 6|x|$ has a corner at the origin, and the difference quotient has different one-sided limits: $\lim_{h\to0^{+}}\frac{6|h|}{h} = +6, \qquad \lim_{h\to0^{-}}\frac{6|h|}{h} = -6$.
So $y'''(0)$ does not exist, although $y'''=\pm6$ on either side. The function is exactly twice differentiable at the origin.
Step 6: Verification
\[x = 1:\ y = 1,\ y' = 3,\ y'' = 6; \qquad x = -1:\ y = 1,\ y' = -3,\ y'' = 6 \;\;\checkmark\]
\[y,\ y',\ y'' \text{ are all continuous at } 0 \text{ with value } 0 \;\;\checkmark\]
\[y'' = 6|x|\ge0 \text{ everywhere, so } y \text{ is convex on the whole line} \;\;\checkmark\]
Result
Final answer:
\[\boxed{\,y'' = 6|x|, \qquad y''(0) = 0 \ \text{ exists}\,}\]
Remark
Remark. The family $y = |x|^{m}$ shows every degree of smoothness: $|x|^{m}$ is exactly $\lceil m\rceil-1$ times differentiable at the origin for non-integer $m$, and for odd integer $m$ it is $m-1$ times differentiable there but no more. Here $m = 3$ gives two derivatives and no third — a standard example that "differentiable $k$ times" is a strictly finer classification than "smooth".