I have the following functional equation in hand, I can easily solve it for the case $(a, b ,c)=(1, 1,0)$ which gives $f(x)$ to be $x^2+x$.
$\begin{aligned}{g(x)=a\left[f(x)\right]^2+bf(x)+c, \text{where } g(x)=x^4+2x^3+2x^2+x}\end{aligned}$
I also tried setting $x=0$ that gives $af^2(0)+bf(0)+c=0$ which gives $f(0)=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$.
Also I've tried, using the quadratic formula to solve for $f(x)$ as follows:
$$a\left[f(x)\right]^2+bf(x)+\left(c-g(x)\right)=0\implies f(x)=\dfrac{-b\pm\sqrt{b^2-4a\left(c-g(x)\right)}}{2a}$$
Do both the functions solve the functional equation, if not, how can I proceed? Also the solution I found for the special case does not seem to be the same when we put in those values of $a, b, c$ in the general solution. Any hints are appreciated.