find minima and maxima points of a function



Wolfgang Lindner <LindnerW <at> t-online.de> writes:

> 
> hi Luigi,
> 
> thanks for sharing your code with us. I enjoy it.
> Find attached some code examples of Maxima friends (Nelson and Mario) for
> the same job.
> Maybe you find it interesting, too.
> My class and me like it ..
> 
> hth
> wolfgang

Hi Wolfgang, thank you for sharing the code of your friends.
If you use something like this in your classroom, remember, 
that the linear system
[diff(f,x)=0,diff(f,y)=0]
may have solution which do not belong to the domain of the function f. 
In this case your code marks points which do not belong to the 
domain as maxima or minima. 
For example x^2+y+ln(y) and the point x=0, y=-1.

But I think that only a minor improvement is sufficient to get great 
macro for local maxima/minima.

btw: One of my friends wrote a similar procedure in Maple. He included the test
that the results of solve command are real. I think, you can use rectform and
imagpart or freeof in Maxima.

Robert.