Mark M. answered 05/22/24
Retired math prof. Calc 1, 2 and AP Calculus tutoring experience.
Let x = width of the rectangle and y = height of the rectangle.
x + 2y + (1/2)πx = 40
So, 2y = 40 - x - (1/2)πx.
y = 20 - (1/2)x - (1/4)πx
Area of rectangle = A = xy = 20x - (1/2)x2 - (1/4)πx2
A' = 20 - x - (1/2)πx = 20 - [(2 + π) / 2]x = 0
x = 40 / (2 + π) and y = 20 - 20 / (2 + π) - 10π / (2 + π)