تابع $f$ با ضابطهی $f\left( x \right)=\left\{ \begin{matrix}
\left( x-1 \right)\left| x-1 \right|\,\,\,\,\,\,\,\,\,\,\,\,;\,\,\,\,x\ne 1 \\
a\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,;\,\,\,\,x\ne 1 \\
\end{matrix} \right.$ در $x=1$ مشتق پذیر است، $a$ کدام است؟