I'm supposed to find the solution set of the inequality $|x|^{(x-2)(x+1)}\lt 1$. Here's my attempt. I seem to be getting a different solution than suggested by the graph of $f(x)=|x|^{(x-2)(x+1)}-1$.
My Attempt
$$\begin{aligned}x\gt 1 \implies &(x-2)(x+1)\log x\lt0 \\ &(x-2)(x+1)\lt0\\ &x\in (-1,2) \cap (1,\infty)=\boxed{(1,2)}\end{aligned}$$
$$\begin{aligned}x\in(0,1)\implies &(x-2)(x+1)\log x\gt 0\\&(x-2)(x+1)\lt 0\\&x\in(-1,2)\cap (0,1)=\boxed{(0,1)}\end{aligned}$$
Similarly I made cases for $x\lt-1$ and $x\in (-1,0)$ both of whose solution sets came out to be the empty set. Now for the solution set we must take the union of the individual solution sets doing which gives us that $x\in(0,1)\cup (1,2)$. Whereas the solution is $(1,2)$.
Can you please spot the mistake? Thanks
Actually for $|x| < 1$ it should be $(x-2)(x+1)\log |x| < 0$ as before, which implies the strict inequality $(x-2)(x+1) >0$ must be positive [and for $x=0$ it is necessary and sufficient for $(x-2)(x+1) >0$ at $x=0$]. This gives $|x| < 1 \Rightarrow x \in (-1,0)$