# Homework Help: Calculating Stationary Points of a Function

1. Mar 10, 2010

### Hart

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

Finding the stationary point(s) of the function:

$$f(x,y) = xy - \frac{y^{3}}{3}$$

.. on the line defined by $x+y = -1$.

For each point, state whether it is a minimum or maximum.

2. Relevant equations

.. within the problem statement and solutions.

3. The attempt at a solution

This is what I have so far:

$$f(x,y) = xy - \frac{y^{3}}{3}$$

$$g(x,y) = x+y-1 = 0$$

Therefore need to extemise:

$$F(x,y,\lambda) = f + \lambda g = xy - \frac{y^{3}}{3} + \lambda(x+y-1)$$

So calculating the partial derivatives:

$$\frac{\partial F}{\partial x} = y + \lambda = 0$$

$$\frac{\partial F}{\partial y} = x - 3\left(\frac{y^{2}}{3}\right) + \lambda = x - y^{2} + \lambda = 0$$

$$\frac{\partial F}{\partial \lambda} = x + y - 1 = 0$$

Then need to look for all consistent solutions:

$$1. y = \lambda$$

.. but now I'm stuck on what to do now, seemto have done something wrong because I can't get more consistent soluations and then nice simultaneous equations to equate

2. Mar 10, 2010

### tiny-tim

Hi Hart!

(have a lambda: and a curly d: ∂ )

(Actually, it's y = -λ, isn't it? )

ok, now substitute that in the other two equations, and you'll get a quadratic equation in λ.

3. Mar 10, 2010

### Hart

OK.. So from the first partial derivative equation I get that:

$$y = -\lambda$$

.. then put this into the second partial derivative equation, which gives:

$$x - \lambda^{2} + \lambda = 0$$

.. hence:

$$x = \lambda^{2} - \lambda$$

.. then put this into the third partial derivative equation, which gives:

$$\lambda^{2} - \lambda - \lambda - 1 = \lambda^{2} - 2\lambda - 1 = 0$$

.. then solve quadratic equation to get values of $\lambda$:

$$\lambda = \frac{2 \pm \sqrt{(4) + (4)}}{2} = 1 \pm \sqrt{2}$$

.. hence:

$$\lambda = 1 + \sqrt{2} , 1 - \sqrt{2}$$

.. yes??!

.. note: but:

$$\lambda = 1 \pm \sqrt{2} \neq - y$$

4. Mar 10, 2010

### tiny-tim

What's wrong with that?

y = -1 - √2, x = 2 + √2;

y = -1 + √2, x = 2 - √2.

5. Mar 10, 2010

### Hart

um.. nothing! I don't know why I thought there was an issue there earlier! .. maybe just going a bit mad!

Right, so since now have:

$$y = -1 - \sqrt{2}, x = 2 + \sqrt{2}$$

$$y = -1 + \sqrt{2}, x = 2 - \sqrt{2}$$

.. then there are just 2 stationary points of the function, which are those 2 above?

Also, to find if the points are maxima or minima, just need to put each set of $(x,y)$ values into this equation:

$$f(x,y) = xy - \frac{y^{3}}{3}$$

.. and if $f(x,y) > 0$ then maxima point, and if $f(x,y) < 0$ then minima point?

Last edited: Mar 10, 2010
6. Mar 10, 2010

### tiny-tim

(why do you keep going into LaTeX?!)

No, that only tells you the value of f(x,y) …

you'll need more than that to check whether the value is a local maximum or minimum or stationary point.

7. Mar 10, 2010

### Hart

.. calculate second derivatives? negative = max point, positive = min point?

8. Mar 11, 2010

### tiny-tim

Hi Hart!

(just got up :zzz: …)
Yes, except you'll need the second derivatives "dot" the line.

9. Mar 12, 2010

### Hart

erm.. so for the first set of values I have:

$$f(x,y) = xy - \left(\frac{y^{3}}{3}\right) = \left(\left(2+\sqrt{2}\right)\left(-1-\sqrt{2}\right)\right) - \left(\frac{\left(-1 - \sqrt{2}\right)}{3}\right) = \left(-4 - 3\sqrt{2}\right) - \left(-7 + 5\sqrt{2}\right) = 3 + 2\sqrt{2}$$

which is positive, so this is a minium stationary point.

.. correct?!

10. Mar 12, 2010

### tiny-tim

what happened to the second derivatives?

11. Mar 12, 2010

### Hart

OH.. I just forgot them!

ok, so:

$$f(x,y) = xy - \left(\frac{y^{3}}{3}\right)$$

$$\frac{\partial f(x,y)}{\partial xy} = 1 - y^{2}$$

$$\frac{\partial f(x,y)}{\partial xy} = 2y$$

.. correct? (I'm not too good on partial derivations )

So then:

$$2y = 2\left(-1 - \sqrt{2}\right) = -2 - 2\sqrt{2}$$

.. which is positive.

$$2y = 2\left(-1 + \sqrt{2}\right) = -2 + 2\sqrt{2}$$

.. which is negative.

Hopefully somewhat getting there!

12. Mar 12, 2010

### tiny-tim

hmm … this has become needlessly complicated.

It would have been easier at the beginning, instead of using the λ method (i know it has a name, but i've forgotten it ), to simply use the directional derivative.

Since g(x,y) in this case is a straight line, in the direction (1,-1), all you needed to do was to find the directional derivative, ∇gf, in that direction, ie ∂f/dx - ∂f/∂y, which was y + y2 - x, and put that = 0 (subject to x + y = 1).

Substituting x = 1 - y gives ∇gf = 2y + y2 - 1 = 0 …

this is the same final equation as before, but without using λ !

Now, to distinguish between maxima and minima, you need to know whether ∇gf is increasing or decreasing, so just consider d/dy (∇gf).

13. Mar 12, 2010

### Hart

.. I was doing in the $\lambda$ way (um.. lagrange multiplier?!) as this is how I was taught a similar problem and hence should really use this way.

Looking back through my notes on this, once the values of x and y have been found (as they have been) then just put these into the original equation for f and then can deduce if the stationary point is a min or a max.

Basically, for the first point:

$$x = 2 + \sqrt{2}, y = -1 - \sqrt{2}$$

.. input the values into:

$$f(x,y) = xy - \frac{y^{3}}{3}$$

and consider whether is positive or negative, and hence max or min point.

Then repeat for second point.

14. Mar 12, 2010

### tiny-tim

(oh yes, Lagrange multiplier! )

But the problem with that method is that f(x,y) isn't necessarily positive at a maximum or negative at a minimum.

You can change it slightly, and say that if there are only two turning-points, at A and B, then either f(A) > f(B) or f(B) > f(A) …

in either case, the first one must be a maximum, and the second a minimum!

(of course, that doesn't rule out points of inflexion, so perhaps for completeness the values towards infinity in both directions should also be considered)