Computing arctan in the range $-\pi\leq \theta\leq\pi$

86 Views Asked by At

Here is the problem:

For each set of Cartesian coordinates (1-4) $(x, y)$, match the equivalent set of Polar coordinates (A-D) $(r, \theta)$, with $-\pi\leq \theta\leq \pi$.

  1. $(-5.9, 2.9)$
  2. $(-2.9, 6.1)$
  3. $(5.4, 3.3)$
  4. $(-6.9, 6.1)$

A. $(6.5742, -1.1139)$

B. $(6.3285, 1.0223)$

C. $(6.7543, -0.4438)$

D. $(9.2098, -0.8469)$

I have no issue with calculating the $r$ values, but I'm having trouble calculating the $\theta$ values. for example, for 1. I do:

$\theta = \tan^{-1}\left(\frac{y}{x}\right) = \tan^{-1}\left(\frac{2.9}{-5.9}\right) = -0.4568$

but I know that the answer is supposed to be $\theta = -1.1139$. How would I get to that number from the value I calculated in my calculator?

1

There are 1 best solutions below

0
On

The angles in the polar forms are all wrong.

The point $(-5.9, 2.9)_\text{Cartesian}$ is (1) in the 2nd quadrant, so has $\pi/2 = 1.57{\dots} < \theta < \pi = 3.14{\dots}$ and (2) is close to the point $(-6,3)_\text{Cartesian}$, which has polar angle $5\pi/6 = 2.6189{\dots}$.

If you just compute $\arctan(2.9/-5.9) = -0.45684{\dots}$, you can only get angles in quadrants 1 and 4 (because arctangent only gives angles in $(-\pi/2, \pi/2)$). Since tangent has period $\pi$, there is always another angle in quadrants 2 or 3 having the same arctangent. In this case, we use the signs of the coordinates to discover that the angle we want is in quadrant 2. To get from quadrant 4 to quadrant 2 (remaining in the interval of angles $[-\pi, \pi]$) we must add one copy of the period, $\pi$, obtaining $$ \arctan(2.9/-5.9) + \pi = 2.6847{\dots} \text{.} $$

If you had a point in quadrant 3, i.e., if both Cartesian coordinates are negative: To get to quadrant 3 from quadrant 1, remaining in the interval of angles $[-\pi,\pi]$, subtract $\pi$.

$(-2.9,6.1)_\text{Cartesian}$ should have polar angle $2.0145{\dots}$.

$(5.4,3.3)_\text{Cartesian}$ should have polar angle $0.54854{\dots}$. $(5.4,3.3)_\text{Cartesian}$ is between the $x$-axis and the line $y = x$, so should have a positive polar angle of less than $45^\circ = \pi/4 = 0.78539{\dots}$

$(-6.9,6.1)_\text{Cartesian}$ has polar angle $2.4176{\dots}$.