The field is the classic $$F (x,y,z) = \left( \frac{-y}{x²+y²}, \frac{x}{x²+y²},0\right)$$
And the surface is the space between $x² + y² =1$ and $x+y=1$ at $z=0$
Since $ \nabla \times F = 0 $ and the border of the region doesn't go through $(0,0,0)$ Stoke's theorem should apply and $ \int _C F \,dS = 0$ but I can't get there.
I'm taking $$C = \left\{ (\cos \theta, \sin \theta, 0) , 0 \leq \theta \leq \frac{\pi}{2} \right\} \cup \left\{ (t, 1-t,0) , 0 \leq t \leq 1 \right\}$$
So, \begin{align*} \int_C F ds &= \int_0 ^{\pi/2} (-\sin \theta, \cos \theta, o)\cdot(-\sin \theta, \cos\theta, 0) \,d\theta \\ &\qquad\quad + \int _0 ^1 \left(\frac{t-1}{2t^2 +2t+1}, \frac{t}{2t^2+ 2t+1},0\right) \cdot (1,-1,0) \,dt \\ \\ &= \int_0 ^{\pi/2}1\,d\theta - \int _0 ^1 \frac{dt}{2t^2 -2t +1}\,dt \\ \\ &= \frac{\pi}{2}-\alpha. \end{align*} I couldn't solve the actual second integral to get what $\alpha$ is (maybe a sign that I did something horribly wrong before that) but according to wolfram alpha it's $$\frac{2\tan^{-1}\sqrt 7}{\sqrt 7,}$$ which comes up at something like $0.914243,$ which is certainly not $\frac{\pi}{2}.$
I've been thinking for a while now, and can't find a reason why Stoke's theorem wouldn't be satisfied under this conditions, nor an error in how I described $C$, but I'm pretty sure one of those happened.
Any help would be greatly appreciated.
First the integral over the segment of the circle, the tangent vector is $(-y,x)$ so when you dot product this with your field you get $1$, and so the integral is just the arc length which is $\frac{\pi}{2}$.
Now for the integral over the line segment you already have you need to product with a unit vector, $(1,-1)$
Thus your integral is
$$\int_0^1 \frac{dx}{2x^2-2x+1} =\frac{1}{2}\int_0^1 \frac{dx}{(x-\frac{1}{2})^2+\frac{1}{4}} =\frac{1}{2}\int_{-\frac{\pi}{4}}^{\frac{\pi}{4}} \frac{\frac{1}{2}\sec^2\theta}{\frac{1}{4}\sec^2\theta}d\theta =\frac{\pi}{2}$$