NMinValue

NMinValue[f,x]

gives the minimum value of f with respect to x.

NMinValue[f,{x,y,}]

gives the minimum value of f with respect to x, y, .

NMinValue[{f,cons},{x,y,}]

gives the minimum value of f subject to the constraints cons.

NMinValue[,xreg]

constrains x to be in the region reg.

Details and Options

  • NMinValue[] is effectively equivalent to First[NMinimize[]].
  • cons can contain equations, inequalities or logical combinations of these.
  • The constraints cons can be any logical combination of:
  • lhs==rhsequations
    lhs>rhs or lhs>=rhs inequalities
    {x,y,}regregion specification
  • NMinValue[{f,cons},xreg] is effectively equivalent to NMinValue[{f,consxreg},x].
  • For xreg, the different coordinates can be referred to using Indexed[x,i].
  • NMinValue always attempts to find a global minimum of f subject to the constraints given.
  • By default, all variables are assumed to be real.
  • xIntegers can be used to specify that a variable can take on only integer values.
  • If f and cons are linear, NMinValue can always find global minima, over both real and integer values.
  • Otherwise, NMinValue may sometimes find only a local minimum.
  • If NMinValue determines that the constraints cannot be satisfied, it returns Infinity.
  • NMinValue takes the same options as NMinimize.

Examples

open allclose all

Basic Examples  (4)

Find the minimum value of a univariate function:

Find the minimum value of a multivariate function:

Find the minimum value of a function subject to constraints:

Find the minimum value of a function over a geometric region:

Scope  (9)

Or constraints can be specified:

Use NMinValue for linear objectives and constraints:

Integer constraints can be imposed:

Find the minimum value of a function over a geometric region:

Plot it:

Find the minimum distance between two regions:

Plot it:

Find the minimum such that the triangle and ellipse still intersect:

Plot it:

Find the minimum radius of a disk that contains the given three points:

Using Circumsphere gives the same result directly:

Use to specify that is a vector in :

Find the minimum distance between two regions:

Plot it:

Applications  (2)

Find the minimal perimeter among rectangles with a unit area:

Find the minimal perimeter among triangles with a unit area:

Properties & Relations  (4)

NMinimize gives both the value of the minimum and the minimizer point:

NMinValue gives the minimum:

NArgMin gives the minimizer point:

NMinValue can solve linear programming problems:

LinearProgramming can be used to solve the same problem given in matrix notation:

Use RegionDistance to compute the minimum distance from a point to a region:

Compute the distance using NMinValue:

Use RegionBounds to compute the bounding box:

Use NMaxValue and NMinValue to compute the same bounds:

Introduced in 2008
 (7.0)
 |
Updated in 2014
 (10.0)