# Potential of vector field is undefined on Y-axis although field is defined

I'm having the following vector field:

$$\vec{F}(x,y) = (\frac{-y}{x^2+y^2},\frac{x}{x^2+y^2})$$

The field is conservative in $\mathbb{R}^2 \backslash (0,0)$ as long as your curve doesn't encircle $(0,0)$.

The potential function I received is:

$$\phi(x,y) = -arctan(\frac{x}{y})+C$$

It is clear that on $Y=0$, the potential is undefined.

How can I calculate the line integral from point $(X,0) \rightarrow (-2,2)$ using the potential if it is undefined?

Thank you.

Your potential function needs some tweaking before it can be used in this case. Remembering $$\mathrm{ \arctan\left(z\right)+\arctan\left({1\over z }\right)={\pi\over2} }$$ turn your potential function into $$\mathrm{ \phi(x,y)=\arctan\left({y\over x}\right)+C }$$ which immediately yields the line integral as $$\mathrm{ \phi(-2,2)-\phi(X,0)=-{\pi\over4} }$$
• Clever! Nice one. But isn't the result $3\pi/4$ ? – Kuifje Jul 4 '16 at 16:38
• $-\arctan(-1)+\arctan(\frac{x}{0}) = \pi/4 +\pi/2 -\arctan(0) = 3\pi/4$. – Kuifje Jul 4 '16 at 16:41
• @Taru As we're calculating a definite integral, we may let C=0 which means $\phi(x,y)=\arctan(y/x)$. The integral should be $\phi$(at final point) - $\phi$(at the starting point)=$\phi(2/-2)-\phi(0/X)=-{\pi\over4}-0.$ – Jack's wasted life Jul 4 '16 at 21:02