The new function is differentiable at x = 1 {\displaystyle x=1} also. Therefore if it has a local max, then its derivative must be zero.