By the EVT, these extrema will be located at x = .1 , x = 2.7 , or at any critical pts for f on the interval.
f(.1) = .71 , f(2.7) = 2.62
f'(x) = 2 - 1/x = 0 , x = 1/2 , with f' going from - to + there, so f(1/2) = -.10 a global min
Global max on [.1 , 2.7] at (2.7, 2.62). Local max on [.1 , 2.7] at (.1, .71). Global min on [.1 , 2.7] at (.5, -.10).