>

$\mathrm{with}\left(\mathrm{GlobalOptimization}\right)\:$

Minimize the objective function ${\left(x1\right)}^{2}+{\left(y2\right)}^{2}$ with constraints ${x}^{2}\le 1$ and $x+y\le \frac{1}{2}$ over the region $x=\mathrm{1}..1,y=\mathrm{1}..1$.
The objective function is a procedure taking as input a Vector containing the $x$ and $y$ values.
>

p := proc (V)
(V[1]1)^2+(V[2]2)^2
end proc:

The constraints are specified as a procedure that accepts a Vector containing the $x$ and $y$ values as input and returns a Vector containing the constraint values.
>

nlc := proc(V, W)
W[1] := V[1]^21:
W[2] := V[1]+V[2]1/2
end proc:

The bounds are specified as Vectors of dimension 2.
>

$\mathrm{bl}\u2254\mathrm{Vector}\left(\left[1\,1\right]\,\mathrm{datatype}=\mathrm{float}\right)\:$

>

$\mathrm{bu}\u2254\mathrm{Vector}\left(\left[1\,1\right]\,\mathrm{datatype}=\mathrm{float}\right)\:$

>

$\mathrm{bd}\u2254\left[\mathrm{bl}\,\mathrm{bu}\right]\:$

Find the global solution to the problem.
>

$\mathrm{GlobalSolve}\left(2\,p\,\left[2\,0\right]\,\mathrm{nlc}\,\mathrm{bd}\right)$

$\left[{3.12499975185340784}{\,}\left[\begin{array}{c}{\mathrm{0.249978570091025}}\\ {0.749978669715350}\end{array}\right]\right]$
 (1) 