On Fri, Mar 18, 2011 at 2:44 PM, Sherjil Ozair <sherjiloz...@gmail.com>wrote:

> Hello Hector,
>
> limit(sin(x),x,oo) means sin(x) evaluated, as x approaches to infinity from
> default positive side.
>

My apologies. I read it as sin(x)/x .


> It is an oscillatory limit, equal to k and not k/oo, where k can be
> anything in [-1,1].
> The answer should be Nan, and not an error, as then, sympy would be more
> robust, and users will be able to use the math.isnan() function to check if
> a limit is defined or undefined.
>

But why should it be NaN?
As far as my little knowledge goes, NaN should be of the form 0/0 or oo/oo
or 0*oo or 0**0 or 1**oo or oo**0.
http://en.wikipedia.org/wiki/NaN ( Creation )

lim(sin(x),x,oo) is definitely not any of these types.


>
> Regards,
> Sherjil
>
>
While checking for this things, I find something really wearied.

In [33]: import sympy as syp

In [34]: syp.limit(syp.abs(x)/x,x,0,dir='+')
Out[34]: 1

In [35]: syp.limit(syp.abs(x)/x,x,0,dir='-')
Out[35]: -1

In [36]: syp.limit?
Type:        function
Base Class:    <type 'function'>
String Form:    <function limit at 0x8f7b64c>
Namespace:    Interactive
File:        /usr/lib/pymodules/python2.6/sympy/series/limits.py
Definition:    syp.limit(e, z, z0, dir='+')
Docstring:
    Compute the limit of e(z) at the point z0.

    z0 can be any expression, including oo and -oo.

    For dir="+" (default) it calculates the limit from the right
    (z->z0+) and for dir="-" the limit from the left (z->z0-). For infinite
z0
    (oo or -oo), the dir argument doesn't matter.


Now mathematically, limit x tending to 0, abs(x)/x should not exist. But
SymPy doesn't warn about this during its execution nor in the documentation.
This might be confusing for complete beginner or in other cases.



>
> On Fri, Mar 18, 2011 at 2:34 PM, Hector <hector1...@gmail.com> wrote:
>
>>
>>
>> On Fri, Mar 18, 2011 at 4:57 AM, Aaron S. Meurer <asmeu...@gmail.com>wrote:
>>
>>> For issue 2200, we didn't decide if limit(sin(x), x, oo) should raise an
>>> error or should return nan (or something else).
>>>
>>
>> Hello everyone,
>>
>> Hi Aaron, I was wondering why limit(sin(x),x,oo) should have any other
>> value than 0 ?
>> Is it not equal to  k/oo where k is some finite number in [-1,1], which
>> clearly tends to zero ?
>> Please tell me is there any flow in my thinking or if I am missing
>> something or is it because something related to SymPy.
>>
>>
>>
>>> Aaron Meurer
>>>
>>> On Mar 17, 2011, at 1:25 PM, Chris Smith wrote:
>>>
>>> > SherjilOzair wrote:
>>> >> Mr. Ronan,
>>> >> You've been a great help. Please help me start up my suggesting me a
>>> >> small project or patch.
>>> >> I would be very grateful.
>>> >>
>>> > Issue 2180, 2198 or 2200.
>>> >
>>> > --
>>> > You received this message because you are subscribed to the Google
>>> Groups "sympy" group.
>>> > To post to this group, send email to sympy@googlegroups.com.
>>> > To unsubscribe from this group, send email to
>>> sympy+unsubscr...@googlegroups.com.
>>> > For more options, visit this group at
>>> http://groups.google.com/group/sympy?hl=en.
>>> >
>>>
>>> --
>>> You received this message because you are subscribed to the Google Groups
>>> "sympy" group.
>>> To post to this group, send email to sympy@googlegroups.com.
>>> To unsubscribe from this group, send email to
>>> sympy+unsubscr...@googlegroups.com.
>>> For more options, visit this group at
>>> http://groups.google.com/group/sympy?hl=en.
>>>
>>>
>>
>>
>> --
>> -Regards
>> Hector
>>
>> Whenever you think you can or you can't, in either way you are right.
>>
>>  --
>> You received this message because you are subscribed to the Google Groups
>> "sympy" group.
>> To post to this group, send email to sympy@googlegroups.com.
>> To unsubscribe from this group, send email to
>> sympy+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/sympy?hl=en.
>>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To post to this group, send email to sympy@googlegroups.com.
> To unsubscribe from this group, send email to
> sympy+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/sympy?hl=en.
>



-- 
-Regards
Hector

Whenever you think you can or you can't, in either way you are right.

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To post to this group, send email to sympy@googlegroups.com.
To unsubscribe from this group, send email to 
sympy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to