ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Wed, 16 Nov 2011 22:08:44 +0100Arctan(tan(2pi/3))https://ask.sagemath.org/question/8484/arctantan2pi3/i know it looks like the short cut is applicable here. But isn't there a second point on the unit circle with the same tangent as 2pi/3?
**Tan(2pi/3)= -(Sqr.rt. 3)**
There are other places with the same value for tangent. 5pi/3
**Tan(5pi/3)= -(Sqr.rt. 3)**Wed, 16 Nov 2011 20:54:41 +0100https://ask.sagemath.org/question/8484/arctantan2pi3/Answer by kcrisman for <p>i know it looks like the short cut is applicable here. But isn't there a second point on the unit circle with the same tangent as 2pi/3?
<strong>Tan(2pi/3)= -(Sqr.rt. 3)</strong>
There are other places with the same value for tangent. 5pi/3
<strong>Tan(5pi/3)= -(Sqr.rt. 3)</strong></p>
https://ask.sagemath.org/question/8484/arctantan2pi3/?answer=12910#post-id-12910I'm not sure what you're asking. Let us know if this is not it.
sage: arctan(tan(2*pi/3))
arctan(-sqrt(3))
Notice Sage doesn't automatically simplify this, although
sage: arctan(0)
0
sage: arctan(1)
1/4*pi
You have to do this.
sage: arctan(tan(2*pi/3)).simplify()
-1/3*pi
To get other branches, you'll want to think about `arctan2`.
sage: arctan2(tan(2*pi/3),1).simplify()
-1/3*pi
sage: arctan2(-tan(2*pi/3),-1).simplify()
2/3*pi
You can do
sage: arctan2?
for more details.Wed, 16 Nov 2011 22:08:44 +0100https://ask.sagemath.org/question/8484/arctantan2pi3/?answer=12910#post-id-12910