Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the global maxima of an expression with respect to the given variables
ResourceFunction["GlobalMaxima"][expr,x] computes the global maxima of expr with respect to x. | |
ResourceFunction["GlobalMaxima"][expr,{x,y,…}] computes the global maxima of expr with respect to multiple variables. | |
ResourceFunction["GlobalMaxima"][{expr,const},…] computes the global maxima of expr subject to the constraint const. |
Compute the global maxima of a polynomial:
In[1]:= |
|
Out[1]= |
|
Plot them:
In[2]:= |
|
Out[2]= |
|
Use a constraint in order to reduce the domain upon which maxima can be found:
In[3]:= |
|
Out[3]= |
|
Compute the maxima of a function of two variables:
In[4]:= |
|
Out[4]= |
|
GlobalMaxima may return duplicate results for periodic functions:
In[5]:= |
|
Out[5]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License