ASKSAGE: Sage Q&A Forum - Latest question feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Mon, 07 Sep 2020 16:23:58 -0500How to find the symbolic maximum of a 3D function?https://ask.sagemath.org/question/53364/how-to-find-the-symbolic-maximum-of-a-3d-function/I have a function of two real variables,
f(x,y) = a * (x * y - y^2) * exp( -b * x^2) * exp(b * x * y )
with the real parameters a and b, and five restrictions:
x>0;
y>0;
a>0;
b>0;
y<=x (y equal to or less than x)
In the 3d_plot, with a=b=1, i see there is only one local maximum, which is also the global maxium.
How can i get the formula, for x and y coordinate of the maximum, as function of the parameters a and b?
I tried assume() for the restrictions, but that does not work and is made for the other way, to tell what is already there, not what should be changed.
To get rid of the negative function values, i used
r(x,y) = max_symbolic(0, f(x,y))
and that works, but that is only a workaround for the not implemented restrictions.RolfFMon, 07 Sep 2020 16:23:58 -0500https://ask.sagemath.org/question/53364/Defining a function and forcing max or min valuehttps://ask.sagemath.org/question/8896/defining-a-function-and-forcing-max-or-min-value/Hi,
Is it possible to define a funtion, say f, and have it be the maximum (or minimum) of another function and a constant?
Example (pseudo-script): if g(x)=log(abs(x)), let f(x)=g(x) if g(x)>0, and f(x)=0 for all g(x)<0
Thanks
N.C.sagembTue, 17 Apr 2012 02:08:11 -0500https://ask.sagemath.org/question/8896/