12. (12 points) Given
$$
\begin{array}{l}
f(x, y) \\
=x^{3}+y^{3}+x^{2} y+x y^{2}-3\left(x^{2}+y^{2}+x y\right)+3(x+y),
\end{array}
$$

and $x, y \geqslant \frac{1}{2}$. Find the minimum value of $f(x, y)$.
12. When $x \neq y$, multiplying both sides of the function by $x-y$ gives
$$
\begin{array}{l}
(x-y) f(x, y) \\
=\left(x^{4}-y^{4}\right)-3\left(x^{3}-y^{3}\right)+3\left(x^{2}-y^{2}\right) . \\
\text { Let } g(x)=x^{4}-3 x^{3}+3 x^{2} .
\end{array}
$$

Then $f(x, y)=\frac{g(x)-g(y)}{x-y}$ is the slope of the line segment connecting two points on the graph of $g(x)$.
When $x=y$, $f(x, y)=4 x^{3}-9 x^{2}+6 x$.
Thus, we only need to find the minimum value of the derivative of $g(x)$ for $x \geqslant \frac{1}{2}$,
$$
h(x)=4 x^{3}-9 x^{2}+6 x
$$

It is easy to find that when $x \geqslant \frac{1}{2}$,
$$
h(x)=4 x^{3}-9 x^{2}+6 x
$$

the minimum value is 1.