Two different formulas for determining the angle in polar coordinate system

101 Views Asked by At

Given a coordinate $\left(x,y\right)$ in Cartesian system ,where $x=r\cos(\theta)$, $y=r\sin(\theta)$ and $r^{2}=\sqrt{x^{2}+y^{2}}$.

I've seen lots of formulas for calculating $\theta$,Wikipedia states the angle $\theta$ is calculated by the following formula:

$${\displaystyle \varphi ={\begin{cases}\arccos \left({\frac {x}{r}}\right)&{\mbox{if }}y\geq 0{\mbox{ and }}r\neq 0\\-\arccos \left({\frac {x}{r}}\right)&{\mbox{if }}y<0\\{\text{undefined}}&{\mbox{if }}r=0.\end{cases}}}$$

This reference states the angle $\theta$ is calculated by

$$\arctan\left(\frac{y}{x}\right) \;\;\text{if}\;\; x>0 \;\;\;\;\;\;\text{and}\;\;\;\;\;\;\;\; \arctan\left(\frac{y}{x}\right)+\pi \;\;\text{if}\;\; x<0 \text{ and } y \ge 0$$

However these two are should give the same answer, consider the coordinate $\left(4,-3\right)$.

One gives $-\arccos\left(-\frac{4}{5}\right)$, the other gives $\arctan\left(-\frac{3}{4}\right)$,which are not the same.(I assumed $r\le0$) and the real answer is $\pi-\arctan\left(\frac{4}{3}\right)$.

Can someone explain why the answers are not the same?and give me a formula which work for all conditions?


The question comes from Thomas calculus book

enter image description here

1

There are 1 best solutions below

5
On

No, the first formula gives $-\arccos\frac45$. Indeed$$x=4,\,y=-3<0\implies r=5,\,\varphi=-\arccos\frac{x}{r}.$$