When we move from cartesian to polar we have:
$\arctan(\frac{-y}{-x})=\theta-\pi$
$\arctan(\frac{y}{-x})=\theta+\pi$
For the first case I under the geometry explanation but why we add $\pi$ in the second case?
When we move from cartesian to polar we have:
$\arctan(\frac{-y}{-x})=\theta-\pi$
$\arctan(\frac{y}{-x})=\theta+\pi$
For the first case I under the geometry explanation but why we add $\pi$ in the second case?
On
The sign of $\pi$ here is chosen based on the desired range; in this case, we wish for the range to be from $-\pi$ to $\pi$, which is convenient because the numbers don't get large in either direction. If you subtract for the second case as well, the resulting range would be $-3\pi/2$ to $\pi/2$.
When changing to polar coordinates, if $x,y>0$, $(x,y)$ is mapped to $(r,\theta)$, where $r=\sqrt{x^2+y^2}$ and $\theta=\arctan\left(\frac{y}{x}\right)$. The point $(-x,y)$ will then be in the second quadrant, so will be mapped to $(r,\pi-\theta)$. The point $(-x,-y)$ will be in the third quadrant, so will be mapped to $(r,\pi+\theta)$.