# Find positive values such that $xy = 32$ and the sum $4x+y$ is as small as possible.

Find positive values such that $xy = 32$ and the sum $4x+y$ is as small as possible.

How can I solve this? I know that the answer is $2\sqrt{2} = x$ and $8\sqrt{2} = y$, but I can't seem to figure out a concrete method for solving this type of problem.

An explanation of how to solve the question would be greatly appreciated!

• Minimize $4x+\frac{32}{x}$ in one of the familiar ways, say using the derivative. – André Nicolas Jun 21 '16 at 23:37
• You could also find the point on the graph $xy=32$ for which the slope of the tangent is $-4$. – Hrhm Jun 21 '16 at 23:39

The first step is to use the constrain $xy=32$ to eliminate $y$ (or $x$) from the problem. Using $y = \frac{32}{x}$ we can write $4x+y$ as $4x + \frac{32}{x}$ and with this we have reduced the problem to finding the minimum of a function of a single variable.
The most common method to solve these types of problems is to resort to derivatives: if the function $f(x)$ has a minimum/maximum point $x_*$ then $f'(x_*) = 0$. With $f(x) = 4x + \frac{32}{x}$ we have $f'(x) = 4 - \frac{32}{x^2}$ so $f'(x) = 0$ when $x^2 = 8 \implies x = \pm 2\sqrt{2}$. Only $x = +2\sqrt{2}$ satisfy $x\geq 0$ which is the region we are interested in so $f$ has only a single extremal point for $x>0$. Having found the extremal point the final part is to make sure this is indeed a minimum point (apposed to a maximum). Since this is the only extremal point for $x > 0$ and $f(x)$ grows without bounds as $x\to\infty$ (and also as $x\to 0$) the point has to be a minimum point.
Hint. One may observe that we always have $$2ab\leq a^2+b^2$$ then putting $$a=2\sqrt{x},\quad b=\frac{4\sqrt{2}}{\sqrt{x}}$$ one gets $$16\sqrt{2}\leq 4x+\frac{32}{x}$$ and we have $16\sqrt{2}= 4\times \color{red}{2\sqrt{2}}+\dfrac{32}{\color{red}{2\sqrt{2}}}.$
We can write: $4x+y = \left(2\sqrt{x}-\sqrt{y}\right)^2+ 4\sqrt{xy}= \left(2\sqrt{x}-\sqrt{y}\right)^2+ 16\sqrt{2}\geq 16\sqrt{2}\implies \text{min} = 16\sqrt{2},$ it occurs when $\sqrt{y}=2\sqrt{x}\implies x = 2\sqrt{2}, y = 8\sqrt{2}$.
Using "Lagrange multipliers": Let $F(x,y)= 4x+ y$ and $G(x, y)= xy$. Then $\nabla F= 4\vec{i}+ \vec{j}$ and $\nabla G= y\vec{i}+ x\vec{j}$ The point is that at a point minimizing (or maximizing) G(x, y) while satisfying F(x,y)= constant will occur where those vectors are parallel- which, of course, means one is a multiple of the other- $\nabla F= \lambda \nabla G$ for some constant $\lambda$ (the "Lagrange multiplier"). So we need to solve $4= \lambda y$, $1= =\lambda x$ Since a value for $\lambda$ is not part of a solution, often the best way to solve such equations is first to eliminate $\lambda$ by dividing one equation by another. Dividing $4= \lambda y$ by $1= \lambda x$ we have $4= \frac{y}{x}$ so $y= 4x$. That must satisfy $G(x, y)= xy= 32$, $xy= 4x^2= 32$ so $x^2= 8$ and $x= \pm 2\sqrt{2}$, $y= 4x$ so we have $(x, y)= (2\sqrt{2}, 8\sqrt{2})$ and $(x, y)= (-2\sqrt{2}, -8\sqrt{2})$.