I am a bit curious to know the write way to find whether the tangent exists $$ f(x) = \begin{cases} \ x^2 \sin (1/x) , & \text{$x \ne 0$} \\[2ex] 0, & \text{$x=0$} \end{cases} $$ They directly calculate the derivative at 0 on the first function.Now see the following function $$ f(x) = \begin{cases} \ -x , & \text{$x<0$} \\[2ex] x^2-x, & \text{$x≥0$} \end{cases} $$ For this function, they calculate the derivative from the right side and from the left side.If they are equal then tangent exist.But for the first piecewise function they did not do that.So which one to follow?
Please let me know.
Sabbir
In the first example, a hole was plugged in an otherwise smooth function where the top expression wasn't defined at $x = 0$.
In the second example the function is split into two different expressions so the derivative has to be figured for both sides.