General theorem- a continuous function always has a max and min on a closed, bounded interval.

The max and min must occur at one of three kinds of points- where the derivative is 0, where the derivative is not defined, or at the endpoints.

What you have done is show that that there is NO point where the derivative is 0 inside the interval , nor is there any point where the derivative is not defined, so the max and min must be at the endpoints.