In Rudin's Functional Analysis book there is this exercise (Chapter 8, Exercise 1b):
Let $P$ be a polynomial in $\mathbb{C}^n$. Prove that if $$ \int_{T^n} |P| = 0, $$ where $T^n$ is the torus in $\mathbb{C}^n$: $T^n = \{(e^{i t_1},\dots,e^{i t_n})\colon t_i \in \mathbb{R},\ i = 1,\dots,n\}$, then $P$ is identically $0$. (Hint: Compute $\int_{T^n} |P|^2$).
There is something that I don't understand here. Let $n = 1$ and $P(z) = 1$. Then $\int_{T^1} |P| = 0$, however $P \neq 0$. What am I doing wrong?
Edit: I think I know where is my mistake. The integral $\int_{T^1} |P|$ is not complex integral, but rather (is it right?) $$ \int_{T^1} |P| = (2\pi)^{-1} \int_0^{2\pi} |P(e^{i t})| dt. $$ Then, however, what's the point of the exercise? If the above definition is correct, then |P| is non-negative and hence $\int_{T^1} |P| = 0$ if and only if $P = 0$.
What else am I missing?