integrate(diff(f,x),x) actually yields you -1/(x + 1) + constant C

when u set C = 1, it becomes x/(x + 1)
On Tuesday, 24 June 2025 at 18:38:45 UTC+8 anso...@googlemail.com wrote:

> What am I doing wrong?
>
> >>> from sympy import *       # Version 1.13.2
> >>> x = symbols("x")
> >>> f = x / (x+1)
> >>> f
> x/(x + 1)
> >>> integrate(diff(f,x),x)    # should be x/(x+1)
> -1/(x + 1)
>
> diff seems correct - what about integrate?
>
> Can anyone help?

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sympy+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sympy/ac50ad05-1db6-4fff-8805-60c93144b483n%40googlegroups.com.

Reply via email to