sympy/sympy — pull request #1622 by jrioux (2012-10-29 15:35:19+00:00)
Title: Identify undeterminate a/0 forms of indefinite integrals

In integrate(), identify cases where the indefinite integral has a zero in the denominator. These cases must be treated specially with the integral recalculated. Return the result in Piecewise form. This allows to correctly calculate definite integrals of the form sin(k*x)*sin(m*x), for example, but also x**y for special cases x==1 or y==-1, and others.

Fixes issue 1428: wrong result for integral of sin(k*x)*sin(m*x) over [0,pi]
http://code.google.com/p/sympy/issues/detail?id=1428