ASKSAGE: Sage Q&A Forum - Individual question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Thu, 19 Apr 2012 16:05:28 -0500min(f,g) where f and g take two variableshttp://ask.sagemath.org/question/8907/minfg-where-f-and-g-take-two-variables/Hi
Is it possible to create a function h(x,y) that would be the minimum (or maximum) of any two other 2-variable functions?
Like h(x,y)=max(f(x,y),g(x,y))? (this does not work)
This seems to be a rather useful function but I can't seem to find it.
any ideas?
Thanks
N.Thu, 19 Apr 2012 08:52:55 -0500http://ask.sagemath.org/question/8907/minfg-where-f-and-g-take-two-variables/Comment by kcrisman for <p>Hi </p>
<p>Is it possible to create a function h(x,y) that would be the minimum (or maximum) of any two other 2-variable functions?</p>
<p>Like h(x,y)=max(f(x,y),g(x,y))? (this does not work)</p>
<p>This seems to be a rather useful function but I can't seem to find it.</p>
<p>any ideas?</p>
<p>Thanks
N.</p>
http://ask.sagemath.org/question/8907/minfg-where-f-and-g-take-two-variables/?comment=19885#post-id-19885Just for reference for those finding this, this is nearly the same question as http://ask.sagemath.org/question/1338/defining-a-function-and-forcing-max-or-min-value ... which apparently you asked? (It says anonymous but you replied later.) I'm wondering if maybe we misinterpreted one of your questions and gave a less than useful answer.Thu, 19 Apr 2012 16:05:28 -0500http://ask.sagemath.org/question/8907/minfg-where-f-and-g-take-two-variables/?comment=19885#post-id-19885Answer by achrzesz for <p>Hi </p>
<p>Is it possible to create a function h(x,y) that would be the minimum (or maximum) of any two other 2-variable functions?</p>
<p>Like h(x,y)=max(f(x,y),g(x,y))? (this does not work)</p>
<p>This seems to be a rather useful function but I can't seem to find it.</p>
<p>any ideas?</p>
<p>Thanks
N.</p>
http://ask.sagemath.org/question/8907/minfg-where-f-and-g-take-two-variables/?answer=13481#post-id-13481For example:
sage: h(x,y)=max_symbolic(x^2-y^2,y^2-x^2)
sage: plot3d(h(x,y),(x,-1,1),(y,-1,1)) Thu, 19 Apr 2012 10:57:40 -0500http://ask.sagemath.org/question/8907/minfg-where-f-and-g-take-two-variables/?answer=13481#post-id-13481