# Does it matter in which order I assign the values?

• arhzz
arhzz
Homework Statement
Find the extreme values
Relevant Equations
-
Hello!
I am suspossed to find the extreme values of this function

$$f(x,y) = x^3 +3x^2y+3y^2-6y$$

First thing I did is I found all the partial derivations and set them to 0.Since that has to be true for the extreme value to even exist.

The derivations look like this

$$f_x = 3x^2+6xy$$
$$f_y = 3x^2+6y-6$$

Now I solved this systems of equation by finding an expression for y out of the second equation ## y = \frac{-x^2}{2} +1 ## and I plug that in the first equation I get this after some basic algebra

$$3x(x-x^2+2) = 0$$ Now this is going to be 0 when x is equals to 0 or when this in the bracket equals zero.So one zero is already found and its 0,so x1 = 0 and the other 2 should be x2 = 2 and x3 = -1. Now I've pluged each x back into the expression for y to get all the y values.Should be

y1 =1, y2 = -1, y3 = 1/2 and now plugged both x and y in the given function to get the z component.I get this

z1 = -3, z2 = 5 and z3 = 7/4 Now here is the kicker.A buddy of mine calculated this example as well and we get the same values for x,but he assigned after the quadratic equation x2 to be = -1 and x3 to be 2 and his z component is totally diffrent than mine.Now I am not sure if he or I made somwhere an error in the calculation,or when we get to the end (My next step would be to do the Hesse Matrix) we would get the same.But this raises a question,because we checked our calculations and it seems right but the results are just diffrent.Does it matter how we assing the values of x,and y for that matter?

Thanks!

Last edited:
Delta2

## Answers and Replies

Staff Emeritus
Gold Member
$$f_y = 3x^2+6y-6$$

I think that should be +6, not -6?
Now I solved this systems of equation by finding an expression for y out of the second equation ## y = \frac{-x^2}{x} +1 ## and I plug that in the first equation I get this after some basic algebra
I think I get something different, but perhaps I'm making a mistake in my algebra.

arhzz
I think that should be +6, not -6?

I think I get something different, but perhaps I'm making a mistake in my algebra.
Whoops I made an little error the function is given with -6y not +6y.Maybe that is why you are getting that error I doubt my algebra is better than yours

EDIT: I see the error as well now,I put in x instead of 2 in latex but I calculated it with 2.Guess I rushed the latex a bit but I had that annoying bug where I couldn't preview my post.If you calculate with ##\frac{-x^2}{2} +1 ## you should get the values for x and y like I posted,which only leaves the question of the order still unanswered

Staff Emeritus
Gold Member
Cool. I get -7/4 for your ##z_3## but otherwise agree with your calculation. If you flip what you assign ##x_2## and ##x_3##, then ##y_2## and ##y_3## should be flipped as well, and so should ##z_2## and ##z_3##. But no serious change to the problem should result from this.

arhzz
Cool. I get -7/4 for your ##z_3## but otherwise agree with your calculation. If you flip what you assign ##x_2## and ##x_3##, then ##y_2## and ##y_3## should be flipped as well, and so should ##z_2## and ##z_3##. But no serious change to the problem should result from this.
Yea -7/4 is also right.Another LaTeX error...I've calculated the whole thing now and I have a question; So I got the "candidates" for the extreme values to be as follows.

P1(0,1,-3)
P2(2,-1,5)
P3(-1,1/2,-7/4)

Now to check if it is a minimum or maximum I used the Hesse-Matrix. First I needed the second partial derivation with respect to x and y

so
$$f_{xx} = 6x+6y$$
$$f_{xy} = 6x$$
$$f_{yx} = 6x$$
$$f_{yy} = 6$$
Now assuming I did that correct we fill the Hesse Matrix in a way where the diagonal is the fxx and fyy elements. should look something like this

$\begin{pmatrix} 6x+6y & 6x\\ 6x & 6 \end{pmatrix}$,

Now I need to input the x and y values of all of the points,and calculate the minor determinant (now I am not sure if you say it so in english but I'll try to explain what I did) Basically you take the determinant of a smaller matrix,a sub matrix if you like. In this case where its a 2x2 matrix the first minor determinant is 6x+x6 and the other one is just the normal determinant.Now after plugging in 0 for x 1 for y and calculating it I get that both the minorants are positiv.According to my notes that should mean that P1 is a minimum. I did the same trick with 2 -1 the first minorant is positive the second one negative so its a maximum.And for the last and this is the part that confses me.So for -1 and 1/2 I get both minorants negative,and I don't know what this represents.Also how can I know if the maximums or minimus are local or global?

Thanks!

Staff Emeritus
Gold Member
So the real point here is that locally, the function looks like ##f(p)+p^tHp## for a critical point ##p##. ##p^tHp## is a quadratic function that looks like a concave up parabaloid if ##H## is positive definite, and hence has a minimum, and a concave down parabaloid if it's negative definite. The test on the signs of the minors is a clever test for whether the matrix might be negative definite or positive definite. If both minors are negative then it's neither, which means there are some directions where the function is locally concave up, and others where it's concave down (i.e. it's a saddle point)

Homework Helper
Gold Member
I checked this at Wolfram and it says that there are no local or global maximums and that there is only one local minimum (which is also global minimum) at the point (0,1) equal to -3.

Staff Emeritus
Gold Member
I checked this at Wolfram and it says that there are no local or global maximums and that there is only one local minimum (which is also global minimum) at the point (0,1) equal to -3.

That's not a global minimum. ## f(x,0)= x^3## has no minimum value

Homework Helper
Gold Member
That's not a global minimum. ## f(x,0)= x^3## has no minimum value
Sorry my mistake, wolfram says no global minimum found either only local minimum.

arhzz
Okay,so first of all nice answers.I'd like to adress one point tho.The maximum.I think the maximum should be when the matrix is negative definitive. This pattern -+-+. So basically alternating - and +. For the first point (0,1) I get that it is a minimum,for the last point(-1,1/2) a saddle point.But for the point (2,-1) I am kind of not seeing how this is not a maximum,at least the raw calculation should be right.Here step by step

$\begin{pmatrix} 6x+6y & 6x\\ 6x & 6 \end{pmatrix}$,

If we input 2 for x and -1 for y we should get this matrix

$\begin{pmatrix} 6 & 12\\ 12 & 6 \end{pmatrix}$,

Now the first minor determinant is 6.The second one is 6 * 6 - 12 * 12 so that should be -108.Now we have alternating betweemn + and -,should be a maximum right?

Also this may be a stupid question,but how do we know that the minimum is -3? Do we simply take the last compoment of the point and define that as a minimum? If not how do I calculate it

Staff Emeritus