Solution (source code)

= Solution

For a piecewise continuously differentiable <contour> $\gamma:[a,b]\to U$, the <contour integral> is defined by
$$
\boxed{\int_\gamma f(z)\,dz=\int_a^b f(\gamma(t))\gamma'(t)\,dt.}
$$
If the contour has corners, integrate on its finitely many differentiable pieces and sum the results. The integral on the right is taken componentwise as an ordinary real-parameter integral of a complex-valued function. The factor $\gamma'(t)$ encodes both the speed and orientation of the <contour>.