- IN THIS PROBLEM, 
WE WANT TO USE CALCULUS METHODS
TO MAXIMIZE THE AREA 
OF THREE IDENTICAL CORRALS
WITH 112 FEET OF FENCE
AND THE CORRALS 
ARE PICTURED HERE.
NO FENCE IS NEEDED 
NEXT TO THE BARN,
WHICH WOULD BE 
THIS ORANGE RECTANGLE.
WE WANT TO KNOW 
WHAT TOTAL DIMENSIONS
WILL MAXIMIZE THE CORRAL AREAS.
SO WE'LL USE THE 112 FEET 
OF FENCE TO MAKE A FENCE HERE,
HERE, HERE, HERE, 
AS WELL AS ALONG HERE.
SO LETS START BY ASSIGNING 
VARIABLES
FOR EACH OF THESE LENGTHS.
LET'S LET EACH HORIZONTAL LENGTH 
EQUAL X FEET.
THIS WOULD BE X, X, X, 
AND THEN X.
FOR THE VERTICAL LENGTH
LET'S GO AHEAD AND LABEL 
THIS ENTIRE LENGTH HERE Y.
WE COULD LABEL EACH SMALLER 
SEGMENT Y
BUT DOING IT THIS WAY
IS GOING TO MAKE THE WORK 
A LITTLE BIT MORE MANAGEABLE.
SO ALL OF THESE LENGTHS 
MUST HAVE A SUM OF 112 FEET
SO WE COULD SAY THAT Y + X + X 
+ X + X OR + 4X
MUST EQUAL 112 FEET.
THIS EQUATION IS OFTEN CALLED 
THE CONSTRAINT.
NOW WE WANT TO FIND 
THE PRIMARY EQUATION
OR THE EQUATION THAT WE WANT 
TO MAXIMIZE IN THIS CASE.
SINCE WE WANT TO MAXIMIZE 
THE AREA OF THESE CORRALS
THE TOTAL AREA WOULD JUST BE 
LENGTH x WIDTH
OR IN THIS CASE X x Y.
SO OUR PRIMARY EQUATION 
IS GOING TO BE AREA = X x Y
AND AGAIN THIS IS THE EQUATION 
THAT WE WANT TO MAXIMIZE.
BUT RIGHT NOW, "A" IS THE 
FINDING TERMS OF BOTH X AND Y.
SO TO MAXIMIZE THIS 
WE WANT TO WRITE "A"
IN TERMS OF ONE VARIABLE
AND WE CAN PERFORM A 
SUBSTITUTION FOR EITHER X OR Y
TO WRITE THIS 
IN TERMS OF ONE VARIABLE
IF WE PERFORM A SUBSTITUTION 
USING THE CONSTRAINT,
AND SINCE Y + 4X = 112 
WE COULD EASILY SOLVE THIS FOR Y
BY SUBTRACTING 4X 
ON BOTH SIDES OF THE EQUATION.
THAT WOULD GIVE US Y = 112 - 4X.
NOW WE CAN SUBSTITUTE 112 - 4X 
FOR Y IN OUR PRIMARY EQUATION
AND THEN WE'LL HAVE "A" 
IN TERMS OF X
AND THEN ONCE WE HAVE THAT
WE CAN MAXIMIZE THE EQUATION 
USING CALCULUS TECHNIQUES.
SO WE'D HAVE "A" 
= X x THE QUANTITY 112 - 4X.
LET'S GO AHEAD 
AND DISTRIBUTE HERE.
WE WOULD HAVE "A" EQUALS 
112X - 4X SQUARED,
AND NOW TO MAXIMIZE THE AREA 
WE'LL FIND THE FIRST DERIVATIVE,
DETERMINE WHERE IT'S EQUAL 
TO ZERO OR WHERE IT'S UNDEFINED.
BUT I THINK IT'S WORTH OUR TIME 
TO TAKE A LOOK AT THIS EQUATION
JUST FOR A MOMENT.
IF WE WERE TO GRAPH THIS
NOTICE HOW WE WOULD HAVE 
A PARABOLA THAT OPENS DOWN
BECAUSE THE COEFFICIENT 
OF X SQUARED IS NEGATIVE.
SO IF WE HAVE A PARABOLA 
THAT OPENS DOWN
NOTICE HOW THIS HIGH POINT HERE 
WOULD REPRESENT
WHERE THE AREA WOULD BE 
MAXIMIZED
AND NOTICE HOW THE DERIVATIVE 
AT THIS POINT
WOULD BE EQUAL TO ZERO
BECAUSE THIS TANGENT LINE 
HAS A SLOPE OF ZERO.
SO LET'S GO AHEAD 
AND FIND THE DERIVATIVE,
SET IT EQUAL TO ZERO 
AND THEN SOLVE FOR X.
SO "A" PRIME THE DERIVATIVE "A" 
WITH RESPECTS TO X WOULD BE 112
THIS WOULD BE - 8X.
THIS IS NEVER GOING TO BE 
UNDEFINED
SO I'LL SET IT EQUAL TO ZERO 
AND SOLVE FOR X.
WE'LL GO AHEAD AND ADD 8X 
TO BOTH SIDES.
WE HAVE 112 = 8X 
DIVIDE BOTH SIDES BY 8.
THIS SIMPLIFIES TO 1X OR X.
112 DIVIDED BY 8 IS EQUAL TO 14.
SO IF WE GO BACK OVER 
TO OUR SKETCH
WE KNOW THAT EACH OF THESE 
HORIZONTAL LENGTHS
IS EQUAL TO 14 FEET
AND LET'S GO AHEAD 
AND LABEL THEM.
NOTICE HOW WE STILL HAVE 
TO DETERMINE THE LENGTH OF Y
AND WE CAN PERFORM BACK 
SUBSTITUTION TO DO THAT
USING THIS EQUATION HERE THAT 
SAYS Y IS EQUAL TO 112 - 4X.
SO WE'D HAVE Y = 112 - 4 x 14.
THIS IS GOING TO BE Y = 
112 - 56 WHICH IS EQUAL TO 56.
SO Y IS EQUAL TO 56 FEET
AND NOW WE CAN 
ANSWER THE QUESTION.
THE QUESTION 
IS WHAT TOTAL DIMENSIONS
WILL MAXIMIZE THE CORRAL AREAS.
SO THE TOTAL DIMENSIONS 
WOULD BE X FEET BY Y FEET
OR 14 FEET BY 56 FEET.
NOW IT DOESN'T ASK
BUT LET'S GO AHEAD 
AND FIND THE DIMENSIONS
OF EACH CORRAL AS WELL.
WELL EACH CORRAL IS GOING TO BE 
14 FEET BY 1/3 THE LENGTH OF Y.
SO IT WOULD BE 14 FEET BY--
WELL 1/3 OF 56 WOULD BE 56/3 
WHICH IS EQUAL TO 18 2/3
SO 18 2/3 FEET.
IF WE WANTED TO GET REALLY 
DETAILED
WE COULD BREAK THIS DOWN INTO 
INCHES 2/3 OF A FOOT
WOULD BE 8 INCHES
SINCE 1/3 OF A FOOT 
IS EQUAL TO 4 INCHES.
SO WE COULD WRITE THIS AS 
14 FEET BY 18 FEET 8 INCHES
FOR THE DIMENSIONS 
OF EACH CORRAL.
OKAY. I HOPE YOU FOUND THIS 
EXAMPLE HELPFUL.
