The process of complex integration is the same as that of real integration

27 Views Asked by At

If I compute the complex integral (along $\gamma(t)=e^{it}\,;\;t\in[0,\pi]$) \begin{align*} \int_\gamma z^2dz &=\left[\frac{z^3}{3}\right]_\gamma \\ &=\left[\frac{e^{3it}}{3}\right]_0^\pi=-2/3 \end{align*} But if I expand the integral \begin{align*} \int_\gamma z^2dz&=\int_\gamma([x^2-y^2]+i2xy)(dx+idy)\\ &=\left[\frac{x^3}{3}-2xy^2+i\left(2x^2y-\frac{y^3}{3}\right)\right]_\gamma\\ \label{1} &=-2/3 \end{align*}

What confuses me is when I expand $\frac{z^3}{3}$ \begin{align*} \frac{(x+iy)^3}{3}\neq \frac{x^3}{3}-2xy^2+i\left(2x^2y-\frac{y^3}{3}\right) \end{align*}

But the result of the integral is the same, Why it is true?