Example 6. Solve the equation:
a) $\log _{x+1}\left(x^{2}-3 x+1\right)=1$

b) $\log _{x}\left(2 x^{2}-3 x-4\right)=2$.
Solution. a) The given equation is equivalent to the system

$$
\left\{\begin{array} { l } 
{ x + 1 > 0 } \\
{ x + 1 \neq 1 , } \\
{ x ^ { 2 } - 3 x + 1 = x + 1 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x>-1 \\
x \neq 0 \\
x^{2}-4 x=0
\end{array} \Leftrightarrow x=4\right.\right.
$$

Therefore, the only root of the equation is the number 4.

b) The original equation is equivalent to the system

$$
\left\{\begin{array} { l } 
{ x > 0 , } \\
{ x \neq 1 , } \\
{ 2 x ^ { 2 } - 3 x - 4 = x ^ { 2 } }
\end{array} \Leftrightarrow \left\{\begin{array} { l } 
{ x > 0 , } \\
{ x \neq 1 , } \\
{ x ^ { 2 } - 3 x - 4 = 0 }
\end{array} \Leftrightarrow \left\{\begin{array}{l}
x>0, \\
x \neq 1, \\
(x+1)(x-4)=0
\end{array} \Leftrightarrow\right.\right.\right.
$$

Thus, the only root of the equation is the number 4.

An equation of the form

$$
\log _{f(x)} g(x)=\log _{f(x)} h(x)
$$

can be replaced by an equivalent system in two ways.

First method:

$$
\log _{f(x)} g(x)=\log _{f(x)} h(x) \Leftrightarrow\left\{\begin{array}{l}
g(x)>0 \\
f(x)>0 \\
f(x) \neq 1 \\
g(x)=h(x)
\end{array}\right.
$$

102

CH. 2. EQUATIONS WITH ONE UNKNOWN

Second method:

$$
\log _{f(x)} g(x)=\log _{f(x)} h(x) \Leftrightarrow\left\{\begin{array}{l}
h(x)>0 \\
f(x)>0 \\
f(x) \neq 1 \\
g(x)=h(x)
\end{array}\right.
$$

An equation of the form

$$
\log _{g(x)} f(x)=\log _{p(x)} f(x)
$$

can be replaced by an equivalent system in two ways.

First method:

$$
\log _{g(x)} f(x)=\log _{p(x)} f(x) \Leftrightarrow\left\{\begin{array}{l}
f(x)>0 \\
g(x)>0 \\
g(x) \neq 1 \\
g(x)=p(x)
\end{array}\right.
$$

Second method:

$$
\log _{g(x)} f(x)=\log _{p(x)} f(x) \Leftrightarrow\left\{\begin{array}{l}
f(x)>0 \\
p(x)>0 \\
p(x) \neq 1 \\
g(x)=p(x)
\end{array}\right.
$$

Note that the choice of a system equivalent to the given equation is determined by which of the inequalities $g(x)>0$ or $h(x)>0(p(x)>0)$ is easier to solve.