sympy/sympy — pull request #7552 by avichaldayal (2014-06-02 10:56:11+00:00)
Title: Special asympt

This includes asymptotic and series expansion for the following functions:-
- erf: gauss error function
- erfc: complementary error function
- erfi: imaginary error function
- Ei: exponential integral
- expint: generalised exponential integral
- li: logarithmic integral
- Li: offset logarithmic integral
- Si: sine integral
- Ci: cosine integral
- bessely
- besselj
- lerchphi function
- Riemann zeta function

It's not ready to commit yet. There are some silly bugs that I'm not able to fix for now. I hope to fix them soon. The bugs are:-
If
```s = pi/2 + (-(120/x**5 - 6/x**3 + 1/x + O(x**(-7), (x, oo)))*sin(x) - (-720/x**6 + 24/x**4 - 2/x**2 + 1 + O(x**(-7), (x, oo)))*cos(x))/x```
then this re-orders as
```pi/2 + (sin(x)*(-O(x**(-7), (x, oo)) - 1/x + 6/x**3 - 120/x**5) - cos(x)*(1 + O(x**(-7), (x, oo)) - 2/x**2 + 24/x**4 - 720/x**6))/x```
causing an assertion error

If
```a = (x/2)**n*(1/(factorial(n)) - x**2/(4*factorial(n + 1)) + x**4/(32*factorial(n + 2)) + O(x**6))```
and
```o = O(x**6)```
then ```a + o``` seems to fail.