Solution (source code)

= Solution

The equality with part (i) follows from <Green's theorem>. For the coefficients $P=-1$ and $Q=x^2/(2y)$,
$$
\frac{\partial Q}{\partial x}-\frac{\partial P}{\partial y}=\frac{x}{y}.
$$
They are smooth on a neighborhood of this region, since $y>0$. Thus for the positively oriented boundary,
$$
\boxed{\oint_C P\,dx+Q\,dy=\int_A\frac{x}{y}\,dx\,dy=\frac12.}
$$
The term $-dx$ itself has zero <line integral> around the closed <curve>, although it contributes to the four individual edge integrals.