[tex]f(x)=\begin{cases}x^2&\text{for }x<0\\x+x^2&\text{for }x\ge0\end{cases}[/tex]
[tex]f'(x)=\begin{cases}2x&\text{for }x<0\\f'(0)&\text{for }x=0\\1+2x&\text{for }x>0\end{cases}[/tex]
In order for [tex]f[/tex] to be differentiable at [tex]x=0[/tex], i.e. for [tex]f'(0)[/tex] to exist, the limit from either side of [tex]x=0[/tex] of [tex]f'(x)[/tex] must be the same. This is not the case, as
[tex]\displaystyle\lim_{x\to0^-}f'(x)=\lim_{x\to0^-}2x=0[/tex]
[tex]\displaystyle\lim_{x\to0^+}f'(x)=\lim_{x\to0^+}(1+2x)=1[/tex]
and so [tex]f'(0)[/tex] does not exist.
Meanwhile,
[tex]f''(x)=\begin{cases}2&\text{for }x<0\\f''(0)&\text{for }x=0\\2&\text{for }x>0\end{cases}[/tex]
where
[tex]f''(0)=\displaystyle\lim_{x\to0}\frac{f'(x)-f'(0)}{x-0}=\lim_{x\to0}\frac{f'(x)-f'(0)}x[/tex]
But we found that [tex]f'(0)[/tex] doesn't exist, so this limit also can't exist, which in turn means that [tex]f''(0)[/tex] does not exist.
On the other hand, [tex]g(x)=x^2[/tex] is continuous and differentiable everywhere, so that [tex]g''(x)=2[/tex], and in particular, [tex]g''(0)=2[/tex].