>

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

Use the LPSolve command to solve a linear program. The assume=nonnegative option specifies that the problem variables x and y are nonnegative. The solution consists of the final objective function value followed by the final values for x and y.
>

$\mathrm{LPSolve}\left(xy\,\left\{y\le 3x+\frac{1}{2}\,y\le 5x+2\right\}\,\mathrm{assume}=\mathrm{nonnegative}\right)$

$\left[{\mathrm{1.25000000000000}}{\,}\left[{x}{=}{0.187500000000000}{\,}{y}{=}{1.06250000000000}\right]\right]$
 (1) 
Use the NLPSolve command to find a local minimum, starting from a given initial point.
>

$\mathrm{NLPSolve}\left(\frac{\mathrm{sin}\left(x\right)}{x}\,x=1..15\,\mathrm{initialpoint}=\left[x=7\right]\right)$

$\left[{\mathrm{0.0913252028230577}}{\,}\left[{x}{=}{10.9041216489198}\right]\right]$
 (2) 
The Minimize command automatically selects the most appropriate solver.
>

$\mathrm{Minimize}\left(2x+5y+3{x}^{2}+3xy+2{y}^{2}\,\left\{2\le xy\right\}\,\mathrm{assume}=\mathrm{nonnegative}\right)$

$\left[{16.}{\,}\left[{x}{=}{2.}{\,}{y}{=}{0.}\right]\right]$
 (3) 
Use the Matrix form of the LSSolve command to minimize the norm of $g\mathrm{Cx}$ subject to $\mathrm{Ax}\le b$.
>

$g\u2254\mathrm{Vector}\left(\left[1.2\,2.0\,4.0\right]\,\mathrm{datatype}=\mathrm{float}\right)\:$

>

$C\u2254\mathrm{Matrix}\left(\left[\left[3.0\,2.0\right]\,\left[0.15\,3.5\right]\,\left[3.8\,4.0\right]\right]\,\mathrm{datatype}=\mathrm{float}\right)\:$

>

$A\u2254\mathrm{Matrix}\left(\left[\left[1.0\,3.0\right]\right]\,\mathrm{datatype}=\mathrm{float}\right)\:$

>

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

>

$\mathrm{LSSolve}\left(\left[g\,C\right]\,\left[A\,b\right]\right)$

$\left[{0.148793339132595459}{\,}\left[\begin{array}{c}{0.672673045855598}\\ {0.390891015285199}\end{array}\right]\right]$
 (4) 