For which values of the real parameter [tex]a[/tex] does the equation [tex]\log_{\sqrt{2-x}}\left|x^2+4a\right|=4[/tex] have exactly three real roots?
Solution:
Domain: the base [tex]\sqrt{2-x}[/tex] must be positive and different from [tex]1[/tex], so [tex]x\lt 2[/tex] and [tex]x\ne 1[/tex]; the argument must be positive, i.e. [tex]x^2+4a\ne 0[/tex]. On the domain the equation is equivalent to
[tex]\left|x^2+4a\right|=\left(\sqrt{2-x}\right)^4=(2-x)^2[/tex]
Since [tex](2-x)^2\gt 0[/tex] for [tex]x\lt 2[/tex], every root of this equation automatically satisfies [tex]x^2+4a\ne 0[/tex]. So we count the roots with [tex]x\lt 2[/tex], [tex]x\ne 1[/tex] of the two equations [tex]x^2+4a=(2-x)^2[/tex] and [tex]x^2+4a=-(2-x)^2[/tex].
The first one gives [tex]x^2+4a=x^2-4x+4\iff x=1-a[/tex]; this root is admissible if and only if [tex]1-a\lt 2[/tex] and [tex]1-a\ne 1[/tex], i.e. [tex]a\gt -1[/tex], [tex]a\ne 0[/tex].
The second one gives
[tex]x^2+4a=-x^2+4x-4\iff (x-1)^2=-1-2a[/tex]
For [tex]a\gt -\frac{1}{2}[/tex] it has no roots, and for [tex]a=-\frac{1}{2}[/tex] its only root is [tex]x=1[/tex], which is not admissible. For [tex]a\lt -\frac{1}{2}[/tex] put [tex]s=\sqrt{-1-2a}\gt 0[/tex]; the roots are [tex]1-s[/tex] (always admissible) and [tex]1+s[/tex], which is admissible if and only if [tex]s\lt 1\iff -1-2a\lt 1\iff a\gt -1[/tex].
Counting: if [tex]a\le -1[/tex], only [tex]x=1-s[/tex] remains, i.e. one root. If [tex]a\ge -\frac{1}{2}[/tex], the second equation gives no admissible root and the first gives at most one.
If [tex]-1\lt a\lt -\frac{1}{2}[/tex], we get [tex]1-s[/tex] and [tex]1+s[/tex] with [tex]0\lt s\lt 1[/tex], and also [tex]x=1-a\in\left(\frac{3}{2} , 2\right)[/tex]. Here [tex]1-a\gt 1\gt 1-s[/tex], and [tex]1-a=1+s[/tex] would mean [tex]a^2=-1-2a[/tex], i.e. [tex](a+1)^2=0[/tex], [tex]a=-1[/tex], which is excluded. Hence there are exactly three roots.
The answer is [tex]a\in\left(-1 , -\frac{1}{2}\right)[/tex].