Given the field $F=(\frac {x+y}{x^2+y^2},\frac {-x+y}{x^2+y^2}$ , calculate $\int_C Pdx+Qdy$ where $C$ is the line $y=\frac{x+25}{7}$ that begins at point $(3,4)$ and ends at $(-4,3)$
What I did was:
First I checked if $P_y=Q_x$ and got $P_y=\frac {x^2-y^2-2xy}{(x^2+y^2)^2}$ and $Q_x=\frac {x^2-y^2-2xy}{(x^2+y^2)^2}$ , since they are equal I can look for the potential function so we need ($\phi(x,y)=(P,Q)$ I integrated $\phi$ with respect to $x$ and got $\int \frac {x+y}{x^2+y^2}$=$\frac {\ln(x^2+y^2)}{2}+\arctan(\frac{x}{y})+C(y)$ then I did the derivative of $\phi$ with respect to $y$ and got $\phi_y=\frac{y-x}{x^2+y^2}+C'(y)$ the I comapred $\phi_y=Q$ , and the result was $\frac{y-x}{x^2+y^2}+C'(y)=\frac{-x+y}{x^2+y^2}$ so the answer is $C'(y)=0$ which means $C(y)=C$ just a constant.
according to the gradient theorem $W=\int_c F\cdot dr=\phi(x_1,y_1)-\phi(x_0,y_0)$
$\phi(x_1,y_1)$=$\phi(-4,3)=\frac{\ln(9+16)}{2}+\arctan(\frac{-4}{3})$
$\phi(x_0,y_0)$=$\phi(3,4)=\frac{\ln(9+16)}{2}+\arctan(\frac{3}{4})$
$W=0.6821-1.256=-0.6435$ which is a wrong answer , It should be $\frac{-\pi}{2}$
what am I doing wrong? Thanks for any help and tips!
Your working is correct but you have some calculation mistakes in the end.
$\phi(-4,3)=\frac{\ln(9+16)}{2}+\arctan(\frac{-4}{3})$
$\phi(3,4)=\frac{\ln(9+16)}{2}+\arctan(\frac{3}{4})$
Line integral is $\phi(-4,3) - \phi(3,4) = \arctan(-\frac{4}{3}) - \arctan(\frac{3}{4})$
$ = - \arctan(\frac{4}{3}) - \arctan(\frac{3}{4}) = - (\frac{\pi}{2} - \arctan(\frac{3}{4})) - \arctan(\frac{3}{4}) = - \frac{\pi}{2}$