We start by finding the critical points of \(f\) in the interior of \(D\text{,}\) i.e., on the set
\begin{equation*}
\operatorname{int}(D)=\{(x,y)\in \R^2 : -1 \lt x \lt 1,\ -1 \lt y \lt 1\}\text{.}
\end{equation*}
We compute that
\begin{equation*}
f_x = 6x + 2 \quad\text{and}\quad f_y = -4y + 2\text{.}
\end{equation*}
These two quantities vanish simultaneously at the point \((-1/3,1/2)\text{,}\) which is therefore the only critical point of \(f\text{.}\) At this point
\begin{align*}
f(-1/3,1/2) \amp = 3(-1/3)^2 - 2(1/2)^2 + 2(-1/3) + 2(1/2) - 1 \\
\amp = -5/6\text{.}
\end{align*}
Now we check the boundary of the function
\(f\text{.}\) The boundary is the union of four curves, and so we can parameterize these curves, and find the critical points of the parameterization, to determine potential absolute minima and maxima on these curves (treating the corners of
\(D\) separately).
On the bottom edge \(y = -1\text{,}\) the function takes the form
\begin{equation*}
f(x,-1) = 3x^2 - 2(-1)^2 + 2x + 2(-1) - 1 = 3x^2 + 2x - 5\text{.}
\end{equation*}
The only critical point of the expression \(3x^2 + 2x - 5\) occurs at \(x = -1/3\text{,}\) and
\begin{equation*}
f(-1/3,-1) = 3(-1/3)^2 + 2(-1/3) - 5 = -16/3\text{.}
\end{equation*}
Similarly, on the top edge \(y = 1\text{,}\) the function takes the form
\begin{equation*}
f(x,1) = 3x^2 - 2(1)^2 + 2x + 2(1) - 1 = 3x^2 + 2x - 1\text{.}
\end{equation*}
As for the bottom edge, the only critical point of the expression \(3x^2 + 2x - 1\) occurs at \(x = -1/3\text{,}\) and
\begin{equation*}
f(-1/3,1) = 3(-1/3)^2 + 2(-1/3) - 1 = -4/3\text{.}
\end{equation*}
On the left edge \(x = -1\text{,}\) the function takes the form
\begin{equation*}
f(-1,y) = 3(-1)^2 - 2y^2 + 2(-1) + 2y - 1 = - 2y^2 + 2y\text{.}
\end{equation*}
The only critical point of the expression \(-2y^2 + 2y\) occurs when \(y = 1/2\text{,}\) and
\begin{equation*}
f(-1,1/2) = 2(1/2) - 2(1/2)^2 = 1/2\text{.}
\end{equation*}
Similarly, on the right edge \(x = 1\text{,}\) the function takes the form
\begin{equation*}
f(1,y) = 3(1)^2 - 2y^2 + 2(1) + 2y - 1 = -2y^2 + 2y + 4\text{.}
\end{equation*}
The only critical point of this expression occurs when \(y = 1/2\text{,}\) and
\begin{equation*}
f(1,1/2) = -2(1/2)^2 + 2(1/2) + 4 = 9/2\text{.}
\end{equation*}
Out of the four critical points we have calculated, the only potential absolute minima occurs at \((-1/3,-1)\text{,}\) where \(f\) has value \(-16/3\text{,}\) and the only potential absolute maxima occurs at \((1,1/2)\text{,}\) where \(f\) has value \(9/2\text{.}\)
Finally, we must check the value of the function at the four corners
\((-1,-1)\text{,}\) \((-1,1)\text{,}\) \((1,-1)\text{,}\) and
\((1,1)\text{.}\) We calculate that
\(f(-1, -1) = -4\text{,}\) \(f(-1, 1) = 0\text{,}\) \(f(1, -1) = 0\text{,}\) and
\(f(1, 1) = 4\text{.}\)
Comparing all values, we see that the absolute maximum of
\(f\) on
\(D\) occurs at
\((1,1/2)\text{,}\) with maximum value
\(9/2\text{,}\) and the absolute minimum occurs at
\((-1/3,-1)\text{,}\) with minimum value
\(-16/3\text{.}\)