mean-value theorem vs intermediate value theorem