6. Find the greatest real number $k$ such that the inequality

$$
\frac{2\left(a^{2}+k a b+b^{2}\right)}{(k+2)(a+b)} \geqq \sqrt{a b}
$$

holds for all pairs of positive real numbers $a, b$.
SOLUTION. For $k=2$, the inequality can be simplified to $\frac{1}{2}(a+b) \geqq \sqrt{a b}$, which is the well-known inequality between the arithmetic and geometric means, valid for any positive numbers $a, b$. The largest $k$ we are looking for is therefore at least 2. Let's further examine the given inequality under the assumption $k \geqq 2$.

By equivalent manipulation (since $k+2>0$), we get

$$
2\left(a^{2}+k a b+b^{2}\right) \geqq(k+2)(a+b) \sqrt{a b}
$$

and by dividing both sides by the positive number $b^{2}$, we have

$$
2\left(\frac{a^{2}}{b^{2}}+k \frac{a}{b}+1\right) \geqq(k+2)\left(\frac{a}{b}+1\right) \sqrt{\frac{a}{b}} .
$$

Let $\sqrt{a / b}=x$. By a suitable choice of positive numbers $a, b$, $x$ can take any positive value. Therefore, it suffices to consider the inequality

$$
2\left(x^{4}+k x^{2}+1\right) \geqq(k+2)\left(x^{2}+1\right) x
$$

and find the largest $k$ such that the above inequality holds for every positive $x$. After simple equivalent manipulations aimed at isolating $k$, we get

$$
\begin{aligned}
k\left(\left(x^{2}+1\right) x-2 x^{2}\right) & \leqq 2\left(x^{4}+1-\left(x^{2}+1\right) x\right), \\
k\left(x^{3}-2 x^{2}+x\right) & \leqq 2\left(x^{4}-x^{3}-x+1\right), \\
k x\left(x^{2}-2 x+1\right) & \leqq 2\left(x^{3}(x-1)-(x-1)\right), \\
k x(x-1)^{2} & \leqq 2(x-1)^{2}\left(x^{2}+x+1\right) .
\end{aligned}
$$

For $x=1$, the last inequality is always satisfied. For $x \neq 1$, we divide the inequality by the positive expression $x(x-1)^{2}$ and obtain a direct estimate for $k$:

$$
k \leqq \frac{2\left(x^{2}+x+1\right)}{x}=2+2\left(x+\frac{1}{x}\right)
$$

For positive $x$, $x+1 / x \geqq 2$ with equality only for $x=1$. For $x \neq 1$, the expression $x+1 / x$ takes all values in the interval $(2, \infty)$, and the right-hand side (1) thus takes all values in the interval $(6, \infty)$. From this, it is clear that the largest $k$ such that (1) holds for all positive $x \neq 1$ is $k=6$.