If the difference between the roots of the equation $x^2+a\cdot x+1=0$ is less than $\sqrt{5}$, then find the set of possible values of a.
My attempt is as follows:
$$\left|\frac{\sqrt{D}}{1}\right|<\sqrt{5}$$
Squaring both sides
$$D<5$$ $$a^2-4<5$$ $$a^2-9<0$$ $$(a-3)(a+3)<0$$ $$a\in \left(-3,3\right)$$
But for $a\in \left(-2,2\right)$, D would be negative and $\sqrt{D}$ would be a complex number and in the original equation we are comparing $\left|\sqrt{D}\right|<\sqrt{5}$ and how can we compare a complex number with real no as $\sqrt{D}$ would be complex number if $a\in \left(-2,2\right)$.
So $a\in (-3,-2] \cup [2,-3)$, but my answer is not matching as actual answer is $a\in (-3,3)$.
What am I missing here?