Are we not allowed to start questions with the word 'hello'?
None the less, hello. Here $\gamma$ is a counterclockwise circle of radius $r>0$ with centre $z_0 \in \mathbb{C}$. Consider the following integral. $\int_\gamma \text{Re}\big((z-z_0)^n\big)dz$. This is how I computed it, but I know that my answer is wrong. What is my mistake? I DO NOT want the solution to be given to me. I only want my mistake pointed out.
Define $f: \mathbb{C} - \{z_0\} \rightarrow \mathbb{C}$ by $f(z)=(z-z_0)^n$ for all $z \in \mathbb{C}-\{z_0\}$. We parameterize $\gamma$ via the map $w:[0, 2\pi] \rightarrow \mathbb{C}$ defined by $w(t)=z_0 + re^{it}$ for all $0 \leq t \leq 2\pi$. Let \begin{align*} I_0 &= \int_\gamma f(z) dz,\\ I_1 &= \int_\gamma \text{Re}(f(z))dz,\\ I_2 &= \int_\gamma \text{Im}(f(z))dz. \end{align*} We want to compute $I_1$. We will show $I_1 = 0$. Note that \begin{align*} I_0 &=I_1 + iI_2. \tag{1} \end{align*} Case 1: $n=-1$ Then we have \begin{align*} I_0 &= \int_\gamma \frac{1}{z-z_0} dz\\ &=\int_0^{2\pi} \frac{1}{w(t)-z_0}w'(t)dt\\ &=\int_0^{2\pi} \frac{1}{(z_0 +re^{it})-z_0}(z_0+re^{it})'dt\\ &=\int_0^{2\pi} \frac{1}{re^{it}}ire^{it}dt\\ &=i \int_0^{2\pi} dt\\ &= 2\pi i. \tag{2} \end{align*} Comparing the real parts of (1) and (2), we conclude that $I_1 = 0$.
Case 2: $n \neq -1$ Note that in this case, $f$ has an antiderivative. Namely the map $F:\mathbb{C} - \{0\} \rightarrow \mathbb{C}$ defined by $F(z)=(z-z_0)^{n+1}/(n+1)$ for all $z \in \mathbb{C} - \{0\}$. We conclude that \begin{align*} I_0 &= 0. \tag{3} \end{align*} Comparing the real parts of (1) and (3), we conclude that $I_1 = 0$.
The problem is $I_1$ is not necessarily real, roughly because the part $dz$ is complex.