[sympy] Re: Problems with integrating ln(x-y) wrt. y

2015-10-22 Thread Kalevi Suominen
On Thursday, October 22, 2015 at 4:56:35 PM UTC+3, Filip wrote: > > I'm trying to integrate ln(x-y) dy, but the result I get from SymPy is > very different from Maple's answer. > Here is what I get when I integrate in SymPy: > In [2]: > > integrate(ln(x-y), y) > > Out[2]: > > -x*log(-x + y) + y*

[sympy] Re: Problems with integrating ln(x-y) wrt. y

2015-10-22 Thread Speed
Use simplify(diff(-x*log(-x + y) + y*log(x - y) - y,y)) instead of only diff(-x*log(-x + y) + y*log(x - y) - y,y) as mentioned by Kalevi sympy does not do the simplification part autometically. and in sympy during integration sometimes the constants make a difference. Hope it helps. On Thursda