How To Check For Differentiability Of A Pievewise Function