Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Piecewise: Fixed piecewise integration error
Before this change, when attempting to integrate a piecewise function (or a function that internally gets converted to a piecewise function (like 1/Abs(x)), if some part of the function on some interval evaluates to some type of infinity at an endpoint of the interval it could result in the indefinite integral containing an added infinity or being nan on that interval. This change fixes this issue. Example In [1]: from sympy import * In [2]: x = Symbol('x', real=True) In [3]: integrate(1/Abs(x)) Out [3]: Piecewise((-log(x), x <= 0), (log(x), True)) Before this change, integrate(1/Abs(x)) resulted in Piecewise((-log(x), x <= 0), (nan, True))
- Loading branch information