Solution (source code)

= Solution

For a double <pole> at $z_0\in\{i,-i\}$, differentiate the remaining holomorphic factor:
$$
\operatorname{Res}(f,z_0)=\left.\frac d{dz}\frac{1+z+z^2}{(z+z_0)^2\sqrt z}\right|_{z=z_0}.
$$
Since $z_0^2=-1$ and $1+z_0+z_0^2=z_0$, this simplifies to
$$
\operatorname{Res}(f,z_0)=\frac{1/8-z_0/2}{\sqrt{z_0}}.
$$
On the selected branch $\sqrt i=e^{i\pi/4}$ and $\sqrt{-i}=e^{3i\pi/4}$, giving
$$
\operatorname{Res}(f,i)=\frac{\sqrt2}{16}(-3-5i),\qquad
\operatorname{Res}(f,-i)=\frac{\sqrt2}{16}(3-5i).
$$
The <residue theorem> therefore gives
$$
\boxed{C=2\pi i\left(-\frac{5i\sqrt2}{8}\right)=\frac{5\pi\sqrt2}{4},\qquad I=\frac{5\pi\sqrt2}{8}.}
$$
The equality $C=2I$ uses the limiting contour integrals established in (c).