Does $\log(ab)^n$ equal $(\log(a)+\log(b))^n$ or $n\log(a)+n\log(b)$? 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 &amp;= (\log(ab))^n\\
&amp;= (\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 &amp;= \log((ab)^n)\\
&amp;= \log(a^nb^n)\\
&amp;= \log(a^n)+\log(b^n)\\
&amp;= 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.
As I mentioned in my comment, there is no conceptual misunderstanding at play here, but one of notational convention. I do not like the notation $\log x^n$ myself, precisely because of the confusion that the OP outlined: does it mean $(\log x)^n$ or $\log (x^n)$?  It is best to disambiguate the expression by providing more context -- using an extra pair of parenthesis. 

However, if we really must make sense out of that expression -- let&rsquo;s say it appears in a test -- this is usually decided based on an &ldquo;order of precedence&rdquo; of logarithm and exponentiation. Of course, this order is again arbitrary, but for the sake of giving a more concrete answer: 


  I think the &ldquo;usual&rdquo; practice is to assign exponentiation a higher precedence than operations like log, sin, cos etc. For instance, according to this order, $\sin x^{-3}$ means $\sin (x^{-3})$ and $\log x^2$ means $\log (x^2)$, which agrees with your textbook/teacher and differs from your interpretation. (Sorry! :-))  


However I will be quick to add that while the rule I just mentioned might be one convention, I do not know if this is the only one. Even if that is the case, the notation seems ambiguous enough that you should avoid it whereever possible.
I think your answer was wrong, as your assumption would be correct having either $\log^n(ab)$  or $(\log(ab))^n$.

The right answer matches the one of your professor:

$$ \log((ab)^n) = n \log(ab) = n(\log(a) + \log(b)) = n\log(a) + n\log(b) $$