Mean value theorem application