Find all pairs $(a,b)$ of real numbers such that $\alpha$ is a root of $x^2 +ax + b =0$, $\alpha^2 -2$ is also a root of the equation. I have tried to solve the question above by taking $2$ cases.     
CASE: $1$
Let the 2 roots of the equation be $\alpha$ and $\beta$. 
In this case I took $\alpha = \beta$ and I got 2 solutions for $(a,b)$.   
CASE: $2$
In this case I took $\alpha$ is not equal to $\beta$.
But after this I am not able to solve it .
 A: Since $(x-x_1)(x-x_2)=x^2-(x_1+x_2)x+x_1x_2$
Sum $s$ and product $p$ of the roots $\{x_1,x_2\}$ verify the special quadratic equation $x^2-sx+p=0$

Thus $\begin{cases}a=-\alpha-(\alpha^2-2)\\b=\alpha(\alpha^2-2)\end{cases}$
And this is done. You don't need to have subcases (checking if the roots are equal or distinct [see comment]), you just need to express $a$ and $b$ in function of the given data, namely $\alpha$.
Edit:
In the case $\alpha=\alpha^2-1\iff \alpha\in\{-1,2\}$ then we can also consider that $(x-\alpha)(x-\mu)=0$ is also satisfying the wording of the problem for any $\mu$, while $\alpha$ is not necessarily a double root of this quadratic.
So, in this case, there is an additional infinite family of solutions which is
$\begin{cases}a=-\alpha-\mu\\b=\alpha\mu\end{cases}\quad \forall \mu\in\mathbb R$

Note that in both cases $(a,b)$ belongs to the line $a\alpha+b=-\alpha^2$:


*

*it is the whole line when $\alpha=-1\text{ or }2$

*else it is just a point on it


Bonus, here is the locus of $(a,b)$ when $\alpha$ describe $\mathbb R$.

A: Hint:
We must have: $$x^2+ax+b=(x-\alpha)(x-\alpha^2+2)$$
Working out the RHS and comparing it with LHS we find expressions for $a$ and $b$ in $\alpha$.
A: By solving the quadratic equation,
$$\alpha=\frac{-a+\sqrt{a^2-4b}}{2}$$ is a root.
Then for the other root,
$$\frac{-a-\sqrt{a^2-4b}}{2}=\left(\frac{-a+\sqrt{b^2-4b}}{2}\right)^2-2.$$
And symmetrically, we have the solutions
$$\frac{-a+\sqrt{a^2-4b}}{2}=\left(\frac{-a-\sqrt{a^2-4b}}{2}\right)^2-2.$$
This forms the locus of $(a,b)$.
