I have to investigate the possible roots of the equation according to $a$, i.e. i have to see whether there is only one root, two roots, or no roots and also what their sign is each time. This is from a book i'm reading and the answer it gives is $a<0$ or $a=12$.
Now first we have to to make the restriction that $x>-3$ due to logarithm. What is troubling me is the $a<0$ part.
In the solution it says that after getting rid of the logarithms we have $x^2-(a-6)x+9$. Now if $a<0 \land x>0$, then $\log(ax)$ is undefined so the equation has no solution. But we're asked about $a$, not $x$. So it proceeds to say that if $a<0 \land x<0$, i.e. $-3<x<0$ (due to our restriction) then:
Let $f(x)=x^2-(a-6)x+9$, so $f(-3)=3a<0$. [The following is primarily what i don't understand.] This means that $-3$ will be between the two roots $x_1$ and $x_2$, so $x_1<-3<x_2<0$, but since we have the constriction $-3<x<0$ then $x_1$ is not possible so $x_2$ is one and only root of the original equation. Thus for $a<0$ there is exactly one root.
How could they even do that, plug $-3$ for $f(x)$ to test the roots of the equation, since for $x=-3$ the equation is not defined. Also what i'm not sure i understand is why it says that since $f(-3)<0$ then $x_1<-3<x_2$. I would like to understand that. Help please. Thanks in advance.