How about the sweet spot?
From The Free Dictionary:
sweet spot: an area or range that is most effective or beneficial: an engine's sweet spot of rpm's for maximum fuel-efficiency; a store's demographic sweet spot of women in their twenties.
With regard to your example: For a given function f(X), the value of X between the minimum and maximum values of X at which f(X) is optimal is the sweet spot. The sweet spot is not necessarily the arithmetic average, the geometric mean, or any other fixed function of the maximum and minimum values of X.
Sweet spot is perhaps most easily understood in terms of the following definition:
The place on a bat, club, racket, or paddle where it is most effective
to hit a ball. [The Free Dictionary]
The optimum place is clearly somewhere between the two ends of the bat, club, racket, or paddle, and the location of that place is the sweet spot. The exact location, which could be determined experimentally, will vary depending on the design of the bat, club, racket, or paddle.