Skip to content

find_minimum_on_interval() uses the wrong scipy function #2607

@aghitza

Description

@aghitza

This was reported by Dean Moore on sage-support. Consider:

sage: f(x) = -x*sin(x^2)
sage: f.find_minimum_on_interval(-2.5, 2)
(-1.3076194129914434, 1.35521114057)
sage: f.find_minimum_on_interval(-2.5, -1)
(-2.1827697846777219, -2.19450274985)

So find_minimum_on_interval() returns a local minimum as opposed to the global one. (The same issue applies to find_maximum_on_interval.) This is due to the fact that the function wraps scipy.optimize.fminbound, which is only a local optimizer (Carl Witty pointed this out). We should instead use one of the global optimizers, i.e. scipy.optimize.anneal or scipy.optimize.brute.

Apply:

Depends on #13109

CC: @robert-marik @kcrisman

Component: calculus

Keywords: sd31, sd40.5

Author: Dan Drake, Andrey Novoseltsev, Andrzej Giniewicz, Volker Braun

Reviewer: Karl-Dieter Crisman, Mike Hansen, Andrey Novoseltsev

Merged: sage-5.3.beta0

Issue created by migration from https://trac.sagemath.org/ticket/2607

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions