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 !!!