Task B-3.2. (20 points) For a real number $a>0, a \neq 1$, the function is given by

$$
f(x)=\log _{a} x+\log _{a^{2}} x
$$

Depending on the parameter $a$, find all solutions to the equation

$$
f\left(x+a^{2}-a\right)=2 f(x)
$$
Solution. For the equation to have a solution, the following conditions must be satisfied:

$$
a>0, \quad a \neq 1, \quad x>0, \quad x>a-a^{2}
$$

Since $\log _{a^{2}} x=\frac{\log _{a} x}{\log _{a} a^{2}}=\frac{1}{2} \log _{a} x$, the given function is $f(x)=\frac{3}{2} \log _{a} x$.

From $f\left(x+a^{2}-a\right)=2 f(x)$ we get

$$
\frac{3}{2} \log _{a}\left(x+a^{2}-a\right)=2 \cdot \frac{3}{2} \log _{a} x \quad \text { i.e. } \quad \log _{a}\left(x+a^{2}-a\right)=\log _{a} x^{2}
$$

From the logarithmic equation (1) we obtain the quadratic equation $x^{2}-x+a-a^{2}=0$.

Let's solve it by factoring:

$$
0=x^{2}-a^{2}-(x-a)=(x-a)(x+a)-(x-a)=(x-a)(x+a-1)
$$

Its solutions are $x_{1}=a, x_{2}=1-a$.

The first solution makes sense for any positive $a$ except for $a=1$, and the second for $a \in\langle 0,1\rangle$.

Indeed, for $x_{1}=a$ we have $a>a-a^{2}$, i.e., $a^{2}>0$, which is true for any $a$.

For $x_{2}>0$ we get $1-a>0$, i.e., $a \in\langle 0,1\rangle$, and for $x_{2}=1-a$ it must be $1-a>a-a^{2}$, i.e., $(a-1)^{2}>0$, so $x$ is always defined for allowed $a$.