max is f(4) = 7 at x=4
f(4) = 4^2 -2(4) -1 = 16-8-1 = 7
f(0) = -1
local extremum is when the derivative = 0, or 2x-2=0, x=1
f(1) = 1^2 -2(1) -1 = 1-2-1 =-2 = absolute & local minimum. It's an upward opening parabola where the vertex is a minimum (1,-2). No maximums except at a given interval.