Minimum and maximum value of the quadratic function in a closed interval