Intermediate mean value theorem and Applications