f(x) = 1/x + ln(x), 0.5<=x<=4

The local maximum of this function is given by (1/2, 2-ln(2))

How do we get this answer?

It is easiest enough to graph and see that is the endpoint, and the graph is coming from a maximum.