Finding maximum area of a pentagon Out of all the pentagons in the shape of a rectangle overlapped by an isosceles triangle, with perimeter P fixed, determine the dimensions of the one with maximum area.


The object is to maximize the area $A(x,y,z)$ of the pictured pentagon while keeping the perimeter $P(x,y,z)$ constant.
\begin{eqnarray}
A(x,y,z)&=&xy+\frac{1}{2}x\sqrt{z^2-\left(\frac{x}{2}\right)^2}\\
&=&xy+\frac{x}{4}\sqrt{4z^2-x^2}
\end{eqnarray}
\begin{equation}
P(x,y,z)=x+2y+2z
\end{equation}
This may be accomplished using the method of LaGrange multipliers, solving
\begin{equation}
\nabla A=\lambda\nabla P
\end{equation}
\begin{eqnarray}
\nabla A(x,y,z) &=&\begin{pmatrix}
{y+\dfrac{2z^2-x^2}{2\sqrt{4z^2-x^2}}}\\\\
x\\\\
\dfrac{xz}{\sqrt{4z^2-x^2}}
\end{pmatrix}\\
\nabla P(x,y,z)&=&\begin{pmatrix}
1\\2\\2
\end{pmatrix}
\end{eqnarray}
So we have


*

*$$ y+\dfrac{2z^2-x^2}{2\sqrt{4z^2-x^2}}=\lambda$$

*$$ x=2\lambda $$

*$$ \dfrac{xz}{\sqrt{4z^2-x^2}}=2\lambda $$

*$$ P=x+2y+2z $$
Since $P$ is the only fixed quantity it would be best to solve for $x,\,y$ and $z$ in terms of $P$. One way to do that is to first solve for $x,\,y$ and $z$ in terms of $\lambda$ then use the fourth equation to solve for $\lambda$ in terms of $P$.
This strategy results in


*

*$$x=2\lambda$$

*$$y=\left(\dfrac{3+\sqrt{3}}{3}\right)\lambda$$

*$$ z=\left(\dfrac{2\sqrt{3}}{3}\right)\lambda $$

*$$ \lambda=\left(\dfrac{2-\sqrt{3}}{2}\right)P $$
Solving for the values of  $x,\,y$ and $z$ in terms of $P$ gives


*

*$$x=\left(2-\sqrt{3}\right)P $$

*$$ y=\left(\dfrac{3-\sqrt{3}}{6}\right)P$$

*$$ z=\left(\dfrac{2\sqrt{3}-3}{3}\right)P$$
I have omitted algebraic details of the last six equations because of the length of time required to render them into MathJax. If OP finds an error in any of these, let me know and I will double-check my steps.
Addendum: I have checked my results twice and found no errors.
There is also a curious feature of the solution. 
The following are easily verified:


*

*$xy=\dfrac{9-5\sqrt{3}}{6}P^2$

*$x-y=\dfrac{9-5\sqrt{3}}{6}P$
Therefore
$$  \frac{xy}{x-y}=P $$
