The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

Maximization of f(x,y) over a Constraint

Date: 03/04/99 at 15:38:44
From: Skylar Cox
Subject: Maximization of f(x,y) over a constraint

I have to find the maximum value of f(x,y) = xy^2 on the ellipse 
x^2/a^2 + y^2/b^2 = 1. I know that the gradient of the function f is 
equal to lambda times the gradient of g (ellipse). I get a couple of 
equations and I am having trouble finding any points that will satisfy 

Please help.  

Date: 03/04/99 at 19:17:53
From: Doctor Anthony
Subject: Re: Maximization of f(x,y) over a constraint

The general problem is to find stationary points of f(x,y) subject to 
constraint g(x,y) = 0 [note that the constraint must be written in 
this form]. So for our problem g(x.y) = x^2/a^2 + y^2/b^2 - 1

At stationary points of f(x,y) we have:

  df = part(df/dx)*dx + part(df/dy)*dy = 0

This implies that the vector [part(df/dx), part(df/dy)] is 
perpendicular to the vector [dx, dy]

Since g(x,y) = 0 we can write

  dg = part(dg/dx)*dx + part(dg/dy)*dy = 0

Thus the vector [part(dg/dx), part(dg/dy)] is also perpendicular to 
the vector [dx, dy]. This implies that the vector [part(df/dx), 
part(df/dy)] is parallel to the vector [part(dg/dx), part(dg/dy)] and 
that we can find a number 'k' such that

  [part(df/dx), part(df/dy)] - k[part(dg/dx), part(dg/dy)]
                                      = [0, 0]

This can be summarized by writing

      phi(x,y) = f(x,y) - kg(x,y)

Then f(x,y) will have a stationary point subject to constraint 
g(x,y) = 0 when part(d(phi)/dx) = 0, part(d(phi)/dy) = 0 and g(x,y) = 0

This gives three equations to find x, y and k. k is the Lagrange 
multiplier and phi is the auxiliary function. Applying these ideas to 
our problem, we have:

  f(x,y)= xy^2   and g(x,y) = x^2/a^2 + y^2/b^2 - 1

The auxiliary function is

  phi(x,y) = f(x,y) - kg(x,y)
           = xy^2 - k(x^2/a^2 + y^2/b^2 - 1)

  part(d(phi)/dx) = y^2 - 2kx/a^2 = 0        (1)

  part(d(phi)/dy) = 2xy - 2ky/b^2 = 0        (2)

        g(x,y) = x^2/a^2 + y^2/b^2 - 1 = 0   (3)

Solving (1), (2) and (3) for k, x and y we get

From (2)  x = k/b^2  and then from (1)  y = +-k.sqrt(2)/(ab)

Putting these values into (3)

     k^2/(a^2.b^4) + 2k^2/(a^2.b^4)  =  1 

                         3k^2 = a^2.b^4

                          k = +- a.b^2/sqrt(3)

   So, x = +-ab^2/(b^2.sqrt(3))  =  +-a/sqrt(3)

       y = +-a.b^2.sqrt(2)/(ab.sqrt(3)  =  +- b.sqrt(2/3) 

and then max value of f(xy) = xy^2  = [a/sqrt(3)][b^2.(2/3)]

                            = 2ab^2/[3sqrt(3)]

- Doctor Anthony, The Math Forum   
Associated Topics:
College Calculus

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.