#2607: find_minimum_on_interval() uses the wrong scipy function
------------------------------+---------------------------------------------
       Reporter:  AlexGhitza  |         Owner:  jwmerrill
           Type:  defect      |        Status:  new      
       Priority:  major       |     Milestone:  sage-5.0 
      Component:  calculus    |    Resolution:           
       Keywords:  sd31        |   Work issues:           
Report Upstream:  N/A         |     Reviewers:           
        Authors:              |     Merged in:           
   Dependencies:              |      Stopgaps:           
------------------------------+---------------------------------------------

Comment (by ddrake):

 I just ran into this bug with the following input:
 {{{
    find_maximum_on_interval(fast_float(8*e^(-x)*sin(x) - 1, x), 0, 8)
     (1.5791755355586754, 0.78539817769603915)

     find_maximum_on_interval(fast_float(8*e^(-x)*sin(x) - 1, x), 0, 9)
     (-0.9951835373923219, 7.0685835435476418)
 }}}
 ...and was truly surprised that `find_maximum_on_interval` is not
 monotonic (in the sense that a bigger interval should always give a
 (weakly) bigger maximum)!

 At the VERY LEAST, we should fix the documentation to specify that this
 finds ''local'' extrema, and perhaps change the name of the function, too,
 since it does ''not'' always find the actual maximum value on the
 interval!

 Note that one strange workaround is to simply plot the function; something
 like:
 {{{
 def find_maximum_on_interval(f, a, b):
     return plot(f, a, b).ymax()
 }}}
 seems like it would be pretty effective, despite being inelegant and
 crude!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/2607#comment:15>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to