Updates:
Labels: Integration Simplify Polynomial
Comment #1 on issue 1440 by asmeurer: strange simplification
http://code.google.com/p/sympy/issues/detail?id=1440
I get in master
In [12]: var('f w s')
In [13]: (-2*s**2*w**2 + w**4)/(s**4 + w**4)
Out[13]:
2 2 4
- 2⋅s ⋅w + w
──────────────
4 4
s + w
In [14]: _.subs(s,2*pi*I*f)
Out[14]:
2 2 2 4
8⋅π ⋅f ⋅w + w
───────────────
4 4 4
16⋅π ⋅f + w
In [15]: simplify(_)
Out[15]:
2 ⎛ 2 2 2⎞
w ⋅⎝8⋅π ⋅f + w ⎠
─────────────────
4 4 4
16⋅π ⋅f + w
In [16]: integrate(_,(f,0,oo))
Out[16]:
⎛
2
⎞ ⎛ 2
2 ⎜ 4 t
25 ⎟
2 ⎜ 4 t 25
- w ⋅RootSum⎜t + ─────── + ──────────, Lambda(_t,
_t*log(512*_t**3*pi**2*w**4/15 + 44*_t*w**2/15))⎟ + w ⋅RootSum⎜t + ───────
+ ──────────, Lambda(_t, _t*log(512*_t**3*pi**2*w**4/15 + 44*_t*w**2/15 +
⎜ 2 2 4
4 ⎟
⎜ 2 2 4 4
⎝ 8⋅π ⋅w 4096⋅π
⋅w
⎠ ⎝ 8⋅π ⋅w 4096⋅π ⋅w
⎞
⎟
oo))⎟
⎟
⎠
In [17]: simplify(_)
Out[17]:
⎛ ⎛
2
⎞ ⎛ 2
2 ⎜ ⎜ 4 t
25
⎟ ⎜ 4 t 25
w ⋅⎜- RootSum⎜t + ─────── + ──────────, Lambda(_t,
_t*log(512*_t**3*pi**2*w**4/15 + 44*_t*w**2/15))⎟ + RootSum⎜t + ─────── +
──────────, Lambda(_t, _t*log(512*_t**3*pi**2*w**4/15 + 44*_t*w**2/15 + o
⎜ ⎜ 2 2 4
4 ⎟
⎜ 2 2 4 4
⎝ ⎝ 8⋅π ⋅w 4096⋅π
⋅w ⎠
⎝ 8⋅π ⋅w 4096⋅π ⋅w
⎞⎞
⎟⎟
o))⎟⎟
⎟⎟
⎠⎠
which is not ideal (we could have expanded the RootSum), but at least we
have fixed the bug that you reported.
--
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.