# Problem 5

Find all values of \(a\) for which the equation

$$
(\operatorname{tg} x+6)^{2}-\left(a^{2}+2 a+8\right)(\operatorname{tg} x+6)+a^{2}(2 a+8)=0
$$

has exactly two solutions on the interval \(\left[0 ; \frac{3 \pi}{2}\right]\).
Answer: $(-\sqrt{6} ;-2)(-2 ;-1) ; 4$.

## Solution.

Let $t=\operatorname{tg} x+6$, then the equation can be written as $t^{2}+\left(a^{2}+2 a+8\right) t+a^{2}(2 a+8)=0$, from which $t=2 a+8$ or $t=a^{2}$. Therefore, the solutions of the original equation are the solutions of the equations $\operatorname{tg} x=2 a+2$ or $\operatorname{tg} x=a^{2}-6$.

We investigate how many solutions the equation $\operatorname{tg} x=b$ has on the interval $\left[0 ; \frac{3 \pi}{2}\right]$ depending on $b$. On the interval $\left[0 ; \frac{\pi}{2}\right)$, the function $y=\operatorname{tg} x$ takes each non-negative value once, and on the interval $\left(\frac{\pi}{2} ; \frac{3 \pi}{2}\right)$, the function $y=\operatorname{tg} x$ takes each value once. Thus, the equation $\operatorname{tg} x=b$ has two solutions on the interval $\left[0 ; \frac{3 \pi}{2}\right]$ when $b \geq 0$ and one solution when $b<0$.

The equations $\operatorname{tg} x=2 a+2$ and $\operatorname{tg} x=a^{2}-6$ can have common solutions when $2 a+2=a^{2}-6$, that is, when $a=4$ and $a=-2$. When $a=4$, both equations become $\operatorname{tg} x=10$ and have two solutions on the interval $\left[0 ; \frac{3 \pi}{2}\right]$. When $a=-2$, both equations become $\operatorname{tg} x=-2$ and have one solution on the interval $\left[0 ; \frac{3 \pi}{2}\right]$.

For other values of $a$, the original equation has exactly two solutions on the interval $\left[0 ; \frac{3 \pi}{2}\right]$ if both equations $\operatorname{tg} x=2 a+2$ and $\operatorname{tg} x=a^{2}-6$ have one solution each. We get the system of inequalities:

$$
\left\{\begin{array}{l}
2 a + 2 < 0 \\
a ^ { 2 } - 6 < 0
\end{array} \Leftrightarrow \left\{\begin{array}{c}
a<-1 \\
-\sqrt{6}<a<\sqrt{6}
\end{array}\right.\right.
$$

that is, $-\sqrt{6}<a<-1$.

Thus, the original equation has exactly two solutions on the interval $\left[0 ; \frac{3 \pi}{2}\right]$ when $-\sqrt{6}<a<-1 ;-2<a<-1$ and when $a=4$.