Find the domain of
$$\frac{\cos^{-1}\left(\frac{\left(x^2-5x+6\right)}{\left(x^2-9\right)}\right)}{\ln\left(x^{\left(2\right)}-3x+2\right)}$$
My attempt:-
I first found the domain of $x^2-3x+2$ which is $(-\infty,1) \cup (2,\infty)$
however I'm having trouble solving $\frac{(x-3)(x-2)}{x^2-9}$
which simplifies to $-1<\frac{x-2}{x+3}<1$
which is solvable however the answer is
$\left[\frac{-1}{2},1\right] \cup \left[2,\infty\right)-\left\{\frac{\left\{3-\sqrt{\ 5}\right)}{2}\left(\frac{,\left(3+\sqrt{5}\right)}{2}\right)\right)$}
which I won't get on simplifying my inequality
For the denominator we need
$$0<x^2-3x+2<1 \;\lor\; x^2-3x+2>1$$
which leads to
$$x\in\left(-\infty,\frac{3-\sqrt5}2\right)\cup\left(\frac{3-\sqrt5}2,1\right)\cup\left(2,\frac{3+\sqrt5}2\right)\cup\left(\frac{3+\sqrt5}2,\infty\right)$$
and for the numerator
$$-1\le \frac{x^2-5x+6}{x^2-9}\le 1 $$
which leads to
$$x\in\left[-\frac12,3\right)\cup\left(3,\infty\right)$$
and putting all together