What are the extrema of # f(x)=x/(x-2)# on the interval [-5,5]?
There are no absolute extrema, and the existence of relative extrema depends on your definition of relative extrema.
So, the function has no absolute maximum on
This tells us that
Similarly, if your approach allow one-sided relative extrema, then #f(5) is a relative mimimum.
To help visualize, here is a graph. The restricted domain graph is solid and the endpoints are marked.
The natural domain graph extends into the dashed line part of the picture.