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.
The case we're considering here is the one where exactly one of the two roots of the quadratic $f$ is to the right of $-3$. That is the same as saying that $x=-3$ lies between the two roots of $f$. And from our general knowledge of how quadratics behaves, since the $x^2$ coefficient of $f$ is positive, the points between the two roots are exactly the ones where $f(x)<0$. Thus $-3$ is such a point (implying that the logarithmic equation will have exactly one solution) if and only if $f(-3)<0$.
Note that $f(x)$ is just a quadratic polynomial -- when we're investigating the shape and position of the parabola, it makes perfect sense to evaluate it at any $x$, even though the original logarithmic equation that led you to consider that polynomial is only defined for some values.