We want to find the max and min values
of f of x comma y, subject to the constraint
x cubed plus y cubed equals 16.
We'll solve this using Lagrange multipliers,
which is based upon the fact
that the max and min values of f,
subject to the constraint g of x comma y equals zero
will occur where the gradient of f
is equal to some multiple of the gradient of g.
So, we can say that the gradient of f
is equal to some constant lambda,
times the gradient of g.
From here, we get the following system of equations.
We're looking at the components of these gradients
we would have partial of f with respect to x
equals lambda times the partial of g with respect to x.
The second equation would be
the partial of f with respect to y
equals lambda times the partial of g with respect to y.
This last equation, again, is our constraint,
g of x comma y equals zero.
So notice how our constraint is given as
x cubed plus y cubed equals 16,
which means our function, g of x comma y,
will be equal to x cubed plus y cubed
minus 16
which must equal zero.
Now, let's go ahead and set up our system of equations.
So we'll start with the partial of f with respect to x.
So we're going to differentiate e raised to the power of xy,
with respect to x, treating y as a constant.
So, we'd have e raised to the power of xy
times the derivative of xy with respect to x,
which would be y, equals
then we have lambda times partial of g with respect to x,
we showed us how would be just three x squared.
Again, treating y as a constant.
For our second equation,
we have the partial of f with respect to y.
So now we differentiate e to the xy with respect to y,
treating x as a constant.
So we'd have e to the xy
times the derivative of xy with respect to y,
which would be x,
equals lambda times the partial of g with respect to y,
which would be three y squared.
Again, our third equation in our system
is g of xy equals zero, which would be
x cubed plus y cubed
minus 16 equals zero.
So now we want to solve this system of equations.
So let's solve these first two equations for lambda.
So, notice here to solve for lambda
we would divide both sides by three x squared.
So we'd have lambda equals,
let's write the left side as y e to the xy,
and then we have divided by three x squared,
and then for the second equation
we would have lambda equals,
let's write the left side as
x e to the xy, and then divided by three y squared.
So because both of these equations are solved for lambda,
we can perform substitution
to obtain an equation that just contains x and y.
Then we'll use this equation to solve for either x or y
and then perform substitution into the third equation,
our constraint.
So performing substitution,
we'd have x e to the xy,
divided by three y squared,
equals y e to the xy,
divided by three x squared.
And now to clear the fractions,
we can multiply both sides by the least common denominator
or we can cross multiply
because we have a proportion,
meaning this product must equal this product.
Let's do this on the next slide.
So, again, cross multiplying here,
we'd have three x cubed, e to the xy equals
here we'd have three y cubed, e to the xy.
Notice how both sides contain a factor of three
as well as a factor of e to the xy.
So, let's go ahead and divide both sides
by three e to the xy.
Simplifying, notice three divided by three
simplifies to one
and so does e to the xy divided by e to the xy.
So this leaves us with the equation x cubed equals y cubed,
which we can use in the constraint.
Let's also solve this for x,
by taking the cube root of both sides of the equation.
The cube root of x cubed is x.
The cube root of y cubed is y.
So now we know that x cubed equals y cubed
and x equals y.
Now remember our constraint
was x squared plus y squared minus 16 equals zero.
Now perform substitution for either x cubed or y cubed,
which will give us an equation in one variable.
So, again using our constraint,
x cubed plus y cubed
minus 16 equals zero.
Let go and replace x cubed with y cubed.
So this gives us the equation
y cubed plus y cubed.
Let's go and add 16 to both sides
and we have two y cubed equals 16.
Divide both sides by two,
gives us y cubed equals eight.
Again we'll take the cube root
of both sides of the equation
and the cube root of eight is two,
since two cubed equals eight.
So, we have y equals two.
So we have y equals two, but also known as x equals y,
and therefore x also equals two,
which means the max or min value will occur at this point.
Now remember we're looking for both the max and the min
and we only found one location,
which means either the max or min
will not exist under the given constraint.
For our next step, let's go ahead
and evaluate the function, f of x comma y,
at two comma two.
So we'd have f of two comma two,
which would give us e raised to the power of two times two,
or e to the fourth.
Let's also get a decimal approximation for e to the fourth.
Notice e to the fourth is approximately 54.5982.
Now to determine whether this is going to be
a max or a min function value given the constraint,
let's select another point
that would satisfy our constraint here on the right
and see if that value is more than or less than 54.5982.
For example, notice how if we let x equal zero,
then y would have to be equal to the cube root of 16.
So let's go ahead and determine the function value
of f of zero comma with a cube root of 16,
which would be e raised to the power of zero
times the cube root of 16,
which would be e to the zero, which equals one.
So because this function value is less than e to the fourth,
we'll go ahead and assume e to the fourth
is the maximum of f, under the constraint g equals zero
and therefore this also tells us
the minimum does not exist under the given constraint.
So going back to our question,
the maximum value is e to the fourth,
which is approximately 54.5982
and we'll say the minimum value does not exist
under the given constraint.
Now before we go, let's take a look at this graphically.
So what we'll do is take a look at the level curves
of f of x comma y
and also the level curve of g of x comma y equals zero
and see if the gradient of f and g
are multiples of one another, or parallel,
at the point two comma two.
Here we see the graph of level curves
of f of x comma y, as well as,
the level curve of g of x comma y equals zero.
There's a couple things to notice here.
First notice how the level curves are tangent
to each other at this point here,
which is the point two comma two,
and therefore both the gradient of g
and the gradient of f are orthogonal to
both level curves at this point,
which means the two vectors are also parallel
and therefore multiples of one another,
as indicated by the method of Lagrange multipliers.
Now I should mention that these two vectors here
are actually scalar multiples of the gradients,
just so they fit nicely on the graph.
I hope you found this helpful.