Status: Accepted Owner: jochen.voss Labels: Type-Defect Priority-Medium WrongResult Integration
New issue 1428 by jochen.voss: wrong result for integral of sin(k*x)*sin(m*x) over [0,pi] http://code.google.com/p/sympy/issues/detail?id=1428 Hi, current sympy (from git) returns a wrong result for me when I integrate then function sin(k*x)*sin(m*x) over the interval [0,pi]: -------------------------------------------------- v...@automatix [~/sympy] bin/isympy Python 2.6.2 console for SymPy 0.6.5-git These commands were executed: >>> from __future__ import division >>> from sympy import * >>> x, y, z = symbols('xyz') >>> k, m, n = symbols('kmn', integer=True) >>> f, g, h = map(Function, 'fgh') Documentation can be found at http://sympy.org/ In [1]: integrate(sin(k*x)*sin(m*x),(x,0,pi)) Out[1]: 0 In [2]: integrate(sin(k*x)*sin(k*x),(x,0,pi)) Out[2]: π ─ 2 In [3]: m-k Out[3]: m - k The result Out[1] should only be 0 if m != k. For m == k we should get pi/2 as in Out[2]. The third expression shows that sympy does not generically assume m == k, since m-k is not simplified to 0. I hope this helps, Jochen -- 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 sympy-issues@googlegroups.com To unsubscribe from this group, send email to sympy-issues+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sympy-issues?hl=en -~----------~----~----~----~------~----~------~--~---