<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] $$\log((x^2 +2x+1) / (x^2 -3x +2))^2$$
$$\log((x+1)^2 / (x^2 -2x-(x-2))^2$$
$$\log((x+1)^2 / (x(x-2)-(x-2))^2$$
$$\log((x+1)^2 / ((x-2)(x-1))^2$$
$$\log\left(\frac{(x+1)^2}{(x-2)(x-1)}\right)^2=2(\log(x+1)^2-\log(x-2)(x-1))$$
$$=2(2\log(x+1)-\log(x-2)-\log(x-1))=$$
$$=4\log(x+1)-2\log(x-2)-2\log(x-1)$$
</s>