# [Maxima] last revision maxima and mininima points of f(x)

Luigi Marino luigi_marino2 at alice.it
Sun Feb 8 07:38:44 CST 2009

```Here is my last revesion of minima and maxima
for f(x), founds also inflection points (zeros of second
derivative only). Some zeros of second derivative are not inflection  points (it for all critical users of Maxima).

It  works without problem for polinomials
and rational functions (some limitation for log and
exponential function,  no works  for trig function ).

stud_funz(f):=block([p,q,fs,fp],
p:solve(diff(f,x,1),x),
q:solve(diff(f,x,2),x),
fs:diff(f,x,2),
fp:ev(fs,x:p),
for i:1 thru length(float(p)) do
(if rhs(fp[i])>0 then print("minimo",[p[i],ev(f,x:rhs(p[i]))]),
if rhs(fp[i])<0 then print("massimo",[p[i],ev(f,x:rhs(p[i]))])),
for j:1 thru length(float(q)) do print("flesso",[q[j],ev(f,x:rhs(q[j]))]))\$

Example:

f:(x^3+10*x)/(x^2+1);

stud_funz(f);
minimo[x=-sqrt(2),-4*sqrt(2)]
massimo[x=sqrt(2),4*sqrt(2)]
massimo[x=-sqrt(5),-(5*sqrt(5))/2]
minimo[x=sqrt(5),(5*sqrt(5))/2]
flesso[x=-sqrt(3),-(13*sqrt(3))/4]
flesso[x=sqrt(3),(13*sqrt(3))/4]
flesso[x=0,0]

Best wishes
luigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.math.utexas.edu/pipermail/maxima/attachments/20090208/fcb748f9/attachment-0001.htm
```