Problem 24 Let $a, b, c$ be nonnegative real numbers. Find the best constant $k$ such that the inequality always holds
$$\frac{a}{b}+\frac{b}{c}+\frac{c}{a}+k \frac{a b+b c+c a}{a^{2}+b^{2}+c^{2}} \geq 3+k$$
Solution: We have
$$2 \sum_{c y c} \frac{a}{b}=\left(\sum_{c y c} \frac{a}{b}+\sum_{c y c} \frac{b}{a}\right)+\left(\sum_{c y c} \frac{a}{b}-\sum_{c y c} \frac{b}{a}\right)=\frac{\sum_{s y m} a^{2}(b+c)}{a b c}+\frac{(a-b)(b-c)(c-a)}{a b c}$$

Thus, the inequality equivalent to
$$\sum_{c y c} \frac{a}{b}+2 k \frac{a b+b c+c a}{a^{2}+b^{2}+c^{2}} \geq 6+2 k \Leftrightarrow \frac{\sum_{s y m} a^{2}(b+c)}{a b c}+2 k \frac{a b+b c+c a}{a^{2}+b^{2}+c^{2}} \geq 6+2 k+\frac{(a-b)(b-c)(a-c)}{a b c}$$

We only need prove inequality in case $(a-b)(b-c)(c-a) \geq 0$
$$\begin{array}{c}
\Leftrightarrow \frac{p q-3 r}{r}+\frac{2 k q}{p^{2}-2 q} \geq 6+2 k+\frac{\sqrt{p^{2} q^{2}+18 p q r-27 r^{2}-4 q^{3}-4 p^{3} r}}{r} \\
\left(p^{2} q^{2}+18 p q r-27 r^{2}-4 q^{3}-4 p^{3} q\right)\left(p^{2}-2 q\right)^{2} \leq\left[(p q-3 r)\left(p^{2}-2 q\right)+2 k q r-(6+2 k) r\left(p^{2}-2 q\right)\right]^{2}
\end{array}$$

Letting $f(r)=A r^{2}+B r+C \geq 0$ (Assume $a+b+c=p=3$ ).
$$\begin{array}{c}
A=324 k^{2}+36 k^{2} q^{2}+216 k q^{2}+2916 k-3888 q+432 q^{2}+8748-216 k^{2} q-1620 k q \\
B=8748-432 q^{3}+4320 q^{2}-126361-72 k q^{3}-972 k q+540 k q^{2}
\end{array}$$

And $C=16 q^{5}-144 q^{4}+324 q^{3}$
Case 1: $0 \leq q \leq \frac{3\left(k+11-\sqrt{k^{2}+10 k+49}\right)}{2(k+6)} \Rightarrow B \geq 0$. We have $C \geq 0, A \geq 0 \Rightarrow f(r) \geq 0$
Case 2: $\frac{3\left(k+11-\sqrt{k^{2}+10 k+49}\right)}{2(k+6)} \leq q \leq 3$. We have
$$\begin{array}{c}
\Delta=B^{2}-4 A C=-144(q-3)^{2}(2 q-9)^{2}\left(48 q^{3}+24 k q^{3}+4 k^{2} q^{3}-144 k q^{2}-468 q^{2}\right. \\
\left.-9 k^{2} q^{2}+162 k q+1296 q-719\right)
\end{array}$$

So we have $k_{\max }=3 \sqrt[3]{4}-2$