25.02.2011 07:41, Ondrej Certik пишет:
On Thu, Feb 24, 2011 at 7:34 PM, Chris Smith<[email protected]>  wrote:
And (as I understand Ronan's tendency) if we can't provide O(x) then
we can't provide "asymptotic expansion" upon the whole. (only some terms,
that  generally speaking is neither "asymptotic expansion", nor

An order term is always returned now.

Until we can represent O at x0!=0 the origin is simply shifted to x0 as it says 
in the docstring.

If you want the "unshifted, but not fully functional" form you can use the 
keyword sudo=True:

    h[1]>>>  cos(x).series(n=2)
    1 + O(x**2)
    h[2]>>>  cos(x).series(x,1,n=2)
    -x*sin(1) + cos(1) + O(x**2)
    h[3]>>>  cos(x).series(x,1,n=2,sudo=True)
    (1 - x)*sin(1) + cos(1) + O((x - 1)**2)

I think that the above is ok with me for now. I would push your branch
in and improve upon it. Let's wait if there are any more objections,
and if not, let's do it.

Ondrej



I think, "sudo" must be True by default for end-user (or/and therefore with other name-token):

>      h[2]>>>  cos(x).series(x,1,n=2)
>      (1 - x)*sin(1) + cos(1) + O((x - 1)**2)

It is almost ideal result.
(only without canonical representation: terms sorting and (1-x) instead of (x-1)).

Conversely, internal calling if series in therefore must be with (..., somthing_hack=True) if it options is needed.

>      h[3]>>>  cos(x).series(x,1,n=2, somthing_hack=True)
>      -x*sin(1) + cos(1) + O(x**2)

This result is incorrect and I don't understand the usage of it, except the internal core or temporary usage.

Proposed variant having more sense and also remind us the reasons for this options usage in core.

But if it is hard to correct all branches, and because of the temporarily usage of this option in core (until O((x - 1)**2) will be enabled as I understand), it is not principally right now. But in future it will be.

Alexey.

--
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