I am to consider two paths traveled below:
With the following vector field:
$$\vec F = \frac{-y \hat x + x\hat y}{x^2+y^2}$$
And I am to consider the work done going from $(-1,0)$ to $(1,0)$ with the circular and straight path. The work integral is:
$$\int_C \vec F \cdot d\vec r$$
The circular path I find is relatively straightforward (as this vector field looks a lot nicer in polar), however computing the line path is something I have difficulties with. My work integral looks like:
$$W = \int_{C} \frac{-y}{x^2+y^2}dx + \int_{C} \frac{x}{x^2+y^2}dy$$
Where $C_1$ and $C_2$ represent each line of the path for $y=x +1$ and $y=-x+1$.
For the $dx$ integral, I need to work out how $y$ depends on $x$ for each line. I've called for the parametrization $y=x+1$ and $y=x-1$ for the appropriate line.
$$ \int_{C} \frac{-y}{x^2+y^2}dx = - \int_{-1}^0 \frac{x+1}{x^2 + (x+1)^2} + \int_0^1 \frac{-x+1}{x^2 + (-x+1)^2}$$
Apart from this looking quite hard to integrate, online calculators put each at$-\pi/4$. However, the $y$ integral is something that's causing me difficulty. It goes from $0$ to $1$ to $0$, so I'll need to split it up into two integrals, but what parametrization would I use? Would it be $y=x+1 \implies x = y -1$ for one integral and $y = x+1$ for the other? If so, how could I justify this other than a guess? If so, integrating this seemed to produce a messy answer that doesn't seem to look right, but that doesn't mean it's wrong. Is there a more efficient way to go about this?

Along the path: $x+y = 1$
let $x = 1-t, y = t$
$x' = -1, y' = 1$
$\int_0^1 \frac {-y x' + x y'}{x^2 + y^2} \ dt \\ \int_0^1 \frac {1}{t^2 -2t + 1 + t^2} \ dt \\ \int_0^1 \frac {1}{2t^2 - 2t + 1} \ dt \\ \int_0^1 \frac {1}{2(t^2 - t + \frac 14) + \frac 12} \ dt \\ \int_0^1 \frac {1}{2(t - \frac 12)^2 + \frac 12} \ dt $
We need a substitution.
We might have avoided it had we chosen a different peramiterization at the beginning... oh well.
$t - \frac 12 =\frac {1}{2}\tan\theta\\ dt = \frac {1}{2}\sec^2\theta$
$\frac{1}{2}\int_{-\frac {\pi}{4}}^{\frac {\pi}{4}} \frac {\sec^2\theta}{\frac 12 \sec^2\theta} \ d\theta \\ \int_{-\frac {\pi}{4}}^{\frac {\pi}{4}} \ d\theta \\ \frac {\pi}{2}$
And I suspect you will get the identical answer when we look at
$y-x = 1$
In hindsight, $F(x,y)$ is a conservative force.
$\nabla (\arctan \frac yx) = F(x,y)$
Which means that all path integrals with the same endpoints will be the same.