Is it the the maximum on the closed interval [a,b] not the largest local maximum, correct? (unless that largest local maximum is also the largest value on the closed interval)

and what if the function ends up having a vertical asymptote on the interval? such has 6/x on [0,3]