Ask Your Question

Revision history [back]

It could equally well return -pi/2:

sage: arctan(+Infinity)
1/2*pi
sage: arctan(-Infinity)
-1/2*pi

The limit as x -> pi/2 is undefined, because the limits from above and below are not equal:

sage: limit(arctan(tan(x)),x=pi/2)
und
sage: limit(arctan(tan(x)),x=pi/2,dir='+')
-1/2*pi
sage: limit(arctan(tan(x)),x=pi/2,dir='-')
1/2*pi