Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Optimization >

MaxValue

MaxValue[f, x]
gives the maximum value of f with respect to x.
MaxValue[f, {x, y, ...}]
gives the maximum value of f with respect to x, y, ....
MaxValue[{f, cons}, {x, y, ...}]
gives the maximum value of f subject to the constraints cons.
MaxValue[{f, cons}, {x, y, ...}, dom]
gives the maximum value of f over the domain dom, typically Reals or Integers.
  • MaxValue gives the supremum of values of f. It may not be attained for any values of x, y, ....
  • cons can contain equations, inequalities or logical combinations of these.
  • If f and cons are linear or polynomial, MaxValue will always find a global maximum.
  • MaxValue will return exact results if given exact input.
  • If MaxValue is given an expression containing approximate numbers, it automatically calls NMaxValue.
  • If no domain is specified, all variables are assumed to be real.
  • xElementIntegers can be used to specify that a particular variable can take on only integer values.
Find the maximum value of a univariate function:
Find the maximum value of a multivariate function:
Find the maximum value of a function subject to constraints:
Find the maximum value as a function of parameters:
Find the maximum value of a univariate function:
In[1]:=
Click for copyable input
Out[1]=
 
Find the maximum value of a multivariate function:
In[1]:=
Click for copyable input
Out[1]=
 
Find the maximum value of a function subject to constraints:
In[1]:=
Click for copyable input
Out[1]=
 
Find the maximum value as a function of parameters:
In[1]:=
Click for copyable input
Out[1]=
Unconstrained univariate polynomial maximization:
Constrained univariate polynomial maximization:
Univariate transcendental maximization:
Univariate piecewise maximization:
Multivariate linear constrained maximization:
Linear-fractional constrained maximization:
Unconstrained polynomial maximization:
Constrained polynomial optimization can always be solved:
The maximum value may not be attained:
The objective function may be unbounded:
There may be no points satisfying the constraints:
Algebraic maximization:
Bounded transcendental maximization:
Piecewise maximization:
Unconstrained parametric maximization:
Constrained parametric maximization:
Integer linear programming:
Polynomial maximization over the integers:
Finding the exact maximum can take a long time:
With WorkingPrecision->200, you get an exact maximum value, but it might be incorrect:
Find the maximal area among rectangles with a unit perimeter:
Find the maximal area among triangles with a unit perimeter:
Find the maximum height reached by a projectile:
Find the maximum range of a projectile:
Maximize gives both the value of the maximum and the maximizer point:
For strict polynomial inequality constraints MaxValue may be much faster than Maximize:
MaxValue gives an exact global maximum value of the objective function:
NMaxValue attempts to find a global maximum numerically, but may find a local maximum:
FindMaxValue finds local maxima depending on the starting point:
MaxValue can solve linear programming problems:
LinearProgramming can be used to solve the same problem given in matrix notation:
MaxValue requires that all functions present in the input be real-valued:
Values for which the equation is satisfied but the square roots are not real are disallowed:
New in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team