<s>[INST] Prove that $ f(f(x)) \geq 0$ for all real x Let $f(x)= a x^2 +  x +1 , x \in \mathbb{R} $. Find all values of parameter $a \in \mathbb{R} $ such that $f(f(x)) \geq 0 $ holds for all real $x$.
$f(x)> 0 $ iff $a> 0 $ and $ 1- 4a \leq 0$  which gives $a \geq  \frac{1}{4} $ . But we have:
$f(f(x))= a ( a x^2 +  x +1)^2 +  a x^2 +  x +1 +1 $ , now  the degree is 4 and I am not sure what to do...Can anyone help? Thanks in advance.
 [/INST] Firstly, $1-4a\leq0$ is valid and since $a=0$ is not valid, it's enough to check  $0<a<\frac{1}{4}$, which gives
$$ax^2+x+1=\frac{-1+\sqrt{1-4a}}{2a}$$ and
$$ax^2+x+1=\frac{-1-\sqrt{1-4a}}{2a}$$ have no real roots.
It's enough to work with the first equation, which gives:
$$1-4a\left(1-\frac{-1+\sqrt{1-4a}}{2a}\right)\leq0$$ or
$$2\sqrt{1-4a}\leq4a+1,$$ which gives $$a\geq\frac{2\sqrt3-3}{4}.$$
It's interesting that in the case $a=\frac{2\sqrt3-3}{4}$ we obtain:
$$f(f(x))=\frac{1}{64}(\sqrt3x+2\sqrt3+4)^2((26\sqrt3-45)x^2+4(7-4\sqrt3)x+44-24\sqrt3)\geq0.$$
</s>