Solution (source code)

= Solution

Take the usual positive, counterclockwise <boundary orientation>; the printed question does not specify one, and reversing it negates the answer. Write the successive corner points as $P=(1,1)$, $Q=(\sqrt2,1/\sqrt2)$, $R=(2,1)$, $S=(\sqrt2,\sqrt2)$. Traverse $P\to Q\to R\to S\to P$, keeping the region on the left.

\Image[/past-exam-of-the-mathematics-course-of-the-university-of-cambridge/2008/ia/paper-3-region.png]
{title=Counterclockwise boundary of the region between two rays and two hyperbolas}

On $PQ$, use $y=1/x$ with $1\le x\le\sqrt2$. Here $dy=-dx/x^2$, so the <line integral> is
$$
I_{PQ}=\int_1^{\sqrt2}\left(-\frac{x}{2}-1\right)dx=\frac34-\sqrt2.
$$
On $QR$, use $y=x/2$ with $\sqrt2\le x\le2$:
$$
I_{QR}=\int_{\sqrt2}^{2}\left(\frac{x}{2}-1\right)dx=\sqrt2-\frac32.
$$
On $RS$, use $y=2/x$ with $x$ decreasing from $2$ to $\sqrt2$:
$$
I_{RS}=\int_2^{\sqrt2}\left(-\frac{x}{2}-1\right)dx=\frac52-\sqrt2.
$$
Finally, on $SP$, use $y=x$ with $x$ decreasing from $\sqrt2$ to $1$:
$$
I_{SP}=\int_{\sqrt2}^{1}\left(\frac{x}{2}-1\right)dx=\sqrt2-\frac54.
$$
Adding all four <line integrals> gives \b[$\oint_C(x^2/(2y))\,dy-dx=1/2$] for the positive orientation, or \b[$-1/2$] for the reverse orientation.