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.
 A: 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.$$
A: As you mention, $a \geqslant \frac14$ works.  The only case that remains is when $0<a<\frac14$, i.e. when $f(x)$ has two distinct real roots.  In this case, it is enough to ensure that the midpoint of the roots, i.e. $x = -\frac1{2a} $, results in a non-negative value, so we check
$$f(-\tfrac1{2a}) = \frac1{4a}-\frac1{2a}+1 = 1-\frac1{4a}$$
$$\implies f(f(-\tfrac1{2a})) = f(1-\tfrac1{4a}) = \frac{16a^2+24a-3}{16a}$$
and from $16a^2+24a-3\geqslant 0$ we get $a\geqslant \dfrac{2\sqrt3-3}4$.
A: First we require $a \ge 0$ because the quartic $f(f(x))$ has the term $a^3x^4$. If a is negative, this term will dominate at high x-values and make the quartic negative.
We look at the range of
$f(x)=ax^2+x+1$ by completing the square
$f(x) = a(x+\frac{1}{2a})^2 + 1 - \frac{1}{4a}$
So $f(x) \ge 1-\frac{1}{4a}$
Now we want the range of $f(f(x))$
We are plugging $f(x)$ back into to $f(x)$.
So we can just look at $f(x)$ with the restriction that $x \ge 1-\frac{1}{4a}$
We want to see if $1-\frac{1}{4a}$ is less than $\frac{-1}{2a}$.
Suppose
$1-\frac{1}{4a}<\frac{-1}{2a}$
$4a-1 < -2$
$a<\frac{-1}{4}$
This is impossible since we already know that $a \ge 0$. So we know that
$1-\frac{1}{4a} \ge \frac{-1}{2a}$
So we're on the right side of the vertex. And as x gets greater than $1-\frac{1}{4a}$, $f(x)$ will only get bigger.
So $f(f(x))$ achieves a minimum when $f(x) = 1-\frac{1}{4a}$
We just need to guarantee $f(1-\frac{1}{4a}) \ge 0$
$a(1-\frac{1}{4a})^2+1-\frac{1}{4a}+1 \ge 0$
Simplify this to get
$a - \frac{3}{16a} + 1.5 \ge 0$
$16a^2 + 24a -3 \ge 0$
$a \ge \frac{-3 + 2\sqrt{3}}{4}$
or
$a \le \frac{-3 - 2\sqrt{3}}{4}$
But we know that $a \ge 0$ so the solution is:
$a \ge \frac{-3 + 2\sqrt{3}}{4}$
