Hello everybody
----------------------------------------------------------------------
| Sage Version 3.4.1, Release Date: 2009-04-21 |
| Type notebook() for the GUI, and license() for information. |
----------------------------------------------------------------------
sage: var('x')
x
sage: f=x*cos(x)
sage: find_minimum_on_interval(f, 1, 10)
(-3.2883713955908962, 3.4256184628677961)
This is already wrong : the minimum is at -9,...
On fact :
sage: find_minimum_on_interval(f, 8, 10)
(-9.4772942594797929, 9.5293344182012572)
Seems strange that asking maximum on the interval [8,10] returns the
correct answer that is not found on the interval [1,10].
By the way :
sage: find_minimum_on_interval(f, 1, 15)
(-9.4772942594797929, 9.5293344109473779)
is correct.
So, the max is at 9, but
[1,10] --> 3 incorrect
[8,10] --> 9 correct
[1,15] --> 9 correct
Is there a way to get it correct on the first strike ?
Is it related to the following ?
sage : find_maximum_on_interval(f, 0, 5)
TypeError: cannot coerce type '<class
'sage.calculus.equations.SymbolicEquation'>' into a
SymbolicExpression.
That question was already raised here, but received no answer :
Find maximum on interval for result of diff() function.
http://groups.google.fr/group/sage-support/browse_thread/thread/4ed5ae2b21d6cc6c/03f9d86182655d14?hl=fr?hl=fr&lnk=gst&q=interval#03f9d86182655d14
Any idea to use correctly find_maximum/minimum_on_interval ?
Thanks
Have a good afternoon
Laurent
--~--~---------~--~----~------------~-------~--~----~
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-support
URLs: http://www.sagemath.org
-~----------~----~----~----~------~----~------~--~---