Find the domain of $\ln(\sqrt{x^2-5x-24}-x-2)$. Find the domain of $\ln(\sqrt{x^2-5x-24}-x-2)$.
When i solved this question,i got the answer $x<\frac{-28}{9}$ but the answer given in the book is $x\leq-3$.
This is how i solved.
$\sqrt{x^2-5x-24}-x-2>0\Rightarrow \sqrt{x^2-5x-24}>x+2$
$$\therefore x^2-5x-24>x^2+4x+4\Rightarrow9x<-28\Rightarrow x<\frac{-28}{9} \tag 1$$
and
$$x^2-5x-24\geq0\Rightarrow x\leq -3 \text{ or } x\geq 8 \tag 2$$
When taking the intersection of (1) and (2),we get $x<\frac{-28}{9}$. Where have i gone wrong? Please help me.
 A: First note $\sqrt{x^2-5x-24}$ is a real number iff $x\in(-\infty, -3]\cup[8,\infty)$
Notice that 
$$x\ge 8\,\,\text{ and }\,\,\sqrt{x^2-5x-24}>x+2\quad \implies\quad x^2-5x-24>(x+2)^2\iff 9x+28<0$$
which is imposible.
On the other hand
$$x\le -3 \implies\quad \sqrt{x^2-5x-24}\ge 0 \quad\text{ and }\,\,\,-1 = -3 +2 \ge x+2$$
Then, $$\sqrt{x^2-5x-24}-x-2\ge 1>0$$
So, $\ln(\sqrt{x^2-5x-24}-x-2)$ is a real number iff $x\le -3$.
A: Be careful when squaring inequalities.
The condition is indeed $\sqrt{x^2-5x-24}>x+2$, but this translates into two different sets of conditions:
\begin{align}
\textbf{Set 1}\quad
&\begin{cases}
x^2-5x-24\ge0\\
x+2<0
\end{cases}
\\[10px]
\textbf{Set 2}\quad
&\begin{cases}
x^2-5x-24\ge0\quad (*)\\
x^2-5x-24\ge(x+2)^2\\
x+2\ge0
\end{cases}
\end{align}
(The condition marked as $(*)$ is of course redundant.)
Set 1 is for the case squaring is not possible, but of course the desired inequality holds, because the radical exists and is non negative, while the left-hand side is negative.
Set 2 is for the case we can square, because we're assuming that also the right-hand side is non negative.
Where's the problem? You made an illicit squaring; it's like from $2>-3$ deduce, by squaring, that $4>9$. The inequality $a>b$ is equivalent to $a^2>b^2$ when $a,b\ge0$; but it's not in general equivalent when $a>0$ and $b<0$ (but it's true, of course, in this case).

Set 1 can be solved in an easy way, because the quadratic has roots $8$ and $-3$, and its solution set is $x\le-3$.
Set 2 becomes
\begin{cases}
9x+28\le 0\\
x+2\ge0
\end{cases}
which of course has no solution.
