#5960: fix bug in documentation of find_minimum_on_interval
----------------------+-----------------------------------------------------
Reporter: was | Owner: burcin
Type: defect | Status: new
Priority: minor | Milestone: sage-4.0
Component: calculus | Keywords:
----------------------+-----------------------------------------------------
{{{
From Thomas Savitsky (on sage-devel):
> > 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)
}}}[[BR]]
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/5960>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---