Question 1117967
.
<pre>
Let x = width and diameter;

    y = height of the rectangle part.


Then the perimeter   

P = {{{x + 2y + (pi*x)/2)}}}  ====>  {{{x + (pi*x)/2}}} + {{{2y}}} = 40  ====>  y = {{{20 - x/2 - (pi*x)/4}}}.


The area A = {{{xy}}} + {{{(1/2)*pi*(x/2)^2}}} = {{{x*(20-x/2 - (pi*x)/4)}}} + {{{(pi/2)*(x/2)^2}}} = {{{20x}}} - {{{x^2/2}}} - {{{(pi/4)*x^2}}} + {{{(pi/8)*x^2}}} = {{{-x^2/2}}} + {{{20x}}} - {{{(pi/8)*x^2}}}



Then  the condition for the maximum area  {{{(dA)/(dx)}}} = 0  takes the form


{{{-x + 20 - (pi/4)*x}}} = 0,   or   {{{x*(1+pi/4)}}} = 20  ====> x = {{{20/(1+pi/4)}}} = {{{20/(1 + (3.14/4))}}} = 11.20 ft.


<U>Answer</U>.  The maximum area is at x = 11.20 ft.
</pre>

Solved.


==============


<U>Be aware</U>: &nbsp;&nbsp;The method on how &nbsp;@josgaritmetic &nbsp;is doing it &nbsp;&nbsp;<U>I S &nbsp;&nbsp;I N C O R R E C T</U>.