# Finding max and min of a function of several variables

1. Oct 18, 2009

### tnutty

1. The problem statement, all variables and given/known data

Find max/min/saddle point of the function :

F(x,y) = (1+xy)(x+y)

= x^2*y + y^2*x + x + y

F_x = 2xy + y^2 + 1
F_xx = 2y

F_y = x^2 + 2yx + 1
F_yy = 2x

Need help on finding the critical points :

So I have to solve this equations :

F_y = x^2 + 2yx + 1
F_x = y^2 + 2yx + 1

2. Oct 18, 2009

### Dick

Subtract the two equations and get x^2-y^2=0. That's (x+y)(x-y)=0. Suggests you split the solution into two cases. Can you go from there?

3. Oct 18, 2009

### tnutty

I think its supposed to be (y+x)(y-x). What should I do next?

That function will be 0 when x = y or when x = -y

Now do I plug it in into F_x or F_y ?

4. Oct 18, 2009

### Dick

(x+y)(x-y)=0 and (y+x)(y-x)=0 are both the same condition. Assume x=y and try to solve F_x=0 and F_y=0, any solutions? Now assume x=(-y) and do the same exercise.

5. Oct 18, 2009

### tnutty

So we have :

F_y = x^2 + 2yx + 1
F_x = y^2 + 2yx + 1

and our test case is x = y , -y

case : x = y

F_x = y^2 + 2yx + 1
= y^2 + 2y^2 + 1 = 0

3y^2 = - 1

x = y has no real answer

case x = -y

F_x = y^2 + 2yx + 1

= y^2 - 2y^2 + 1

-y^2 = -1

y = 1, -1

so when x = -y , y has to equal -1 or 1 for the function F(x,y) to have a horizontal plane.

Using the 2nd derivative test

D = F_xx*F_yy -[F_xy]^2

= (2y)(2x) - (2x + 2y)^2

= 4xy - 4x^2 + 8xy + 4y^2

= xy - x^2 + 2xy + y^2

= y^2 - x^2 + 3xy

so inputting values are (-y, - 1) and (-y , 1)

Case P(-y,-1)

D = y^2 - x^2 + 3xy

= (-1)^2 - (-y)^2 + 3(-y)(-1)
= 1 - y^2 + 3y

0 = y^2 - 3y - 1

Then what, use calculator to find its root?

6. Oct 18, 2009

### Dick

Aren't your critical points (1,-1) and (-1,1)? Why are you treating y like some unknown value? I thought you solved for it.

7. Oct 18, 2009

### tnutty

Oh so in this snippet :

case x = -y

F_x = y^2 + 2yx + 1

= y^2 - 2y^2 + 1

-y^2 = -1

y = 1, -1

I just input y back into the equation x = -y ?

8. Oct 18, 2009

### Dick

Sure you do. x=(-y). You assumed that. And with good reason.

9. Oct 18, 2009

### tnutty

Ok thanks then.

I can solve it from here .

So to recap (because it helps me learn better ) I had to do the following.

For the function F(x,y) = ... , find F_x, F_xx, F_xy, F_y , F_yy

Then I had to solve the system of equation of F_x, and F_y, in which I
found the equation x^2 - y^2, which has two cases where it will have a critical point, at x = y and at x = -y.

Inputting this values into F_x or F_y gives me a non real answer for x = y and for x = -y,
it gives me y = -1, 1. So I input those values into the equation x = -y, (question : technically could I have also inputed x = y , -y into the equation F_x or F_y or x^2 - y^2 ? ). From that I have two point , (1,-1) and (-1,1).

With these points I can use the second derivative test to check whether its a saddle point minimum point or a maximum point.

That should be correct , right ?

10. Oct 18, 2009

### Dick

Sure that's correct. I'm a little unsure what you are unsure about. To be a critical point you need F_x=F_y=0. If F_x-F_y=(x+y)(x-y)=0, then you can certainly conclude that for any critical point either x=y or x=(-y), right?

11. Oct 18, 2009

### tnutty

Yep, thanks for your help. I really appreciate it. I have an exam tomorrow at 9am.