Hello, everyone!
I'm still working on this one . . . so I'll just babble . . .
I having trouble controlling the variable.
You see, the rectangle can be "tipped" at a variety of angles.
Code:
* * * P2
* o
P1*---------o-----*P3
*| o o|*
| o |
P8o | |o*
* | | *
*o| | oP4
| o |
*|o o |*
P7*-----o---------*P5
o *
P6 * * *
The area of the octagon would be:
. .  + \Delta P_1P_2P_3 + \Delta P_3P_4P_5 + \Delta P_5P_6P_7 + \Delta P_7P_8P_1)
Edit: You're right, RubyRed . . . I overlooked the word "maximum".
Yes, the top and bottom triangles are congruent,
. . as are the left and right triangles.
If my diagram is hard to read . . .
Points
are the vertices of the square,
. . which is clearly outlined.
Points
are the vertices of the rectangle,
. . outlined with o's (harder to see).