# Can anybody help me with this optimization problem?

## A rectangle has one vertex at the origin, one of the x-axis, one on the y-axis, and one on the graph of $y = \sqrt{4 - x}$ What is the largest the rectangle can have, and what are its dimensions? This is everything I've figured out so far. I'm guessing that $A = x y$ and $A = x \left(\sqrt{4 - x}\right)$ But I don't know how to continue Thank you!

Mar 4, 2017

Dimensions of largest rectangle are $\frac{8}{3}$ and $\frac{2}{\sqrt{3}}$ and its area is $3.08$

#### Explanation:

By largest one means largest area.

As area is given by $A = x \sqrt{4 - x}$

it will be maximized when $\frac{\mathrm{dA}}{\mathrm{dx}} = 0$ and $\frac{{d}^{2} A}{{\mathrm{dx}}^{2}} < 0$

As $A = x \sqrt{4 - x}$, using product rule

$\frac{\mathrm{dA}}{\mathrm{dx}} = 1 \times \sqrt{4 - x} + x \times \left(\frac{1}{2} \times \frac{1}{\sqrt{4 - x}} \times \left(- 1\right)\right)$

= $\sqrt{4 - x} - \frac{x}{2 \sqrt{4 - x}}$

and $\frac{{d}^{2} A}{{\mathrm{dx}}^{2}} = - \frac{x}{2 \sqrt{4 - x}} - \frac{2 \sqrt{4 - x} - 2 x \left(\frac{- 1}{2 \sqrt{4 - x}}\right)}{4 \left(4 - x\right)}$

or $- \frac{x}{2 \sqrt{4 - x}} - \frac{\sqrt{4 - x} + \frac{x}{2 \sqrt{4 - x}}}{2 \left(4 - x\right)}$

= $- \frac{x}{2 \sqrt{4 - x}} - \frac{2 \left(4 - x\right) + x}{4 \sqrt{4 - x} \left(4 - x\right)}$

= $- \frac{x}{2 \sqrt{4 - x}} - \frac{8 - x}{4 {\left(4 - x\right)}^{\frac{3}{2}}}$

and $\frac{\mathrm{dA}}{\mathrm{dx}} = 0$, when $\sqrt{4 - x} = \frac{x}{2 \sqrt{4 - x}}$

or $2 \left(4 - x\right) = x$ i.e. $8 - 2 x = x$ i.e. $x = \frac{8}{3}$ and one can check that at $x = \frac{8}{3}$, $\frac{{d}^{2} A}{{\mathrm{dx}}^{2}} < 0$

Dimensions of largest rectangle are $\frac{8}{3}$ and $\sqrt{\frac{4}{3}}$

and its area is $\frac{8}{3} \sqrt{4 - \frac{8}{3}} = \frac{3}{8} \sqrt{\frac{29}{8}} \cong 3.08$

Below is graph of $x \sqrt{4 - x}$
graph{xsqrt(4-x) [-3.063, 6.937, -1.12, 3.88]}