we can fix Sage interface only if we know what %iint stands for. Is it a kind of polylogarithm?
On Sat, Jan 9, 2021 at 10:22 AM oldk1331 <[email protected]> wrote: > > Hi, my thoughts are: > > 1. Maybe Sage should be able to automatically escape '%' in its 'latex' > command. > > When using FriCAS to generate latex, it returns '\%' directly. > > 2. As Waldek said, '%iint" should be used only internally. But the > following workaround prints '%iint' as 'iint': > > diff --git a/src/algebra/liouv.spad b/src/algebra/liouv.spad > index 420845b9..c070ca28 100644 > --- a/src/algebra/liouv.spad > +++ b/src/algebra/liouv.spad > @@ -221,6 +221,7 @@ > derivative(opli2, (z1 : F) : F +-> log(z1) / (1 - z1)) > derivative(opfis, (z1 : F) : F +-> sin(pi()*z1^2/(2::F))) > derivative(opfic, (z1 : F) : F +-> cos(pi()*z1^2/(2::F))) > + display(opiint, (z1 : List O) : O +-> prefix('iint::O, z1)) > setProperty(opint, SPECIALEQUAL, eqint@((K, K) -> Boolean) pretend > None) > setProperty(opint, SPECIALDIFF, dvint@((List F, SE) -> F) pretend None) > setProperty(opiint, SPECIALDIFF, dviint@((List F, SE) -> F) pretend > None) > > > On 1/9/21 5:11 AM, 'Nasser M. Abbasi' via FriCAS - computer algebra > system wrote: > > Hello. I use sagemath to call fricas integrate as part of build the > > independent CAS integration tests. > > > > I am not running the tests using sagemath 9.2 against Fricas 1.3.6 > > > > There are antiderivatives generated by Fricas which uses %iint. > > > > This cause a problem when converted to Latex for the report. > > > > Here is a bug report on this against sagemath > > > > https://ask.sagemath.org/question/48409/possible-invalid-latex-translation-from-fricas-result/ > > > > https://trac.sagemath.org/ticket/28630 > > > > But not fixed yet and do not know when it will be fixed. > > > > Is it possible that fricas not use %iint as that causes problem > > converting to Latex. > > > > Here is an example > > > > sage: x,a,b,n=var('x a b n') > > sage: integrate(x^2*(a+b*log(c*x^n))*polylog(3,e*x),x, algorithm="fricas") > > -1/972*(4*(4*b*n - 3*a)*x^3*e^3 + 9*(3*b*n - 2*a)*x^2*e^2 + 36*(2*b*n - > > a)*x*e + 36*(3*b*n*x^3*e^3*log(x) + 3*b*x^3*e^3*log(c) - (2*b*n - > > 3*a)*x^3*e^3 - b*n)*%iint(x, -log(-x*e + 1)/x) - 36*((b*n - a)*x^3*e^3 - > > b*n + a)*log(-x*e + 1) - 6*(2*b*x^3*e^3 + 3*b*x^2*e^2 + 6*b*x*e - > > 6*(b*x^3*e^3 - b)*log(-x*e + 1))*log(c) - 6*(2*b*n*x^3*e^3 + > > 3*b*n*x^2*e^2 + 6*b*n*x*e - 6*(b*n*x^3*e^3 - b*n)*log(-x*e + 1))*log(x) > > - 108*(3*b*n*x^3*e^3*log(x) + 3*b*x^3*e^3*log(c) - (b*n - > > 3*a)*x^3*e^3)*polylog(3, x*e))*e^(-3) > > > > After converting to Latex it gives (using sagemath latex command) > > > > -\frac{4 \, {\left(4 \, b e^{3} n - 3 \, a e^{3}\right)} x^{3} + 9 \, > > {\left(3 \, b e^{2} n - 2 \, a e^{2}\right)} x^{2} + 36 \, {\left(2 \, b > > e n - a e\right)} x + 36 \, {\left(3 \, b e^{3} n x^{3} > > \log\left(x\right) + 3 \, b e^{3} x^{3} \log\left(c\right) - {\left(2 \, > > b e^{3} n - 3 \, a e^{3}\right)} x^{3} - b n\right)} {\rm %iint}\left(e, > > x, -\frac{\log\left(-e x + 1\right)}{e}, -\frac{\log\left(-e x + > > 1\right)}{x}\right) - 36 \, {\left({\left(b e^{3} n - a e^{3}\right)} > > x^{3} - b n + a\right)} \log\left(-e x + 1\right) - 6 \, {\left(2 \, b > > e^{3} x^{3} + 3 \, b e^{2} x^{2} + 6 \, b e x - 6 \, {\left(b e^{3} > > x^{3} - b\right)} \log\left(-e x + 1\right)\right)} \log\left(c\right) - > > 6 \, {\left(2 \, b e^{3} n x^{3} + 3 \, b e^{2} n x^{2} + 6 \, b e n x - > > 6 \, {\left(b e^{3} n x^{3} - b n\right)} \log\left(-e x + > > 1\right)\right)} \log\left(x\right) - 108 \, {\left(3 \, b e^{3} n x^{3} > > \log\left(x\right) + 3 \, b e^{3} x^{3} \log\left(c\right) - {\left(b > > e^{3} n - 3 \, a e^{3}\right)} x^{3}\right)} {\rm polylog}\left(3, e > > x\right)}{972 \, e^{3}} > > > > And the above do not compile due to %iint, as % is treated as comment > > and all the latex after that is lost giving latex error. > > > > Is there a way for FriCAS not to use % in the output it generates? > > Each time I have to edit the latex by hand and add \% everywhere they show > > > > May be this is not possible, But I thought to just ask. > > > > Thanks > > --Nasser > > -- > You received this message because you are subscribed to the Google Groups > "FriCAS - computer algebra system" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/fricas-devel/2266c422-5328-3c65-44f1-437fe7b22bca%40gmail.com. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/fricas-devel/CAAWYfq3%2BKCTpKqhgPEhOzzQw4xrpCK9F%2BpB%3DbLsXA%3D6iqXpxCg%40mail.gmail.com.
