Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium WrongResult

New issue 1627 by ondrej.certik: (1/sin(x)**5).series() should work better
http://code.google.com/p/sympy/issues/detail?id=1627

In [1]: (1/sin(x)**5).series(x)
Out[1]:
  3    1     5
─── + ── + ──── + O(1)
8⋅x    5      3
       x    6⋅x

In [2]: (1/sin(x)**5).series(x, 0, 0)
Out[2]: O(1)

In [3]: (1/sin(x)**5).series(x, 0, 1)
Out[3]: O(x**(-5))

In [4]: (1/sin(x)**5).series(x, 0, 2)
Out[4]:
1 + O(x)
────────
     5
    x

In [5]: (1/sin(x)**5).series(x, 0, 3)
Out[5]:
1 + O(x**2)
───────────
       5
      x

In [6]: (1/sin(x)**5).series(x, 0, 4)
Out[6]:
1     5
── + ──── + O(x**(-2))
  5      3
x    6⋅x

In [7]: (1/sin(x)**5).series(x, 0, 5)
Out[7]:
1     5
── + ──── + O(1/x)
  5      3
x    6⋅x

In [8]: (1/sin(x)**5).series(x, 0, 6)
Out[8]:
  3    1     5
─── + ── + ──── + O(1)
8⋅x    5      3
       x    6⋅x

In [9]: (1/sin(x)**5).series(x, 0, 7)
Out[9]:
  3    1     5
─── + ── + ──── + O(x)
8⋅x    5      3
       x    6⋅x

In [10]: (1/sin(x)**5).series(x, 0, 8)
Out[10]:
367⋅x    3    1     5
───── + ─── + ── + ──── + O(x**2)
  3024   8⋅x    5      3
               x    6⋅x

In [11]: (1/sin(x)**5).series(x, 0, 9)
Out[11]:
367⋅x    3    1     5
───── + ─── + ── + ──── + O(x**3)
  3024   8⋅x    5      3
               x    6⋅x

In [12]: (1/sin(x)**5).series(x, 0, 10)
Out[12]:
                                  3
367⋅x    3    1     5     11513⋅x
───── + ─── + ── + ──── + ──────── + O(x**4)
  3024   8⋅x    5      3    362880
               x    6⋅x


All [6] up to [12] (and also [1], [3]) are ok. The order numbering is kind
of confusing, but it's consistent. [4] and [5] should be expanded out, but
otherwise it's correct. [2] is wrong.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sympy-issues" 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-issues?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to