intermediate value theorem vs mean value theorem