find minima and maxima points of a function




On Fri, 6 Feb 2009, Richard Fateman wrote:

< Leo Butler wrote:
< > .....
< > < >  I believe that maxima does this
< > < > implicitly.
< >   
< 
< I think it would be more correct to say that maxima does this by being
< oblivious to the issue.
< > That is clearly a bug.
< 
< Well, the notion of solving and the output of the solve command are not
< necessarily the same.
< The solve command does not check that all the solutions it returns are
< actually solutions.

I think the original poster had the following in mind: an elementary way
for 'solve' to check a putative solution x is to verify that x is in the
domain. I don't know the internals of 'solve' but it is apparent that it
doesn't employ any such checks. 

(Yes, I am aware that most (all?) cas are hopelessly sloppy on this 
point, because they allow an expression to define a function without specifying
the domain of that function, and determining the domain from an expression is
a difficult problem -- but maxima ought to know what are the domains of the
elementary functions).

< One good reason for this is that substituting back and checking is too hard in
< general.
<

 
< A bug suggests that the program doesn't meet its specifications.
< In this case  I think the specification should be made more explicit.

One man's bug is another's feature. The point is that there is a
shortcoming that can catch a user unaware. If one cannot fix a pothole,
at least one ought to put up a warning sign.
I would think that a number of cautionary examples, and possible
workarounds, could be added to the documentation of 'solve'. 

Leo.

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.