Given $f(1) = 2$, $f'(1) = 1$ and $f''(1) = -2$, $P(1, 2)$ can't be an extremum that lies in the domain, but can it be an edge extremum (an extremum that lies on the edge of the domain (for example for $D_f = (-\infty, 1]$))?
In that case, shouldn't $f'(1)$ be undefined?