Evaluate the contour integral (Most likely without Green's Theorem) $\int_{c}\frac{-y}{x^2+y^2}dx + \frac{x}{x^2+y^2}dy$ where $C$ is the triangle with vertices at $(5,5), (-5,5),$ and $(0,-5)$ traversed counterclockwise. (Hint: Be careful about the hypotheses of any theorem you use).
My attempt: It appears clear that we cannot use Green's theorem here, as the functions are not defined at the origin. Hence, we can break the line integral into three distinct line integrals. For the line between $(5,5)$ and $(-5,5)$, we can substitute $y=5$ into the integral and solve, for the line between $(0,-5)$ and $(5,5)$ we can substitute $y= 2x-5$, and for the final line we can substitute $y = -2x-5$.
My trouble comes with attempting to evaluate the first integral
$\int_{-5}^5\frac{-5}{x^2+25}dx + \frac{x}{x^2+25}dy$.
Can I simplify this to
$\int_{-5}^5\frac{1}{x+5}dx$?
This would give an integral that does not converge, I believe.
Any help greatly appreciated!
 A: Parameterizing by using the $x$ coordinate as the parameter, we have
$$\begin{align}
\oint_{\partial \mathbb{D}} \left(\frac{-y}{x^2+y^2}\,dx+\frac{x}{x^2+y^2}\,dy\right)&=\int_0^5\left(\frac{-(2x-5)}{x^2+(2x-5)^2}\,dx+\frac{x}{x^2+(2x-5)^2}\,2\,dx\right)\\\\&+\int_{5}^{-5}\left(\frac{-5}{x^2+25}\,dx\right)\\\\&+\int_{-5}^0 \left(\frac{-(-2x-5)}{x^2+(2x+5)^2}\,dx+\frac{x}{x^2+(2x+5)^2}\,(-2)\,dx\right)\\\\&=5\int_0^5 \frac{1}{x^2+(2x-5)^2}\,dx\\\\
&+10\int_0^5 \frac{1}{x^2+25}\,dx\\\\
&+5\int_{-5}^0 \frac{1}{x^2+(2x+5)^2}\,dx\\\\
&=10\int_0^5 \left(\frac{1}{x^2+(2x-5)^2}+\frac{1}{x^2+25}\right)\,dx \\\\
&=10\left(\frac{3\pi}{20}+\frac{\pi}{20}\right)\\\\
&=2\pi
\end{align}$$

NOTE: 
We could have exploited Green's Theorem by deforming the original contour with the classical "keyhole" that removes the origin with a circular contour of radius $\epsilon$.  Then, transforming to polar coordinates reveals
$$\begin{align}
\oint_{\partial \mathbb{D}} \left(\frac{-y}{x^2+y^2}\,dx+\frac{x}{x^2+y^2}\,dy\right)&=\int_{\sqrt{x^2+y^2}=\epsilon} \left(\frac{-y}{x^2+y^2}\,dx+\frac{x}{x^2+y^2}\,dy\right)\\\\
&=\int_0^{2\pi }\frac{\epsilon}{\epsilon^2}\,\epsilon\,d\phi\\\\
&=2\pi
\end{align}$$
as expected!
A: Oh, dear!  You need to review your algebra!  You seem to think that $\frac{x- 5}{x^2+ 25}$ can be written as $\frac{x- 5}{(x- 5)(x+ 5)}$.  You are confusing $x^2+ 5$ with $x^2- 5$.  $x^2- 5$ can be factored as $(x- 5)(x+ 5)$.  $x^2+ 5$ cannot be factored (with real number coefficients).
The vertices of the triangle are (5,5), (-5,5), and (0, 0) so the three sides can be written
(a)From (5, 5) to (-5, 5): y= 5 so dy= 0.
The line integral is $\int_5^{-5} \frac{-5}{x^2+ 25}dx$
That's an "arctangent".
(b)From (-5, 5) to (0, 0): y= -x so dy= -dx.
The line integral is $\int_{-5}^0\frac{x}{2x^2}dx+ \int_{-5}^0 \frac{-x}{2x^2}(-dx)= 2\int_{-5}^0 \frac{1}{x}dx$
(c)From (0, 0) to (5, 5): y= x so dy= dx.
The line integral s $\int_0^5\frac{x}{2x^2}dx+ \int_0^5\frac{x}{2x^2}dx= 2\int_0^5 \frac{1}{x}dx$
A: Use the path $(x,y)=(5-10t,5)$, where $t\in [0,1]$. Then you have 
$$dx=-10dt, \;dy=0.$$
So the integral becomes 
$$\int_5^{-5}\frac{50dt}{(t-10t)^2+25}=\pi/2.$$
A: Let $\theta(t)$ and $r(t)$ be continuous functions. If you integrate $\mathbf{a}(x,y)=\left(\frac{-y}{x^2+y^2}, \frac{x}{x^2+y^2}\right)$ along the curve $X(t)=r(t)(\cos\theta(t),\sin\theta(t))$ from $t=t_0$ to $t=t_1$, then
$$
\int_X \mathbf{a}\cdot ds = \theta(t_1)-\theta(t_0),
$$
which is the difference of angles.$^1$ Thus given line integral is $2\pi$, because it circulated once.

$^1$ Hong Jong Kim (2012). "미적분학 2". Seoul: 서울대학교출판문화원. pages 564-565.
A: Your are right. Green's Theorem can't apply in this case directly. Let $F(x,y)=\left( \frac{-y}{x^{2} + y^{2}},\frac{x}{x^{2} + y^{2}} \right)$. $F(x,y)$ is not defined in the origin, so let's draw a little circle around $(0,0)$ that is bounded by the triangle. We can parametrize the circunference by
$$\gamma(t)=(a \cos t , a \sin t )$$
where $t$ goes from $0$ to $2 \pi$. Now, let's call $D$ the region bounded by the boundary of the triangle and our little circunference $\gamma$. Now we can appliy Green's Theorem, since $D$ does not contain the origin. So we can therefore say that
$$\int \int_D \left( \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right)  = \int_T F(x,y) - \int_\gamma F(x,y)$$
where $P = \frac{-y}{x^{2} + y^{2}}$, $Q = \frac{x}{x^{2} + y^{2}}$,$T$ is the contour defined by the boundary of the triangle, and the minus sign comes from the fact that we need our circumference to be parametrized counterclockwise and that's not how the parametrization I gave traverse it, so I changed the sign. Computing the partial derivatives (both are equal) we get that
$$\begin{align*}
 \int_T F(x,y) &  = \int_\gamma F(x,y) = \int_0^{2\pi } \langle F(\gamma(t), \gamma'(t) \rangle dt \\
& = \int_0^{2\pi } \langle \left( \frac{-a\sin t}{a^2}, \frac{a\cos t}{a^2} \right)  ,\left(- a\sin t, a\cos t  \right)   \rangle dt\\
&  =\int_0^{2\pi }\left( \sin ^{2} t  + \cos ^{2} t \right)dt\\
& = 2\pi
\end{align*}$$
