<s>[INST] If $f(x)=2|2x-5|+3$, with $x\geq0$, find all $k$ such that $f(x) = kx + 2$ has exactly two roots 
If $f(x) = 2|2x-5| + 3 $, $x\geq0$, find the values of $k$ such that the equation $f(x) = kx + 2$ has exactly two roots.

My attempt :-
$2(2x -5)+3 = kx + 2$ ,
$x \geq 2.5$
$x =\frac{9}{4-k}$
Then
$\frac{9}{4-k} \geq \frac{2}{5}$ , $k<4$
Then
$\frac{2}{5} < k < 4$
$2(-2x +5) + 3 = kx +2$ , $ x < \frac{2}{5}$ , $x\geq 0$
$x = \frac{11}{k+4}$
Then
$ \frac{11}{k+4} < \frac{5}{2}$
Then
$k > \frac{2}{5}$
Then
$\frac{2}{5} < k < 4$
Is there any easier procedure to find the values of $k$ ?
 [/INST] The equation is equivalent to:
$$
2\vert 2x−5\vert +3=kx+2 \land x\ge0\\
2\vert 2x−5\vert=kx-1 \land x\ge0\\
(2\vert 2x−5\vert)^{2}=(kx-1)^{2} \land kx-1\ge0 \land x\ge0\\
(2 (2x−5))^{2}-(kx-1)^{2}=0 \land kx-1\ge0  \land x\ge0\\
(2(2x−5)+kx-1)(2(2x−5)-(kx-1))=0 \land kx-1\ge0 \land x\ge0\\
((4+k)x−11)((4-k)x−9)=0 \land kx-1\ge0 \land x\ge0\\
(x=\frac{11}{4+k} \lor x=\frac{9}{4-k})\land kx-1\ge0 \land x\ge0\\
$$
So the equation have two solutions iff
$$
\frac{11}{4+k}\neq\frac{9}{4-k}\land kx-1\ge0 \land x\ge0\\
 9(4+k)\neq\ 11(4-k)\land kx-1\ge0  \land x\ge0\\
 k\neq\ \frac{2}{5}\land kx-1\ge0 \land x\ge0$$
now $kx-1\ge0$, but $(x=\frac{9}{4-k} \lor x=\frac{11}{4+k})$ so
$$
\frac{9}{4-k}k-1\ge0 \land \frac{11}{4+k}k-1\ge0 \\
\frac{2}{5}\le \:k<4 \land (\:k<-4\lor k\ge \frac{2}{5}) 
$$
we also have that $x\ge0$, but $(x=\frac{9}{4-k} \lor x=\frac{11}{4+k})$ so
$$
\frac{9}{4+k}\ge0 \land \frac{11}{4-k}\ge0\\
k\gt-4 \land 4\gt k
$$
then
$$
\frac{2}{5}\le \:k<4 \land (\:k<-4\lor k\ge \frac{2}{5})\land 4\gt k\gt-4 \land  k\neq\ \frac{2}{5}\\
\frac{2}{5}\lt k<4 
$$
</s>