First time here? Check out the FAQ!

Ask Your Question
1

min(f,g) where f and g take two variables

asked 13 years ago

sagemb gravatar image

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.

Preview: (hide)

Comments

Just 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.

kcrisman gravatar imagekcrisman ( 13 years ago )

1 Answer

Sort by » oldest newest most voted
3

answered 13 years ago

achrzesz gravatar image

For 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))
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 13 years ago

Seen: 863 times

Last updated: Apr 19 '12