# Conservative vector field?

## Main Question or Discussion Point

Let $f(x,y) = ( \frac{-y}{x^2 + y^2}, \frac{x}{x^2 + y^2})$ with $f : D \subset \mathbb{R}^2 \to \mathbb{R}^2$

I know if I take $D = D_1 = \mathbb{R}^2 - \{ (0,0) \}$ the vector field is not conservative, for the circulation over a circunference centered at the origin does not equal zero.

But let's see what happens if I take $D = D_2 = \{(x,y) \in \mathbb{R}^2 : (x,y) \neq (0,a), a \geq 0\}$, that is $\mathbb{R}^2$ without the ray starting at the origin and going in the positive-y axis.

With $D_2$ one has $f$ has to be conservative, because the domain is simply connected, and it satisfices the necesary condition (jacobian continuous and symmetric). So together they satisfty a sufficient condition.

The problem arises when I want to calculate the potential function. I get

$\phi'_x = \frac{-y}{x^2 + y^2}$
$\phi'_y = \frac{x}{x^2 + y^2}$
so
$\phi \approx - \arctan(\frac{x}{y}) + c(y)$
$\phi \approx \arctan(\frac{y}{x}) + c(x)$

And can't see how to get the expression for the potential function.
Is it $\phi(x,y) = \arctan(\frac{y}{x}) - \arctan(\frac{x}{y}) + c$ ?

Any idea what is happening here?
Thanks!

Do you remember the trig identity $\arctan(x)+\arctan(\frac{1}{x})=\frac{\pi}{2}$? Your expressions are in fact consistent :P The potential function $\arctan(x)+C$ works fine.

* I mean the potential function $\phi(x, y)=\arctan(\frac{y}{x})+C$.

Hi identity1,
Some things still I don't understand.
That equation $\arctan(x) + \arctan(\frac{1}{x}) = \frac{\pi}{2}$ seems to work only for positive real values of x, since for example
$\arctan(-2) + \arctan(\frac{-1}{2}) = \frac{-\pi}{2}$

Say, for example, I want to calculate the circulation of $f$ with domain $D_2$ from a curve that starts at $A = (-1,1)$ and ends at $B=(1,1)$

If I use $\phi_1(x,y) = -\arctan(\frac{x}{y}) + C$
$\phi_1(B) - \phi_1(A) = \frac{\pi}{4} + \frac{\pi}{4} = \frac{\pi}{2}$

Instead if I use $\phi_2(x,y) = \arctan(\frac{y}{x}) + C$
$\phi_2(B) - \phi_2(A) = -\frac{\pi}{4} - \frac{\pi}{4} = \frac{-\pi}{2}$

So it changes the sign for the same curve oriented in the same direction from A to B.

Something seems to be wrong, the sign shouldn't change, doesn't it?
Thanks.