How should this be done?

Suppose you have 132 m of fencing with which to make two side-by-side rectangular enclosures against an existing wall. if the rectangular enclosures are adjacent and of the same depth what is the maximum are that can be enclosed?

2 answers

Let the combined length of the two rectangles by y
let the width be x (there will be 3 of those)

so 3x + y = 132
y = 132-3x

Area = xy
= x(132-x)
= -x^2 + 132x

by Calculus
d(Area)/dx = -2x + 132 = 0 for a max of Area
x = 66
then max Area = 66(132-66) = 4356 m^2

by completing the square:
Area = -[x^2 - 132x + 4356 - 4356 ]
= -(x-66)^2 + 4356

so the max Area is 4356 , when x = 66
thanks!