Two different solutions for the irrational inequality $(x-1) \sqrt{x^2-x-2} \geq 0$. Upon solving this problem with the concept that I have understood about solving inequalities until now, I got the following range for $x$ :-
$(x-1) \sqrt{x^2-x-2} \geq 0$
$\Rightarrow(x-1) \sqrt{(x-2)(x+1)} \geq 0$
$\Rightarrow(x-1)^2 (x-2)(x+1)\geq 0 \text{ ; upon squaring both sides }$
$\Rightarrow x\in(-\infty,-1]\cup[2,\infty)$
This is the solution range that I got for the given inequality and I have confirmed this solution by checking this in Wolfram Alpha. But this solution only comes up if I give the modified problem statement as $(x-1)^2 (x-2)(x+1)\geq 0$ i.e. after squaring both sides, on the website as you can see here.
And I thought that this should be the correct answer but when I give the original problem statement into the website, it gives the result as $x\in[2,\infty)$ as you can see here.
Now I am confused as to which one is the correct solution for this problem. Why there are two different solutions to the same problem? How a simple act of squaring both sides is changing the solutions completely? Please help me on this !!!
Thanks in advance !!!

$x\ge0$ is obviously not the same as $x^2\ge0$ !
For this problem, as a square root is positive by definition, the inequality reduces to
$$x-1\ge0,$$  provided that the argument of the square root is non-negative.
