ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 04 Apr 2019 01:13:14 +0200Maximize nonlinear function with linear constraintshttps://ask.sagemath.org/question/46008/maximize-nonlinear-function-with-linear-constraints/I would like to have Sage maximize 60 * 5^{x0} *4^{x1} * 3^{x2}, where x0, x1, x2 are nonnegative integers such that
x0+x1+x2=2k-3
and
x1+2*x2 >= 3k-3,
where k is any nonnegative integer such that 3<= k <=20. I would like to create a loop so that Sage does this for me for each of these values of k.
I know that Sage has a tool called minimize_constrained, but I can't find a tool called "maximize_constrained". Please help! Thank you in advance :-)merluzaThu, 04 Apr 2019 01:13:14 +0200https://ask.sagemath.org/question/46008/find_minimum_on_interval: where did it go?https://ask.sagemath.org/question/41252/find_minimum_on_interval-where-did-it-go/Hello!
I'm confused about the whereabouts of the **find_minimum_on_interval** and **find_maximum_on_interval** functions.
I've just started using Sage, using *Sage Beginner's Guide* by Craig Finch as a guide.
One of the first examples in Chapter 8 uses both these functions to find relative minima and maxima of a function, but Sage gives me this error when I try to use that code:
Traceback (click to the left of this block for traceback)
...
NameError: name 'find_maximum_on_interval' is not defined
I get a similar error when trying to read documentation about such functions on both my local installation and the Sage Cell Server.
Since the book refers to an old version of Sage (4.5), my question is: did these functions get replaced/deleted in latter versions, or did I forget something?
Thank you very much in advance!isaia.ismaeleSat, 24 Feb 2018 21:45:19 +0100https://ask.sagemath.org/question/41252/