Integrate: $\oint_c (x^2 + iy^2)ds$ How do I integrate the following with $|z| = 2$ and $s$ is the arc length? The answer is $8\pi(1+i)$ but I can't seem to get it.
$$\oint_c (x^2 + iy^2)ds$$

Parametrize $C$ as $\gamma(t) = 2e^{it} = 2(\cos t + i \sin t)$ for $t \in [0, 2\pi]$.
From the definition of the path integral, we have:
$$
\oint_C f(z) \,ds = \int_a^b f(\gamma(t)) \left|\gamma'(t)\right| \,dt
$$
Plug in the given values to get:
\begin{align}
\oint_C (x^2 + iy^2) \,ds &= \int_0^{2\pi} 4(\cos^2{t} + i \sin^2{t})\left| 2ie^{it}\right| \,dt \\
&= 8\left(\int_0^{2\pi} \cos^2 t\,dt + i \int _0^{2\pi} \sin^2 t\,dt\right)
\end{align}
The last 2 integrals should be straightforward. Both evaluate to $\pi$. Hence, the original integral evaluates to $8\pi(i + 1)$.
