d/dx piecewise[{{-2,x<0},{x+ln(|x-1|)-2,x>=0}}]