Solving a min max problem in 2 variables using Mathematica

In summary, the conversation discusses the concept of maxima and minima points in a 3D graph and how it relates to a function with two variables. The person is trying to find the maxima and minima points using derivatives, but the answer turns out to be 0 and there are no maxima or minima points for this function. The conversation also touches on the concept of saddle points and how the function in question does not have any.
  • #1
Wi_N
119
8
Homework Statement
Solving min max problem in 2 variables using Mathematica
Relevant Equations
(x + y)*Sin[x - y],

3 questions: how many min/max points in R^2 and how many "saddle points"(in 3d)?
Drawing the graph in 3d you see endless "mountains and valleys" which logic tells me there will also be infinite max min points in 2d regardless of where you slice the graph. apparently this is wrong and there is a finite max/min points in R^2/2D. Please note this problem does not have a domain.

f'x= (x + y) Cos[x - y] + Sin[x - y]==0
f'y =-(x + y) Cos[x - y] + Sin[x - y]==0

fx==fy
y =(-x)

f'x=sin2x==0 (infinite max min )

f'y=sin-2y==0 (infinite max min)

...what am i doing wrong?
 
Physics news on Phys.org
  • #2
Wi_N said:
Drawing the graph in 3d
Like this ? :
1579019321001.png

Wi_N said:
apparently this is wrong
Where do you see the maxima ? (how are maxima defined ?)
Wi_N said:
"saddle points"(in 3d)?
Any definition of such a thing ? For a function of two variables ? Or do you mean 'for z = (x + y)*Sin[x - y] ' ?

What do you call 2D and what 3D ?

Note: You could also make a little coordinate transformation: u = x+y, v = x-y and study u * sin v
 
  • #3
Wi_N said:
fx==fy
y =(-x)

f'x=sin2x==0 (infinite max min )
f'y=sin-2y==0 (infinite max min)

...what am i doing wrong?
In the first place: What are you doing at all ?

Poor man's math:
maxima is where the rain accumulates when you hold the surface upside down

Mathematical criterion has to do with derivatives allright, but not in the way you treat it.
 
  • #4
Ya I'm pretty sure I've done it correctly in terms of finding min and max points of a function with two variables.
Take the derivative with respect to each variable independently. and both ==0 you find the critical point. you can use various techniques to find out if its max or min.

Edit: Apparently the answer is 0, the function doesn't have any max or min points...
 
Last edited:
  • #5
Wi_N said:
function doesn't have any max or min points
That becomes clear from the picture. So what is it with the points that have ##f_x=f_y=0## ?
 
  • #6
Zero in, zero in! :oldwink:

You got x = -y.

Isn't that or is that a solution to part of the problem? If not why not?

And anyway doesn't it reduce the problem to one in one variable only? :oldwink:

You can eliminate between your two equations for zero derivatives in more than one way. :oldwink:
 
Last edited:
  • #7
Wi_N said:
Edit: Apparently the answer is 0, the function doesn't have any max or min points...
Yes. Can you see that from the picture ?
And what about the saddle points ?
 

1. How do I define a min max problem in 2 variables using Mathematica?

To define a min max problem in 2 variables using Mathematica, you can use the Minimize and Maximize functions. For example, if you want to find the minimum value of a function f(x,y) subject to certain constraints, you can use the command Minimize[{f[x,y], constraints}, {x,y}].

2. Can I solve a min max problem with more than 2 variables using Mathematica?

Yes, Mathematica can solve min max problems with any number of variables. You just need to specify the variables in the appropriate places in the Minimize or Maximize function.

3. How do I visualize the solution to a min max problem in 2 variables using Mathematica?

You can use the Plot3D function in Mathematica to visualize the solution to a min max problem in 2 variables. This will create a 3D plot of the function and the constraints, showing the minimum or maximum point.

4. What if my min max problem has nonlinear constraints?

Mathematica has the ability to handle nonlinear constraints in min max problems. You can use the NMinimize and NMaximize functions to solve these types of problems.

5. Can I use Mathematica to solve min max problems with integer or discrete variables?

Yes, Mathematica has functions specifically designed to handle integer and discrete variables in min max problems. You can use the functions IntegerMinimize and IntegerMaximize for integer variables, and DiscreteMinimize and DiscreteMaximize for discrete variables.

Similar threads

  • Calculus and Beyond Homework Help
Replies
30
Views
2K
  • Calculus and Beyond Homework Help
2
Replies
36
Views
4K
  • Calculus and Beyond Homework Help
Replies
1
Views
946
  • Calculus and Beyond Homework Help
Replies
1
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
1K
Replies
2
Views
1K
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
11
Views
2K
  • Calculus and Beyond Homework Help
Replies
9
Views
2K
  • Calculus and Beyond Homework Help
Replies
10
Views
2K
Back
Top