On Mar 2, 2011, at 1:27 PM, Alexey U. Gudchenko wrote:

> 01.03.2011 00:34, Vinzent Steinberg пишет:
>>> 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).
>> It would be a "for-the-moment" fix which is likely to be changed (and
>> should be marked as such). I think it is still better than no O() term
>> at all.
>> 
>>> >  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.
>> Could you please explain what you mean with the last sentence?
>> 
>> Vinzent
>> 
> 
> Well, It will be easer to explain from the point of view of programmer.
> 
> It is clear that "A" is sympy Add class which consists of polynomials terms 
> "a_n (x-x0)**n" and O((x-x0)**n).
> 
> In "B" is imagined class TaylorExpansion that implement the "n-th order 
> Taylor expansion" so it track his precision (n), the list of [a_n], variable 
> x, and point x0.
> [a_n] may by any sympy expression, not necessarily numbers.
> 
> It has self-depended method for representation it in sympy (print) to print 
> "a0 + a1*(x - x0) + ... + O(x - x0)"
> 
> It has method "asExpr()" to shape "A" variant for general propose.
> 
> It has method "truncate" to form Taylor polynomial. May be another class too 
> if it has not analog in polynomials module yet.
> 
> The reason of this class - that manipulations with its objects will be easer.
> 
> F.e. the derivative of it will bring to the same object but the list of [a_n] 
> will be shifted throu its index by one and precision will be decremented.
> 
> Summation equivalent to summation of lists (c_i = a_i + b_i), with alignment 
> of precision to minimal value of both.
> 
> Multiplication will be a little complex, but still without analyzing 
> (x-x0)**k parts of expression.
> 
> May be I became entangled now it with similar "exponential generating 
> function", but the last one is not derived from function (opposite to 
> Taylor), and it is not expansion (it is series).
> 
> -- 
> Alexey U.

It sounds like a special TaylorExpansion class should be implemented as a 
wrapper around Poly.

Aaron Meurer

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