Algebra - Logarithmic Equations

Solve the equation: $\;$ $\log_3 \left(9^x + 9\right) = x + \log_3 \left(28 - 2 \times 3^x\right)$


Given equation: $\;\;$ $\log_3 \left(9^x + 9\right) = x + \log_3 \left(28 - 2 \times 3^x\right)$

i.e. $\;$ $\log_3 \left(9^x + 9\right) - \log_3 \left(28 - 2 \times 3^x\right) = x$

i.e. $\;$ $\log_3 \left(\dfrac{9^x + 9}{28 - 2 \times 3^x}\right) = x$

i.e. $\;$ $\dfrac{9^x + 9}{28 - 2 \times 3^x} = 3^x$

i.e. $\;$ $9^x + 9 = 28 \times 3^x - 2 \times 3^{2x}$

i.e. $\;$ $3^{2x} + 9 = 28 \times 3^x - 2 \times 3^{2x}$

i.e. $\;$ $3 \times \left(3^x\right)^2 - 28 \times 3^x + 9 = 0$ $\;\;\; \cdots \; (1)$

Let $\;$ $3^x = p$ $\;\;\; \cdots \; (2)$

Then, equation $(1)$ becomes

$3p^2 - 28p + 9 = 0$

i.e. $\;$ $\left(3p - 1\right) \left(p - 9\right) = 0$

i.e. $\;$ $p = \dfrac{1}{3}$ $\;$ or $\;$ $p = 9$

Substituting the value of $\;$ $p$ $\;$ in equation $(2)$ gives

when $\;$ $p = \dfrac{1}{3}$, $\;$ we have $\;$ $3^x = \dfrac{1}{3} = 3^{-1}$ $\implies$ $x = -1$

when $\;$ $p = 9$, $\;$ we have $\;$ $3^x = 9 = 3^2$ $\implies$ $x = 2$

$\therefore \;$ The solution to the given equation is $\;\;$ $x = \left\{-1, 2 \right\}$