Explanation:
Take the derivative of the function.

Set the derivative function equal to 0.


Next, we use sign analysis to see where we have relative max/min, absolute max/min
We also include the endpoints of the interval as well (0,3)
So we have two intervals


For every interval, pick a random point to see if the derivative function is positive or negative.
If positive, that interval is increasing
If negative, that interval is decreasing.
If 0, that interval is constant
For the first interval, let use 0

So the interval is decreasing over 0<=x<1
Furthermore, since the interval is decreasing. The intial point at x=0 could be considered a maximum.
For the second interval, let use 2

So the interval is increasing over 1<x<=3,
Furthermore, since the interval is increasing. The enpoint could also be considered a maximum.
Since we went from decreasing to increasing, the point

can be considered a minimum point.
Let plot all the critical values in the function to see their coordinate pair.



So here
(0,-6) is a relative maximum
(1,-12) is a absolute minimum
(3,0) is a absolute maximum