find minima and maxima points of a function



Hi Luigi, very nice, thank you for sharing, but .....

Luigi Marino <luigi_marino2 <at> alice.it> writes:

> Example:
>  
> f:x^3/(1-x^2);
> stud_funz(f);
> minimo[x=-sqrt(3),(3*sqrt(3))/2]massimo[x=sqrt(3),-(3*sqrt(3))/2]massimo[x=0,0]
>  

Does "massimo" mean local maximum? If yes, your example is not correct!
There is no local maximum at x=0 (point f inflection, the function behaves like
x^3 near origin). You should test maxima/minima more carefully.

Another problem: try the function x^2*log(x)/2-x^2/4 
the point x=0 is not a local maximum (does not belong to the domain of the
function). The problem is that solve(x*log(x)=0,x) returns x=0 which does not
belong to the domain. 

I think that your p[i] could be something like x=3, so you should use
ev(f,x:rhs(p[i])) instead of ev(f,x:p[i])

Thank you again for sharing your work with others.