Previous Up Next

16.2.2  Local extrema

The extrema command attempts to find local extrema of a univariate/multivariate differentiable expression, possibly subject to equality constraints, by using analytical methods.

Examples

extrema(-2*cos(x)-cos(x)^2,x)
     


0
π 


          
extrema(x/2-2*sin(x/2),x=-12..12)
     








10
3
 π
2
3
 π 
2
3
 π
10
3
 π 








          
assume(a>=0):; extrema(x^2+a*x,x)
     






1
2
 a


,




          
extrema(exp(x^2-2x)*ln(x)*ln(1-x),x=0.5)
     



,
0.277769149124

          
extrema(x^3-2x*y+3y^4,[x,y])

[x=0,y=0]: saddle point

     










12
1
5
 
3


12
1
5
 


2


 
6





,






          
assume(a>0):; extrema(x/a^2+a*y^2,x+y=a,[x,y],lagrange)
     






a4−1
a3
1
a3



,




          
extrema(x^2+y^2,x*y=1,[x=0..inf,y=0..inf])
     


11

,


          

To find only the critical points of f(x,y,z)=x y z subject to x+y+z=1:

extrema(x*y*z,x+y+z=1,[x,y,z],order=1)
     







010
001
100
1
3
1
3
1
3







          

The Peano surface z=(2x2y)(yx2) was proposed by Giuseppe Peano in 1899 as a counter-example to a criterion for the existence of maxima and minima which was conjectured at the time. Indeed, it is not possible to classify its only critical point (0,0), which turns out to be a saddle, not a maximum:

extrema((2x^2-y)*(y-x^2),[x,y])

[x=0,y=0]: indeterminate critical point

     



,


          

Previous Up Next