Ta có: $2(a^2+b^2)+ab=(a+b)(ab+2)\Rightarrow t=\frac{a^2+b^2}{ab}=\frac{S}{2}+\frac{S}{P}-\frac{1}{2} (S^2\ge 4P)$$t\ge\frac{S}{2}+\frac{4}{S}-\frac{1}{2}\ge2\sqrt{2}-\frac{1}{2}$
$t^3=\frac{a^3}{b^3}+\frac{b^3}{a^3}+3(\frac{a}{b}+\frac{b}{a}); t^2=\frac{a^2}{b^2}+\frac{b^2}{a^2}+2$
Có $f(t)=4t^3-9t^2-12t+12$
$f'(t)=12t^2-18t-12\Rightarrow t=2<2\sqrt{2}-\frac{1}{2}$ (loại);
$f(t)\ge f(2\sqrt{2}-\frac{1}{2})=...$
Dấu bằng có khi $S^2=8;\frac{S^2-2P}{P}=2\sqrt{2}-\frac{1}{2}$