Ask Your Question
1

arctan of infinity is undefined

asked 2011-03-25 22:35:55 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Using the following code for an equation, I get an undefined result for arctan(oo):

sage: var('t, p, w')
(t, p, w)
sage: a = w^2
sage: b = w
sage: k = b/a
sage: phi = arctan(k)
sage: a = lim(k, w=0)
sage: a
Infinity
sage: lim(phi, w=0) # should be pi/2 ?
und
sage: b = oo
sage: arctan(b)
1/2*pi
sage: a==b
True
sage: arctan(a)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
...
TypeError: cannot coerce arguments: no canonical coercion from The Unsigned Infinity Ring to Symbolic Ring

What is wrong?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
3

answered 2011-03-25 23:13:12 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

The key here is the error message:

TypeError: cannot coerce arguments: no canonical coercion from The Unsigned Infinity Ring to Symbolic Ring

Sage has several kinds of infinity. The usual kind is oo. But there is also an unsigned one, the sort of thing that happens at vertical asymptotes that Churchill referred to.

sage: lim(1/x^2,x=0)
+Infinity
sage: lim(1/x,x=0)
Infinity

Perhaps annoyingly,

sage: Infinity
+Infinity

But anyway,

sage: arctan(oo)
1/2*pi
sage: arctan(-oo)
-1/2*pi

So there is no canonical answer. To recap:

sage: oo in SR
True
sage: -oo in SR
True
sage: lim(1/x,x=0) in SR
False

To the other question implicit in the post:

sage: lim(arctan(1/x),x=0,dir='+')
1/2*pi
sage: lim(arctan(1/x),x=0,dir='-')
-1/2*pi

So no, the limit you marked with "# should be pi/2 ?" should be und, or undefined.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2011-03-25 22:35:55 +0100

Seen: 1,409 times

Last updated: May 13 '11