<s>[INST] How to solve this equation $(x-1)(x+2) + 4(x-1)\sqrt{\dfrac{x+2}{x-1}} = 12$? $(x-1)(x+2) + 4(x-1)\sqrt{\dfrac{x+2}{x-1}} = 12$
$Domain: x\in (-\infty;-2]\cup(1;+\infty)$
$x = 2\longrightarrow$ Done
How to prove $x = \dfrac{-1-3\sqrt{17}}{2}$ is the last solution? With raise both side by power of two?
Any better way such as factoring, grouping,...?
Please help!!
 [/INST] Hint:

*

*Note that $$(x-1)\sqrt{\frac{x+2}{x-1}} = \sqrt{(x-1)(x+2)}$$ when $x>1$ and
$$\begin{align}(x-1)\sqrt{\frac{x+2}{x-1}} &= -(1-x)\sqrt{\frac{x+2}{x-1}} \\[1mm]&= -\sqrt{(1-x)^2\frac{x+2}{x-1}}\\[1mm]&=-\sqrt{(x-1)(x+2)}\end{align}$$ when $x \le -2$.


*Substitute $$t = \sqrt{(x-1)(x+2)}$$ Then, how will the equation look like?
</s>