posted by Tommy on .
The mayor of a village wants to build a library of which the windows have a shape of a rectangle on top of a square. The total perimeter of each window is of P meters and varies depending on each windows size. Find the dimensions of the windows in terms of P, that maximizes the area of all the windows.
Because I can't draw on here, the perimeter I have is
6x + 2y = P
(3x for each of the squares sides, because the rectangle covers the last one, 2y for each of the rectangles sides, and the last 3x are the rectangles length, x being half the length of the rectangle, so 2x on top of the rectangle and 1x at the bottom, because the other x is the junction between the square and the rectangle.)
For the area, I found:
p = 6x +2y
y = (P-6x)/2
A(x) = x^2 + 2x((P-6x)/2)
now, I know I have to derive A(x)
but what I'm not sure is if the derivative of P will be 0, or do I simply leave P as it is?
sorry for the drawing, apparently it didn't work when I submitted the question!
A(x) looks good.
A(x) = x(P-5x) = Px - 5x^2
You can take the derivative if you want, getting
A' = P - 10x
so, A' = 0 when x = P/10
Or, you can see that the roots of A(x) are 0 and P/5, making the max halfway between, or at x = P/10
y = (P-6x)/2 = (P-P/10)/2 = 9P/20
Rats. y = (P-6P/10)/2 = 4P/20 = P/5
But then, we knew that, since y=2x
I understand now, thanks a lot steve!