Going from polar coor. to cartesian coor.

  • Context: Undergrad 
  • Thread starter Thread starter Marioqwe
  • Start date Start date
  • Tags Tags
    Cartesian Polar
Click For Summary

Discussion Overview

The discussion revolves around the conversion from polar coordinates to Cartesian coordinates, specifically addressing the challenges that arise when dealing with negative values in the Cartesian plane. Participants explore the implications of using the arctangent function and its limitations in determining angles based on quadrant placement.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant presents a scenario involving points (a,b) and (-a,-b), questioning how to return to Cartesian coordinates and suggesting that adding π to the angle could help when both a and b are negative.
  • Another participant notes that the arctangent function is multivalued and emphasizes the need for additional information to determine the correct angle.
  • A later reply confirms that adding π to the angle is appropriate for points in the third quadrant and mentions the use of a non-canonical polar representation with a negative radius.
  • Some participants discuss the advantages of using the atan2 function, which accounts for quadrant placement and avoids issues with division by zero, providing a more comprehensive solution for angle determination.
  • There is a clarification that while atan is not multivalued, it requires knowledge of the signs of the coordinates to yield the correct angle, contrasting it with atan2, which is designed to handle quadrant information more effectively.

Areas of Agreement / Disagreement

Participants express differing views on the properties of the atan and atan2 functions, with some asserting that atan is not multivalued while others argue that it is, depending on the context. The discussion remains unresolved regarding the best approach to handle negative coordinates in polar to Cartesian conversions.

Contextual Notes

Participants mention the limitations of the atan function's range and the need for quadrant information, highlighting the potential for confusion when converting coordinates without a clear understanding of the signs involved.

Marioqwe
Messages
65
Reaction score
4
Hello, I recently run into a problem. Let's say I have the point (a,b) and (-a,-b). The, I know that θ_1 = atan(b/a) and θ_2 = atan((-b)/(-a)) = θ_1.

But, what if I want to go back to Cartesian coordinates? If I assume r = 1,
a = cos(θ_1) and b = sin(θ_1) while
-a = cos(θ_2) and b = sin(θ_2).

I am sure this is very simple and it has to do with the fact that the range of atan is (-π/2,π/2). But is there a way of getting back the -a? Could I just add π to the angle whenever a and b are negatives?
 
Mathematics news on Phys.org
Atan is multivalued, so you need to use more information to get the angle.
 
Marioqwe said:
Hello, I recently run into a problem. Let's say I have the point (a,b) and (-a,-b). The, I know that θ_1 = atan(b/a) and θ_2 = atan((-b)/(-a)) = θ_1.

But, what if I want to go back to Cartesian coordinates? If I assume r = 1,
a = cos(θ_1) and b = sin(θ_1) while
-a = cos(θ_2) and b = sin(θ_2).

I am sure this is very simple and it has to do with the fact that the range of atan is (-π/2,π/2). But is there a way of getting back the -a? Could I just add π to the angle whenever a and b are negatives?

In a word, yes. If a and b are both negative, then the point is in the third quadrant and you would need to add ∏ to atan(b/a) to derive θ_2. [Alternately you could decide to use a non-canonical polar representation with a negative value for r].

And yes, ignoring your sign omission, -a = cos(θ_2) and -b = sin(θ_2).

Some math libraries have a two-argument "atan2" function that figures the quadrants out for you so that the range of the atan2 is the full -∏ (exclusive) to +∏ (inclusive). This function also avoids the divide by zero problem for points on the y axis.

http://en.wikipedia.org/wiki/Atan2
 
I can certainly use atan2. Thank you.
 
Matt Benesi said:
atan isn't multivalued- usually the format is: atan(y/x);

atan2 is multivalued... (wikipedia link to definition of atan2 in terms of extension of atan function)

Multivalued means there is more than one value for the given argument. Atan, like asin and acos are multivalued. Atan2 is also multivalued, but as long as you stay within an interval of 2π you will get a unique answer. For atan the interval is π, so you need to know the sign of y or x to get the right value.
 

Similar threads

  • · Replies 14 ·
Replies
14
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
12
Views
4K
  • · Replies 10 ·
Replies
10
Views
7K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 7 ·
Replies
7
Views
2K