On Fri, May 1, 2009 at 9:31 PM, Thomas Savitsky <tjsavit...@gmail.com> wrote:
>
> On Fri, May 1, 2009 at 8:05 PM, William Stein <wst...@gmail.com> wrote:
>>
>> On Fri, May 1, 2009 at 4:58 PM, Thomas Savitsky <tjsavit...@gmail.com> wrote:
>> > Hello all,
>> >
>> > I've noticed that the function find_minimum_on_interval makes no attempt to
>> > find "the" minimum on the interval as the documentation implies, but rather
>> > "a local" minimum.  I imagine this may be a source of confusion for other
>> > new users as well.  Rather than treating this as a bug, may I suggest
>> > changing the documentation for this function to reflect that it only finds 
>> > a
>> > local minimum and adding an additional function which searches for a global
>> > minimum?
>>
>> +1  Can you provide a few examples for the docstring that illustrate this?
>
> Do these work?
>
> sage: h(x) =  -sin(x) - 2*sin(2*x)
> sage: h.find_minimum_on_interval(0, 2*pi)
> (-1.3271810224585345, 3.8298351449342838)
> But there is another local minimum at h(0.8666760871050464) = -2.73581510406
>
>
> sage: find_minimum_on_interval(x*(x-1)*(x+1), -2, 2)
> (-0.38490017945975047, 0.57735026913115706)
> The minimum on this interval is the endpoint h(-2) = 6.
>
>
> sage: find_minimum_on_interval((x-2)*(x-1)*x*(x+1) - x, -2, 2)
> (-0.43749999999999994, -0.49999999973911674)
>
> but
> sage: find_minimum_on_interval((x-2)*(x-1)*x*(x+1) - x, 0, 2)
> (-2.6642135623730949, 1.7071067879138031)
>
> --Thomas
>

Thanks.  I've opened a trac ticket:

  http://trac.sagemath.org/sage_trac/ticket/5960

William

--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-devel@googlegroups.com
To unsubscribe from this group, send email to 
sage-devel-unsubscr...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/sage-devel
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---

Reply via email to