Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Compute the local maxima of an expression with respect to the given variables
ResourceFunction["LocalMaxima"][expr,x] computes the local maxima of expr with respect to x. | |
ResourceFunction["LocalMaxima"][expr,{x,y,…}] computes the local maxima of expr with respect to multiple variables. | |
ResourceFunction["LocalMaxima"][{expr,const},{x,y,…}] computes the local maxima of expr subject to the constraint const. |
Compute the local 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]= |
|
LocalMaxima may return duplicate results for periodic functions:
In[5]:= |
|
Out[5]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License