1. Example: a function of one variable. Here

f(x) = x3 - 4x2 + x - 3

> readlib(extrema); 

> f:= x^3 - 4*x^2 + x - 3; 

> ex:= extrema(f,{},{x},'s');  stores the extreme value of f in ex

> evalf(ex);  displays the extreme value in decimal form

> s;  s contains the critical point(s) of f

> evalf(s);  displays the critical point(s) in decimal form

The quantity s contains the critical point(s).

The quantity ex contains the extreme value of f.

  1. Example: a function of two variables. Here

> readlib(extrema); 

> f:= -x/3 -y/6 +7/30*y^2 +3/2 +17*x*y/30 +x^2/2; 

> ex:= extrema(f,{},{x,y},'s'); 

> evalf(ex);  displays the extreme value in decimal form

> s;  the critical point(s) of f

> evalf(s);  displays the critical point(s) in decimal form

  1. NOTE: Also see the commands minimize and maximize under the student library. These give minima and maxima only; they do not give critical points.

> with(student); 

> ?minimize; 

> ?maximize; 

  1. For many other popular commands common to student use,

> ?student;