How to find the derivative of a piece-wise function? Find the derivative of the function at $x=0$
$$f(x) = \begin{cases}
e^x + x^3\cos\frac{1}{x}, &amp;x\ne 0,\\
1, &amp;x = 0.
\end{cases}$$

Now isn't this is trivial? Since $f(x)  = 1$ when $x = 0$ so the derivative at this point would be $0$ since it is a constant? Do I have to even compute the derivative for the first expression? But this seems to simple relative to the points offered for this question?
You could only apply that reasoning if the function were constant on an interval around $x=0$, which is not the case here.
The derivative of $e^x+ x^3 cos(1/x)$ is $e^x+ 3x^2 cos(1/x)+ x sin(1/x)$.  This function is NOT differentiable at x= 0.