开发者

How do I compute ∞/∞ correctly in Mathematica?

I had tri开发者_StackOverflow社区ed the code below in Mathematica 8:

f[z_] := (5 + 1/(z-a)) / ( 8 + 1/(z-a))

f[a]

and surprisingly I got following warnings:

Power::infy: Infinite expression 1/0 encountered. >>
Power::infy: Infinite expression 1/0 encountered. >>
Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. >

and the output is Indeterminate, which I think is not true because obviously it's 1.

What's weird is that when I changed the code to:

Simplify[(5 + 1/(z-a)) / ( 8 + 1/(z-a))] /. a -> z

I got the correct output 1. Why is that? And how should I deal with expressions involving ∞/∞ ?


Usually:

Limit[(5 + 1/(z - a))/(8 + 1/(z - a)), z -> a]
(*
-> 1
*)

Edit

You may also add a Direction option to take the limit coming from either side if necessary:

Limit[(5 + 1/(z - a))/(8 + 1/(z - a)), z -> a, Direction -> 1]

or

Limit[(5 + 1/(z - a))/(8 + 1/(z - a)), z -> a, Direction -> -1]

Edit 2

The weird behavior of Simplify[ ] (allowing some mathematically indefinite expressions to evaluate) is well documented in the help:

How do I compute ∞/∞ correctly in Mathematica?


No, ∞/∞ is undefined. Consider that 2 ( ∞/∞ ) = (2∞/∞) = ∞/∞, which could be massaged to make 1 = 2 if ∞/∞ were defined as 1.


Infinity is not a number, so operations with it are pointless if you treat it as one:

infinity + 1 = infinity
(infinity + 1) - infinity = infinity - infinity
1 = 0

Other than that, limits are not always equal to the function's value, which is what Mathematica is hinting at when it gives you the error.


Infinity is not necessarily equal to infinity. Therefore, you cannot make the assertion that "infinity/infinity = 1".


Dividing infinity by infinity is indeed indeterminate. Taking the limit of f(x)/g(x) where f and g tend to infinity might produce an actual limit (or it might not). In your case the limit happens to be 1.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜