$$f(x)= \begin{cases}(x-1)\left(1+ \sin\left(\dfrac{1}{x^2-1}\right)\right) & x\neq 1 \\ 0 & x=1 \end{cases}$$
Is the function continuous if I just show that the limit to the first expression is $~0~$ when $~x=1~$. I have to use the definition of the derivative to find out if it is differentiable in $~x=1~$, but I don't know how to do that with a combined function. I have tried to use the definition on the first function: $~(x-1)~$, but I get a big and messy expression.
I really appreciate some help.



HINT
One possible approach consists in making use of the squeeze theorem. Precisely, observe that \begin{align*} (x-1)\sin\left(\frac{1}{x^{2}-1}\right)\xrightarrow{\text{$x \rightarrow 1$}} 0 \end{align*}
That is because \begin{align*} \lim_{x\rightarrow 1} (x-1) = 0\quad\text{and}\quad\left|\sin\left(\frac{1}{x^{2}-1}\right)\right| \leq 1 \end{align*}
Can you proceed from here as to the derivative?