14.03.2012 19:55, Gaurav Sathe пишет:
> Hi Alexey,
> 
> I am planning to participate in GSOC and one of the ideas which really
> interested me was the idea on 'Series Expansions'. I am trying to solve
> bugs related to series expansions. I went through the prototype which you
> have made and the ideas are really good. I have even thought of a few of my
> own...
> However I dont know if anyone is interested in mentoring this project ...
> Do you know anyone who is interested?
> 
> -Gaurav


One way or another, most of the mentors from the list [1] were
participated in discussions about the series. More over, the persons who
doesn't present at this list work with it: Christopher Smith, Fredrik
Johansson.

The concrete mentor is not specified for this topic now.
It can be done, as I understand, on the aplication stage of GCoS.

And, as I know, the further road-map in details is not written yet.

But I try to describe the current situation now:

1. The series exist in SymPy now.
=================================

A lot of work was done about it over the past years (without any of GCoS
project, so directly).

In this approach the series are treated (represented) as the ordinary
SymPy expressions, that is as `Add` object of terms and O(x).
It is bases on differentiation of expression (Taylor series definition),
and closely related with limits (Gruntz algorithms).

Advantages:
~~~~~~~~~~~
- A *large* volume of tests was accumulated now. You can see them, e.g.
in the `test_nseries.py` file [4].

- A large volume of complex cases was accumulated or discussed: how to
deal with complex series (logs, x/sin(x), cases with point other then
zero, how it is related with complex limits, and singularities problems.

- As series are represented as ordinary SymPy expression, then we can
use them in further manipulation straightway and freely. E.g. we can
just right to aplly the multiplication or differentiation operations to
the result without additional efforts (only care with Order object).

- And university: we don't care about the kinds and about the types of
series.

They can be Taylor or Power (exponention generating function or ordinary
generating function), Laurent  (with negative powers) or not,
Generalised (with rational or complex powers, or with common
coefficient or with powers log(x) ). See [5] for details.

This is advantage (university) but at the same time it is and
disadvantage too, because it hard to understand what kind of series is
resulted and apply one algorithm or another.

Disadvantages:
~~~~~~~~~~~~~~
- As internal representation is the ordinary SymPy expression there is
no internal structure. So it is hard or ineffectively to parse this
expression and use it for the internal series calculation, operate only
with coefficients, determine kind of series.
- impossibility to operate with the infinity series.
- We meet the problems of mixing of topics: series (without Order term),
series expansions (with Order term), and formal series (it is differ
from ordinary expression mathematically)
- Minor: Grunz use series  for limits calculation, and series algorithm
use limits to calculate terms.


2. The Lpoly2 Distributed polynomials in series.
================================================
It is the work of Mario Pernici which is upon review process now.
See pull request 609 for details [3].

This approach is based on the internal representation of series as the
polynomials, that is it has the structure.

More over, it is based on multivariate polynomials!! (not only with x,
but with x, y, z...).

We can convert it to the ordinary expression with the help of `truncate`
method.

Advantages:
~~~~~~~~~~~
- has a structure, that is implementation is operated with the
coefficients internally and don't parse expression every time. So it is
faster.
- Has specified algorithms, So it is meaningfully faster.
- Order term is separated. So, formally we can don't care about this
term, if we are inside the frame of structure. It arises just for the
final result representation.
- multivariate polynomials. We can expand series in a few variable.
- Typed fields (rings) of coefficient are implemented (QQ, RR), on which
coefficient can belong to.
- A large volume of tests was accumulated too.

Disadvantages:
~~~~~~~~~~~~~~
- It can be extended, of course, but as it is based on polynomials, so
it is a question how to deal with generalised series like: `1 + x*log(x)
+ x**2*log(x)**2 + ...`,

Mario Pernici can add if I omitted something.



3. My series-prototype:
=======================
See [2] for details.
Internal structure is based upon of sequences (for one variable).

And there is the difference of algorithms for series calculation.
We construct the symbolic expression which consist of series objects
(and internaly use sequences expressions) , so we do not calculate every
time the coefficients while work with expression of series - only when
we want to see coefficient, and use calculations with only the terms
which are needed.

Of courses for multivariate another structure must be used instead of
sequences, but the main approach still remains (expression of series,
use only terms which are needed only)

Advantages:
~~~~~~~~~~~
- has a structure (as Lpoly2 approach too)
- sequences are things in itself, it can be uses independently in SymPy,
there is why I separated it.
- sequences can be classified, so the algorithms for some primitive
sequences can be specified and simplify the calculations.
- separated types of series (don't mix Formal Taylor series and Formal
Power series).


Disadvantages:
~~~~~~~~~~~~~~
- not multivariate yet (but it can be extended)
- there is no accumulated enough volume of cases and tests, so it is
possible that the unknown limitations are. It is main disadvantages
which I care about now.

But I must notice that this approach intersected with Lpoly2 in some
place: if we use finite sequence then it is similar like the ordinary
polynomial.


4. There are some more references
================================
Which are mentioned in "Series expansions" section of GCoS Ideas [1].
Which can be used for the road-map construction. In particular:

- "Formal Power Series" by Dominik Gruntz and Wolfram Koepf
- "A New Algorithm Computing for Asymptotic Series" by Dominik Gruntz
- "Computing limits of Sequences" by Manuel Kauers
- "Symbolic Asymptotics: Functions of Two Variables, Implicit Functions"
by Bruno Savly and John Shackell
- "Symbolic Asymptotics: Multiseries of Inverse Functions" by Bruno
Savly and John Shackell


Conclusion
==========

a) I think we can combine all those approaches. But taking into account
the next:

b) That we must to design the road-map in more details.
The main (far away) target directions which I see (except combining of
the above) are:

- Use various kinds of series (Formal Power series). They have different
properties and algorithms, it is the reason why.
- Separate series expansion concept (with Order term) from series itself
(infinite).
- Combine them with generating functions concept.
- A lot of other topics which must be formulated.

I will update the page [5] to write down all above.


[1] https://github.com/sympy/sympy/wiki/GSoC-2012-Ideas

[2]
https://github.com/sympy/sympy/wiki/UD-Sequences-and-formal-power-series-prototype

[3] https://github.com/sympy/sympy/pull/609

[4]
https://github.com/sympy/sympy/blob/master/sympy/series/tests/test_nseries.py

[5] https://github.com/sympy/sympy/wiki/UD-series-definitions

[6] https://github.com/sympy/sympy/wiki/UD-series-situation



-- 
Alexey U.

> 
> On Fri, Mar 9, 2012 at 3:03 AM, Alexey U. Gudchenko <[email protected]> wrote:
> 
>> For those who would be interested in the topic `Series expansions` of
>> `GSoC 2012 Ideas` [1],  students and mentors too, I have published the
>> working prototype [2] in the `sequence` branch.
>>
>> May be it is not valid approach (with some restrictions), but it can be
>> interesting as a model.
>>
>> Note also, that there is a Mario's pull request [3] which deal with
>> series expansions.
>>
>>
>> Unfortunately, I have no enough time now to participate intensively, but
>> I can help with difficult parts of code and discuss a little.
>>
>>
>> [1] https://github.com/sympy/sympy/wiki/GSoC-2012-Ideas
>>
>> [2]
>>
>> https://github.com/sympy/sympy/wiki/UD-Sequences-and-formal-power-series-prototype
>>
>> [3] https://github.com/sympy/sympy/pulls/pernici
>>

[4]
https://github.com/sympy/sympy/blob/master/sympy/series/tests/test_nseries.py


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

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