<s>[INST] Helping turning this into sum/difference logarithm? Hey guys so i'm trying to turn this equation into it's sum/difference logarithm. However, the part that messes me up is turning the bottom of the fraction
$$
\log\left(\frac{x^2 +2x+1}{x^2 -3x +2}\right)^2\;.
$$
I think it will turn into this:
$$
4\log(x+1) -2\big(\log(x-1) +\log(x-2)\big)\;,
$$
but I don't want it to be $(x-1)^2$ times $(x-2)^2$. How do I solve it so it's $\big((x-1)(x-2)\big)^2$?
 [/INST] I assume you want to simplify
$$\log \left( \left( \dfrac{x^2+2x+1}{x^2 - 3x+2} \right)^2\right)$$
First recall the following properties of logarithm.
\begin{align}
1. & \log (a^m) = m \log (a)\\
2. & \log \left( \dfrac{a}b\right) = \log a - \log b\\
3. & \log \left( ab\right) = \log a + \log b
\end{align}
Using the first property, we get that
$$\log \left( \left( \dfrac{x^2+2x+1}{x^2 - 3x+2} \right)^2\right) = 2 \log \left( \dfrac{x^2+2x+1}{x^2 - 3x+2}\right)$$
Now using the second property, we get that
$$\log \left( \dfrac{x^2+2x+1}{x^2 - 3x+2}\right) = \log (x^2+2x+1) - \log (x^2-3x+2)$$
Next note that $(x^2 + 2x + 1) = (x+1)^2$ and $x^2 - 3x + 2 = (x-1)(x-2)$. Hence, we have that $$\log (x^2+2x+1) = \log ((x+1)^2) = 2 \log(x+1)$$ using property $(1)$. Similarly, we have that $$\log (x^2-3x+2) = \log ((x-2)(x-1)) = \log(x-2) + \log(x-1)$$ using property $(3)$. Putting all these together, we get what you want.
</s>