Algebrite
Algebrite copied to clipboard
integral(1/x) should be log(abs(x))
Algebrite.run("integral(x^(-1))")
"log(x)"
Algebrite.run("integral(1/x)")
"log(x)"
that's assuming a function reals to reals. At this point the question is weather it's wiser to ignore the complex and force reals to reals?
i.e. in Algebrite this is valid defint(1/x,x,-1,i) = -1/2 i pi
. In the "reals to reals only" definition that would be zero instead. I'm not familiar enough to that part of the code to know whether there is a way to force a "reals to reals only" constraint...
Also related d(log(abs(x)), shouldn't be 1/x? Algebrite returns sign(x)/abs(x)
@ribrdb Yes, I think the problem is two-fold. 1) Algebrite tries to work in the complex domain, and there it somehow gets the wrong derivative in the first place: the derivative of abs(x) in the complex domain is not well defined and Algebrite just sets it to sign(x) (which is only true in the reals). 2) Then, once Algebrite gets the wrong result "sign(x)/abs(x)", it can't simplify that to 1/x because in the complex domain the two quantities are different.
The solution to most of this is to use a flag to restrict variables to the real domain... I have added such flag, but it hasn't penetrated many parts of the code yet...