Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I'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.