Re: ArcTan[1/0] no result, but ArcTan[Infinity] ok. How to resolve?
- To: mathgroup at smc.vnet.net
- Subject: [mg57011] Re: ArcTan[1/0] no result, but ArcTan[Infinity] ok. How to resolve?
- From: "Scout" <user at domain.com>
- Date: Thu, 12 May 2005 02:33:26 -0400 (EDT)
- References: <email@example.com>
- Sender: owner-wri-mathgroup at wolfram.com
1 / 0 gets rightly : 'Infinite expression'. In fact that rapresentation is symbolically entered in Math as 'Infinity'. So, if you want to write 1/0 you have just to enter Infinity symbol. Otherwise, if you have an expression like 1/x and calculate Limit[ArcTan[1/x],x->0] you get Pi/2, as you expected. ~Scout~ "steve" <nma124 at hotmail.com> ha scritto nel messaggio news:d5mukl$dru$1 at smc.vnet.net... > hi; > Mathematica 5.1, on windows. > > ArcTan[1/0] gives an error but > ArcTan[Infinity] gives the correct answer. > > One way to make ArcTan[1/0] give Pi/2 is to > write it as ArcTan[0,1]. > > I do know that 1/0 is DirectedInfinity with > unknown direction while Infinity is > DirectedInfinity, and that is probably the > reason that ArcTan[1/0] gives an error > but ArcTan[Infinity] does not. > > I am asking is how to make 1/0 result in DirectedInfinity > to avoid the error? is this possible? > > What function do I need to wrap 1/0 with to > cause it to become Infinity instead of > Infinity ? or may be I need to figure how > to detect if a division results in Infinity > and convert that to Infinity? do I need > to redfine 1/0 somehow? may be make a new > rule to say if Mathematica see 1/0 expression then > make it Infinity? but may be this will screw > other things? > > Or may I should not mess with this stuff and > just change the code to ArcTan[x,y] instead of > ArcTan[y/x] and be happy? > > thanks, > Steve >