$f(x)=\sqrt{\dfrac{x-\sqrt {20}}{x-3}}$, $g(x)=\sqrt{x^2-4x-12}$, find the domain of $f(g(x))$.
For some reason, I cannot get the correct answer. Here is what I tried.
$D_g:$ $$x^2-4x-12\ge0$$ $$(x-6)(x+2)\ge0$$ $$\boxed{(-\infty,-2] \cup [6,\infty)}$$
$D_f:$ $$\dfrac{x-\sqrt{20}}{x-3}\ge0$$ $$\boxed{(-\infty, \sqrt {20}] \cup (3,\infty)}$$
$D_{g(f)}:$ $$\sqrt{x^2-4x-12}\le \sqrt{20}$$ $$[-4,8]$$ $$\text{or}$$ $$\sqrt{x^2-4x-12}>3$$ $$(-\infty, -3) \cup (7,\infty)$$ $$\boxed{(-\infty, -3)\cup (-3,-2) \cup (7,\infty)}$$
So then my final answer was
$$\color{blue}{\boxed{(-\infty, -3)\cup (-3,-2) \cup [6,7) \cup (7,\infty)}}$$
What did I do wrong?
Correct Answer:
$x\le-4\ \text{or}\ -3<x\le-2\ \text{or}\ 6\le x<7\ \text{or}\ x\ge8$
Here is the complete solution:
The domain of $g(x)$: $$x\in (-\infty, -2]\cup[6,+\infty).$$ The domain of $f(x)$: $$\ 1)\begin{cases}\sqrt{x^2-4x-12}\le \sqrt{20} \\ \sqrt{x^2-4x-12}<3\end{cases} \text{or} \ \ 2)\begin{cases}\sqrt{x^2-4x-12}\ge \sqrt{20} \\ \sqrt{x^2-4x-12}>3\end{cases} \Rightarrow$$ $$1)\ \begin{cases} x\in [-4, 8] \\ x\in (-3, 7) \end{cases} \text{or} \ \ 2)\begin{cases}x\in (-\infty, -4]\cup[8,+\infty) \\ x\in (-\infty, -3)\cup(7,+\infty) \end{cases} \Rightarrow$$ $$1)\ x\in (-3, 7) \ \ \text{or} \ \ 2) \ x\in (-\infty, -4]\cup[8,+\infty).$$ Finally, the domain of $f(g(x))$: $$1)\ \begin{cases} x\in (-\infty, -2]\cup[6,+\infty)\\ x\in (-3, 7) \end{cases} \text{or} \ \ 2)\begin{cases}x\in (-\infty, -2]\cup[6,+\infty) \\ x\in (-\infty, -4]\cup[8,+\infty) \end{cases} \Rightarrow$$ $$1)\ x\in (-3, -2]\cup[6,7) \ \ \text{or} \ \ 2) \ x\in (-\infty, -4]\cup[8,+\infty) \Rightarrow \\ x\in (-\infty, -4]\cup(-3, -2]\cup[6,7)\cup[8,+\infty).$$