25.02.2011 20:16, Ronan Lamy пишет:
Le vendredi 25 février 2011 à 18:49 +0300, Alexey U. Gudchenko a écrit :
25.02.2011 16:03, Ronan Lamy пишет:
Le vendredi 25 février 2011 à 16:26 +0545, Chris Smith a écrit :
Alexey U. Gudchenko wrote:
25.02.2011 08:59, Alexey U. Gudchenko пишет:

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


If you mean that something internal wants the unshifted series, then
yes sudo=True should be used and the O term removed. This would be the
same thing as getting the shifted series, removing the O term and
doing the substitution yourself of `s.removeO().subs(x, x-x0)`.

So if there are no objections, I'll commit this in about 5 hours.

Wait. I don't think that adding yet another option is a good idea,
particularly when its purpose is to choose between two bad workarounds.
And 'sudo' is a bad name anyway.


Excuse me,

  >  choose between two bad workarounds.

Why f.e. this variant:

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

is bad ?

What's bad is that '(x - 1)' in the O() is actually a symbol that's
completely unrelated to x. This could be very confusing and it's
unlikely that such an expression will be handled correctly by existing
functions.

(except canonical representation of series, and your remarks that it is
"asymptotic expansion" indeed, not series)

As you said, these problems are unrelated with Chris's work.


I.
<snip>

I agree that O() needs to be fixed to take an x0 argument before we can
represent expansions at a point other than 0. Correct handling of all
cases (x0 = oo, O(1, x, x0=0) + O(1, x, x0=1), ...) can probably wait.




A. My fears that it will be hard to maintain behavior of O((x-x0)**n) for pure "asymptotic expansions" expression in general case (without knowledge of series structure). In this case O((x-x0)**n) must detect and catch (x-x0)**k terms in a whole expression for every operation. And detect and do not permit operations between expressions which contain O((x-x1)**n) and O((x-x2)**n) respectively (x1 <> x2).

B. I realize only maintaining of O behavior "asymptotic expansions" with knowing series structure ( 2) in [1] )

Nevertheless, I observe consensus that A *or* B must be implemented obligatory.
And what is more, both A *and* B implementations better.


[1] http://groups.google.com/group/sympy/msg/6d07d49dfde6ac5c?hl=en

Alexey U.

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