<s>[INST] Find the values ​of $k$ that satisfy $x_1> 1$ and $x_2 <1.$ Here I found a question that caught my attention. But then I did not see it again. The question was:
The quadratic equation is given as follows:

$$(2k+1)x^2-kx+k-2=0$$

Find the values ​​of $k$ that satisfy $x_1> 1$ and $x_2 <1.$
My way:
$$x_1=\frac{k+\sqrt{k^2-4(2k+1)(k-2)}}{2(2k+1)} \\
x_2=\frac{k-\sqrt{k^2-4(2k+1)(k-2)}}{2(2k+1)}\\ \begin{cases} x_1>1 & \\ x_2<1 &  \end{cases} \Rightarrow \begin{cases} \frac{k+\sqrt{k^2-4(2k+1)(k-2)}-2(2k+1)}{2(2k+1)} >0 & \\ \frac{k-\sqrt{k^2-4(2k+1)(k-2)}-2(2k+1)}{2(2k+1)}<0  &  \end{cases} \Rightarrow \begin{cases} 2(2k+1)\left(\sqrt{-7k^2+12k+8}-(3k+2) \right)>0 & \\2(2k+1)\left(\sqrt{-7k^2+12k+8}+(3k+2) \right)>0  &  \end{cases} \Rightarrow 4(2k+1)^2×\left( -7k^2+12k+8-(3k+2)^2\right)>0 \Rightarrow -16k^2+4>0 \Rightarrow (2k-1)(2k+1)<0 \Rightarrow k\in \left(-\frac12 ; \frac 12 \right)$$
Actually, I doubt my solution. Can you confirm that the solution is right or wrong?
Thank you!
 [/INST] To solve
$$x_1=\frac{k+\sqrt{k^2-4(2k+1)(k-2)}}{2(2k+1)}>1$$
you need to set for the existence of real solutions
$$k^2-4(2k+1)(k-2)\geq0$$
and distinguish two cases
$$2(2k+1)>0\implies \sqrt{k^2-4(2k+1)(k-2)}>2(2k+1)-k$$
$$2(2k+1)<0\implies \sqrt{k^2-4(2k+1)(k-2)}<2(2k+1)-k$$
Similarly for
$$x_2=\frac{k-\sqrt{k^2-4(2k+1)(k-2)}}{2(2k+1)}<1$$
</s>