To be differentiable, the function needs to be continuous and smooth.
Clearly is continuous since it is a polynomial.
Also, since and are both continuous for , so will be their product.
So the only place where this hybrid function might not be continuous is where the function "changes" - so at . We need to check that the left hand and right hand limits are 0.
Clearly the left hand limit is 0. So we would need to show that .