Your restaurant is building
a rectangular garden.
The materials cost $9 per foot
for the West and East facing walls
and $3 per foot for the North
and South facing walls.
You are given a budget of $1,584
to complete the project.
Part A, what are the dimensions
of the walls
that will maximize the area
and B what is the largest area
that you can enclose?
We will solve this problem
using the method
of lagrange multipliers.
Let's first set up the given information
using this rectangle
on the right as the garden.
Let's let the Western East facing walls
so the length of X feet
and let's let the length
of the North and South facing walls
be equal to the Y feet.
The cost of the West and East
facing walls is $9 per foot
and the cost of the
North and South facing walls
is $3 per foot.
Our goal here is to maximize the area.
Now see the area of the rectangle
is going to be X times Y
plus let the area A
be equal to the function
F of X, comma Y
which is equal to XY
and now set up our cost equation
so we can set up the constraint
in the form of G of X
comma Y equals zero.
The cost C is equal to $9
times the length of the
West and East facing walls.
The length of the West
and East facing walls
would be X plus X or two X
and therefore the cost of the
West and East facing walls
would be $9 times two X
and then we have plus
the cost of the North
and South facing walls
is $3 per foot.
The length of the
North and South facing walls
would be Y plus Y or two Y
giving us three times two Y
and we have a total of $1,584 to spend
which should be the total cost.
This gives us C is equal to 18X
plus six Y equals 1,584.
For the method of
lagrange multipliers though
we want the constraint in the form
of G of X comma Y equals zero.
So we take this equation and say,
one side equal to zero
let's subtract 1,584 from both sides,
which gives us
G of X comma Y equals 18X
plus six Y minus 1,584
and now to use the method of
lagrange multipliers we need to set up
and solve this system of equations
given here by the partial derivatives
as well as the constraint
G of X comma Y equals zero.
So our first equation is going to be
the partial of A with respect to X
equals Lambda times of partial G
with respect to X.
The partial of F with respect to X
is equal to the derivative of XY
with respect to X
treating Y as a constant,
which gives us one times Y
or Y equals Lambda times a partial of G
with respect to X
to find this partial derivative
we differentiate 18X
plus six Y minus 1,584
with respect to X
treating Y as a constant
which gives us 18 plus zero minus zero
or just 18.
The second equation is a partial of F
with respect to Y
equals Lambda times a partial of G
with respect to Y.
The partial of F with respect to Y
is equal to X times one or X,
X equals Lambda times
for the partial of G with respect to Y
we have zero plus six minus zero or six
and our third equation
is G of X comma Y equals zero
which is 18X
plus six Y minus 1,584 equals zero.
Notice our first equation
is Y equals 18 Lambda
and the second equation
is X equals six Lambda
and now we'll determine
the value of Lambda
by performing substitution
for X and Y and the third equation.
So performing this substitution
we would have 18 times X,
which is six Lambda
plus six times Y which is 18 Lambda.
Let's go ahead
and add 1,580 fordable sides
giving us equals 1,584.
18 times six Lambda is 108
and so is six times 18 Lambda
108 Lambda plus 108 Lambda
is 216 Lambda.
To solve for Lambda
we divide both sides by 216.
Simplifying we have Lambda
is equal to 1,584 divided by 216.
We want the exact value.
So go ahead and click on this
convert to fraction button
on the right
and use the value of 22 thirds.
Now that we know Lambda is 22 thirds
we can go back up
and determine the value of X and Y.
X is equal to six times Lambda
which you now know is
six times 22 thirds
simplifying before multiplying
three simplifies to one,
six simplifies to two,
two times 22 is equal to 44
and then for Y
we have Y equals 18 times Lambda
which gives us 18 times 22 thirds,
again simplifying before multiplying
and there's one, three and three
and six threes and 18,
six times 22 is equal to 132.
So now we know the dimensions
that will maximize the area,
the East and West facing walls
have a length of X which is 44 feet
and the North and South facing walls
have a length of Y feet,
which is 132 feet.
For part B to find the largest area
we need to evaluate
the function F of X comma Y
where the area formula
given the X and Y values
that we just found.
So the max area is equal
to X times Y which is 44 feet
times 132 feet
which is equal to 5,808 square feet.
I hope you found this helpful.