Q: How to evaluate the contour integral $\int_{z_1}^{z_2}\bar z^ndz$ I'm trying to evaluate $\int_{z_1}^{z_2}\bar z^ndz$ along the straight line $[z_1,z_2]$, where $n \in \mathbb{N}\cup \{0\}$ (I found this problem here).
As has been suggested before there, I've tried to use the linear curve $$z=tz_1+(1-t)z_2, 0\leq t\leq 1$$ 
which leads to  $$\int_{z_1}^{z_2}\bar z^ndz=(z_1-z_2)\int_{0}^{1}(t\bar z_1+(1-t)\bar z_2)^ndz$$
but couldn't get any further. 
Any help will be greatly appreciated.
 A: Use the binomial theorem:
$$(\bar{z_1} t + \bar{z_2} (1-t))^n = \sum_{k=0}^n \binom{n}{k} \bar{z_1}^k \bar{z_2}^{n-k} t^k (1-t)^{n-k} $$
Thus, the integral is
$$(z_2-z_1)\sum_{k=0}^n \binom{n}{k} \bar{z_1}^k \bar{z_2}^{n-k} \int_0^1 dt \, t^k (1-t)^{n-k} = (z_2-z_1)\frac1{n+1} \bar{z_2}^n \sum_{k=0}^n \left (\frac{\bar{z_1}}{\bar{z_2}} \right )^k = \frac1{n+1} (\bar{z_2}^{n+1}-\bar{z_1}^{n+1}) \frac{z_2-z_1}{\bar{z_2}-\bar{z_1}}$$
A: When a function $f:C\to C$ has a continuous complex derivative $f'$, and you restrict its domain to $R$, it is easily shown that for $t\in R$ we have $$Re (f'(t))=\frac {d Re (f(t))}{dt} \land Im f'(t)=\frac {d Im (f(t))}{dt}$$ and that these are continuous in $t$. Therefore $$\int_0^1f'(t)dt=\int_0^1Re (f'(t))dt+i\int_0^1Im (f'(t))dt= \int_0^1\frac {dRe (f(t))}{dt}dt+i\int_0^1\frac {dIm (f(t))}{dt}dt$$ $$=[Re (f(t))]_{t=0}^{t=1}+i[Im (f(t))]_{t=0}^{t=1} = f(1)-f(0).$$ In your question, we can let $f'(z)=(z \bar z_1+(1-z)\bar z_2)^n$ so (obviously) we can let $f(z)=(n+1)^{-1}(\bar z_1-\bar z_2)^{-1}(z\bar z_1+(1-z)\bar z_2)^{n+1}$. And the rest is obvious.
