Ondrej might be able to answer better, as he implemented this, but the
work-horse of the limit() function is the Gruntz algorithm, from Dominik
Gruntz's PhD thesis (http://www.cybertester.com/data/gruntz.pdf). limit()
is gruntz() plus some heuristics.

My guess is that either the Gruntz algorithm is not well suited to
oscilating functions, or else the relevant parts are not implemented.

Aaron Meurer


On Sun, Nov 18, 2012 at 7:53 AM, Ilya Schurov <[email protected]>wrote:

> Hi, Ondrej,
>
> Are there any known reasons why it works like this? Any ideas how to fix
> it?
>
> --
> I.V.
>
>
> On Wednesday, November 14, 2012 12:42:33 AM UTC+4, Ondřej Čertík wrote:
>
>> Hi Ilya,
>>
>> On Sun, Nov 11, 2012 at 12:43 PM, Ilya Schurov <[email protected]>
>> wrote:
>> > http://code.google.com/p/**sympy/issues/detail?id=3500<http://code.google.com/p/sympy/issues/detail?id=3500>
>> >
>> > In [2]: limit((n+cos(n))/n,n,oo)
>> > Out[2]: nan
>> >
>> > Should be 1, due to cos(n) is limited.
>> >
>> > It seems that there are problems with calculating limits of oscillating
>> > functions, e.g.
>> >
>> > In [3]: limit(cos(n),n,oo)
>> > Out[3]: cos(∞)
>> >
>> > Which should return nan instead or show that there is no limit in other
>> way.
>>
>> You are right, the oscillating functions don't work as they should.
>> Thanks for reporting it.
>>
>> Ondrej
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/sympy/-/Cb26ChOqDqQJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> 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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy?hl=en.

Reply via email to