Concept:
- For \(x^2+px+q=0\) with roots \(\alpha,\beta\): \(\alpha+\beta=-p\) and \(\alpha\beta=q\).
- \((\alpha-\beta)^2=(\alpha+\beta)^2-4\alpha\beta\).
- The difference between the roots is measured by \(|\alpha-\beta|\), the distance between them.
Step 1: Use the sum and product of the roots
Let \(\alpha,\beta\) be the roots of \(x^2+ax+1=0\). Then \[ \alpha+\beta=-a,\qquad \alpha\beta=1, \] so that \[ (\alpha-\beta)^2=(\alpha+\beta)^2-4\alpha\beta=a^2-4 . \]
Step 2: Impose the condition on the difference
We need \(|\alpha-\beta|\lt \sqrt5\), that is \(\sqrt{|a^2-4|}\lt \sqrt5\).
For real roots (\(a^2\ge 4\)): \[ a^2-4\lt 5 \;\Longrightarrow\; a^2\lt 9 \;\Longrightarrow\; |a|\lt 3 . \]
Step 3: Include the remaining values of \(a\)
For \(a^2\lt 4\) the roots are complex conjugates and \(|\alpha-\beta|=\sqrt{4-a^2}\le 2\lt \sqrt5\), so the condition holds for all such \(a\) as well. Combining the two cases, \[ -3\lt a\lt 3,\qquad\text{that is}\qquad a\in(-3,3). \]
Step 4: Test the other intervals
Each of the intervals \((3,\infty)\) and \((-\infty,-3)\) has \(a^2\gt 9\), so \(|\alpha-\beta|=\sqrt{a^2-4}\gt \sqrt5\), which violates the condition. The interval \((-3,\infty)\) contains values such as \(a=4\), for which \(|\alpha-\beta|=\sqrt{12}\gt \sqrt5\). Only \((-3,3)\) satisfies the requirement throughout.
Step 5: Conclusion
The set of possible values of \(a\) is \((-3,3)\). Hence, the correct option is (C), \(\left( { - 3,3} \right)\).