I think this might be a case of slight ambiguity in notation, but here goes:
On a test question, I was required to expand the expression $\log (ab)^n$. Since the logarithm is a function, I reasoned as follows:
\begin{align*} \log(ab)^n &= (\log(ab))^n\\ &= (\log(a)+\log(b))^n \end{align*}
However, after having our tests returned, I found that the teacher reasoned as follows:
\begin{align*} \log(ab)^n &= \log((ab)^n)\\ &= \log(a^nb^n)\\ &= \log(a^n)+\log(b^n)\\ &= n\log(a)+n\log(b) \end{align*}
I thought about asking, but decided to look in the textbook first, and found that the textbook does something like $\log(a+b)^n =n\log(a+b)$, so here I am.
My question is, which expansion is correct? Is one of them more standard than the other, or are they both acceptable interpretations? If you can link to some sources using one way or the other, that would also be appreciated.