<s>[INST] Find the domain of the following function The given function is:
$f(x)=\sqrt{\log_{|x|-1}(x^2 + 4x +4)}$
My approach:
The argument $x^2+4x+4>0$ for all $x\neq-2$
Also, the base $|x|-1$ should be greater than 0 and not equal to 1.
$\therefore |x|-1>0$
$\implies |x|>1$
$\implies x>1$ or $x<-1$
And $|x|-1\neq1$
$\implies x\neq2,-2$
 Taking all this in consideration, my answer is $D_f= (-\infty,-2)\cup(-2,-1)\cup(1,\infty)$
However, the given answer is $(-\infty,-3]\cup(-2,-1)\cup(2,\infty)$
Where did I go wrong? Thanks in advance.
EDIT:
My new approach: 
Case I:
$0<|x|-1<1\implies 1<|x|<2$
Then, $x^2 + 4x+4\leq1\implies x^2+4x+3\leq0$
 or $-3\leq x\leq-1$
$\therefore x \in (-2,-1)$---(1)
Case II:
$|x|-1>1 \implies |x|>2$
Then, $x^2+4x+4\geq1 \implies x^2=4x+3\geq0$
or $x\geq-1 $ or $x\leq-3$
$\therefore x \in (-\infty,-3]\cup(2,\infty)$---(2)
From (1) and (2), $x\in(-\infty,-3]\cup(-2,-1)\cup(2,\infty)$
P.S.: Thanks @gimusi
 [/INST] HINT
Recall that


*

*for $a>1 \quad \log_a x \ge0 \iff x\ge 1$

*for $0<a<1 \quad \log_a x \ge 0 \iff 0<x\le 1$
therefore in order to have $\log_{|x|-1}(x^2 + 4x +4) \ge 0$ we need to consider two cases


*

*$|x|-1>1 \implies x^2 + 4x +4\ge 1$

*$0<|x|-1<1 \implies 0<x^2 + 4x +4\le 1$
</s>