# The min of $x + k/x$

$$f(x) = x + \dfrac{k}{x}$$ ($$k > 0$$ and $$x > 0$$)

given that the k is a constant, how do I solve the x that makes f(x) minimum?

• Is $x > 0$ here? And is $k > 0$? Jun 16, 2019 at 12:06
• My guess is that it is minimized when $x=\sqrt{k}$. Jun 16, 2019 at 12:07

If you don't like differentiating, by AM-GM

$$\sqrt{k}=\sqrt{x\cdot\dfrac{k}{x}}\leq\dfrac{x+\dfrac{k}{x}}{2}$$

When will you have equality?

• This is a nice answer! Using AM-GM is a clever idea. Jun 16, 2019 at 12:11

To avoid differentiating, notice that $$x+\frac{k}{x}=\bigg(\sqrt{x}-\sqrt{\frac{k}{x}}\bigg)^2+2\sqrt{k}$$ and that $$\sqrt{x}=\sqrt{k/x}$$ when $$x=\sqrt{k}$$.

(Note that we can use $$\sqrt{x}$$, since it is given that $$x\gt 0$$)

• why avoid differentiating? Jun 16, 2019 at 12:18
• @AdamRubinson Why use “advanced” methods when the problem can be solved by simply completing the square? There’s something beautiful about a simple solution... Jun 16, 2019 at 12:20
• I understand the answer now. It's a neat solution. Jun 16, 2019 at 12:36

$$x+\frac{k}{x}=\frac{1}{x}\Big[(x-\sqrt k)^2+2\sqrt k x\Big]$$ $$=2\sqrt k+\frac{(x-\sqrt k)^2}{x}\geq2\sqrt k$$ Takes its minimum at $$x=\sqrt k$$

I have assumed $$x>0$$. Do the $$x<0$$ for yourself. Hint: This time the function has a maximum!

If $$x>0$$ we have that $$x+\frac1x\geq 2\\$$ This follows from $$(x-1)^2\geq 0\\x^2-2x+1\geq 0\\x^2+1\geq 2x\\\frac{x^2+1}{x}\geq 2\\x+\frac1x\geq 2$$

Now if we put $$x=t\sqrt{k}$$ then we have $$t\sqrt{k}+\frac{\sqrt{k}}{t}=\sqrt{k}(t+\frac1t)\geq 2\sqrt{k}$$ The minimum is indeed achieved for $$t=1$$ or $$x=\sqrt{k}$$.