Le vendredi 10 janvier 2025 à 22:36:39 UTC+1, axio…@yahoo.de a écrit :
fricas dilog and sage dilog are not the same:sage: fricas(polylog(3, x))
polylog(3,x)
sage: fricas(dilog(x))
dilog(- x + 1)
This deserves a github issue. Fixing the interface is (probably) not that hard… Would you mind issuing this ?
Note : the problem may be deeper than this :
sage: w0=SR.wild(0) sage: integrand.subs(dilog(w0)==dilog(1-w0)).integrate(x, algorithm="fricas").su ....: bs(dilog(w0)==dilog(1-w0)) integral((dilog(x)^2 - log(-x + 1)*polylog(3, x))/x, x)sage: integrand=(dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/xsage: fricas(integrand)
2
- log(- x + 1)polylog(3,x) + dilog(x)
--------------------------------------
x
sage: integrate(integrand, x, algorithm="fricas")
integral((dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/x, x)sage: good_integrand = (dilog(x)^2 - log(-x + 1)*polylog(3, x))/x
sage: fricas(good_integrand)
2
- log(- x + 1)polylog(3,x) + dilog(- x + 1)
--------------------------------------------
x
sage: integrate(good_integrand, x, algorithm="fricas")
dilog(x)*polylog(3, x)
FWIW :
sage: fricas("integrand:=(dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/x") 2 - log(- x + 1)polylog(3,x) + dilog(- x + 1) -------------------------------------------- x sage: fricas("integrate( integrand,x)") dilog(- x + 1)polylog(3,x) sage: fricas("integrate( integrand,x)")._sage_() dilog(x)*polylog(3, x)HTH,
Le vendredi 10 janvier 2025 à 22:36:39 UTC+1, axio…@yahoo.de a écrit :
fricas dilog and sage dilog are not the same:sage: fricas(polylog(3, x))
polylog(3,x)
sage: fricas(dilog(x))
dilog(- x + 1)This deserves a github issue. Fixing the interface is (probably) not that hard… Would you mind issuing this ?
Dear Martin,
Le dimanche 12 janvier 2025 à 14:25:54 UTC+1, axio…@yahoo.de a écrit :
Sorry, I don't understand.On Sunday, 12 January 2025 at 12:55:26 UTC+1 emanuel.c...@gmail.com wrote:Le vendredi 10 janvier 2025 à 22:36:39 UTC+1, axio…@yahoo.de a écrit :
fricas dilog and sage dilog are not the same:
That’s my point. See below.
sage: fricas(polylog(3, x))polylog(3,x)
sage: fricas(dilog(x))
dilog(- x + 1)This deserves a github issue. Fixing the interface is (probably) not that hard… Would you mind issuing this ?
I don't understand what you mean with "fixing the interface". The definitions of dilog in FriCAS and SageMath differ:sage: dilog(1.0)
1.64493406684823
sage: fricas.dilog(0.0)
1.6449340668_4822643647_24152(this is pi^2/6)The translation of dilog done by the interface is (hopefully) correct. So, the only thing that we could do is to change SageMath's definition.
Nope. From what you say follows that Sage’s dilog(x) and Fricas’ dilog(1-x) are the same mathematical object. Therefore, the Fricas translation of Sage’s dilog(<something>) should be dilog(1-<something>). And vice-versa : the Sage’s translation of Fricas’ dilog(<something>) should be Sage’s dilog(1-<something>).
This can (and should, IMNSHO) be made in the interface.
HTH,
Nope. From what you say follows that Sage’s dilog(x) and Fricas’ dilog(1-x) are the same mathematical object. Therefore, the Fricas translation of Sage’s dilog(<something>) should be dilog(1-<something>). And vice-versa : the Sage’s translation of Fricas’ dilog(<something>) should be Sage’s dilog(1-<something>).