Status: Valid
Owner: someb...@bluewin.ch
Labels: Type-Enhancement Priority-Medium Integration

New issue 3901 by someb...@bluewin.ch: Improve integration of li(z)
http://code.google.com/p/sympy/issues/detail?id=3901

Sympy can integrate only very simple integrands containing li(z):

In [3]: li(x)
Out[3]: li(x)

In [4]: integrate(_, x)
Out[4]: x*li(x) - Ei(2*log(x))

In [5]: _.rewrite(li)
Out[5]: x*li(x) - li(x**2)

In [6]: integrate(_, x)
Out[6]: Integral(x*li(x) - li(x**2), x)

This is because we build support into heurisch.

Fricas (an Axiom flavor) can easily handle much more complicated integrands:

(11) -> integrate(li(x), x)

               2
   (11)  - li(x ) + x li(x)
Type: Union(Expression(Integer),...)
(12) -> integrate(%, x)

             3           2     2
         li(x ) - 2x li(x ) + x li(x)
   (12)  ----------------------------
                       2
Type: Union(Expression(Integer),...)
(13) -> integrate(%, x)

               4           3      2    2     3
         - li(x ) + 3x li(x ) - 3x li(x ) + x li(x)
   (13)  ------------------------------------------
                              6
Type: Union(Expression(Integer),...)
(14) -> integrate(%, x)

             5           4      2    3      3    2     4
         li(x ) - 4x li(x ) + 6x li(x ) - 4x li(x ) + x li(x)
   (14)  ----------------------------------------------------
                                  24
Type: Union(Expression(Integer),...)
(15) -> integrate(%, x)

               6           5       2    4       3    3      4    2     5
- li(x ) + 5x li(x ) - 10x li(x ) + 10x li(x ) - 5x li(x ) + x li(x) (15) --------------------------------------------------------------------
                                          120
Type: Union(Expression(Integer),...)

They have extended Risch to do the hard work.

A second issue: at the moment it is not clear how to add li(z) to our
Meijer-g algorithm. In the discussion of PR #1708 we found:

------------------------------------------------------------------------------------
Unfortunately I see no way to accomodate the extra additive terms without rewriting some parts of meijerint.py :(. [Which ought to be done anyway...] But here we have meijerg with logarithmic arguments anyway, so this really is no help ... this is probably why I did not take care of logarithmic integrals in the first place.

If you really want to integrate these using meijerint, you should extend the heuristics to start out with a substitution z -> exp(z), and then recognise li(exp(z)) as meijerg with a normal argument. This is likely non-trivial.
------------------------------------------------------------------------------------


--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy-issues+unsubscr...@googlegroups.com.
To post to this group, send email to sympy-issues@googlegroups.com.
Visit this group at http://groups.google.com/group/sympy-issues.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to