Find set of values of $a$ If $($$x^2$+$x$)$^2$+ $a$$($$x^2$+$x$) + $4$ $=$ $0$ has all four real roots where two of them are equal.
Here’s how I tried solving it :
I assumed $($$x^2$+$x$$)$ = $t$
$\Rightarrow$ $t$ $\in$ $[$$\frac{-1}{4}$, $\infty$$]$
The given equation $\Rightarrow$ $f(t)$ $=$ $t^2$ + $at$ + $4$ $=$ $0$
This equation will have real roots in the interval $[$$\frac{-1}{4}$, $\infty$$]$
For four real roots, both the roots of $f(t)$ = $0$ should lie in the interval $[$$\frac{-1}{4}$, $\infty$$]$
For two equal roots, either $f(t)$ should be a perfect square, or $t$ $=$ $\frac{-1}{4}$ should be one of the roots of $f(t)$ $=$ $0$ (Both roots should still lie in $[$$\frac{-1}{4}$,$\infty$$)$
Now I imposed the conditions, and solved it
The set of values of $a$ that I am getting is $a$ $\in$ $($$-\infty$, $-4$$]$
But I checked on Desmos, the equation $($$x^2$+$x$)$^2$+ $a$$($$x^2$+$x$) + $4$ $=$ $0$ has all four real roots, where two are equal, for only one value of $a$ $\in$ {$-4$}.
When $a$ $\in$ ($-\infty$, $-4$), the equation $($$x^2$+$x$)$^2$+ $a$$($$x^2$+$x$) + $4$ $=$ $0$ has four real and distinct roots. We want at least two equal roots, that happens only when $a$ equals ($-4$).
I’m not sure what my mistake is. Please help me with it, thanks a lot.

The solutions of $t^2+at+4=0$ are $\frac{-a\pm\sqrt{a^2-16}}{2}$, hence $$x^2+x+\frac{a\mp\sqrt{a^2-16}}{2}=0.$$ Now the left side has to be a complete square, from where $$\frac{a\mp\sqrt{a^2-16}}{2}=\frac14.$$
That’s the case for $a=\pm65/4$, that is $a=65/4$ as we have $a>-1/4$.