Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients:
coefs = Table[{RandomReal[]}, {i, 0, 3}, {j, 0, 3}];
f = BezierFunction[coefs];
It seems to behave quite well:
Plot3D[f[s, t], {s, 0, 1}, {t, 0, 1}]
Now I would like to find the maximum of $f$. However,
NMaxValue[f[s, t], {s, t} ∈ Rectangle[{0, 0}, {1, 1}]]
only prints What is wrong and how to fix it?
P.S.: Of course, I could implement Bézier function by myself using Bernstein polynomials etc. But since Mathematica provides this BezierFunction
construct, I would like to understand it and be able to use it.