fricas dilog and sage dilog are not the same:

sage: fricas(polylog(3, x))
polylog(3,x)
sage: fricas(dilog(x))
dilog(- x + 1)

sage: integrand=(dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/x 
sage: 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)

Martin
On Friday, 10 January 2025 at 21:45:38 UTC+1 dmo...@deductivepress.ca wrote:

> The questions "what is the problem? Did I do something wrong?" do not 
> seem to be sage development questions, so they should be asked on a 
> different forum, such as ask.sagemath.org 
>
> On Friday, January 10, 2025 at 12:50:25 PM UTC-7 Nasser M. Abbasi wrote:
>
>> I have installed sagemath 10.5 and also fricas 1.3.11, all using pacman 
>> package manager on EOS/Arch based linux.
>>
>> i.e. I did not build sagemath 10.5 from sources. 
>>
>> I was trying this integration, where it works using Fricas directly, but 
>> when I use sagemath and give the algorithm as "fricas", it does not return 
>> the same result as Fricas does standalone. It returns unevaluated.
>>
>> Since sagemath is now using the system fricas, then why it does not 
>> return the same result for same input?
>>
>> ----------------------------------
>> >fricas 
>> FRICAS="/usr/lib/fricas/target/x86_64-linux-gnu" 
>> spad-lib="/usr/lib/fricas/target/x86_64-linux-gnu//lib/libspad.so" 
>>                       FriCAS Computer Algebra System  
>>                Version: FriCAS 1.3.11 built with sbcl 2.4.5 
>>
>> (1) -> integrand:=(dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/x 
>>
>> (2) -> integrate( integrand,x)
>>
>>   (2)  dilog(- x + 1)polylog(3,x) 
>> ---------------------------
>>
>> Now using sagemath
>>
>> -----------------
>> >which sage 
>> /usr/bin/sage 
>> >sage --version 
>> SageMath version 10.5, Release Date: 2024-12-04 
>> >which fricas 
>> /usr/bin/fricas 
>> >fricas --version 
>> FriCAS 1.3.11 
>> based on sbcl 2.4.5 
>> >sage 
>> ┌────────────────────────────────────────────────────────────────────┐ 
>> │ SageMath version 10.5, Release Date: 2024-12-04                    │ 
>> │ Using Python 3.13.1. Type "help()" for help.                       │ 
>> └────────────────────────────────────────────────────────────────────┘
>> sage:  print(fricas.eval(")lisp |$build_version|"))
>> Value = "FriCAS 1.3.11"
>>
>>
>> sage: x=var('x')
>> sage: integrand=(dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/x 
>>
>> sage: integrate(integrand,x,algorithm="fricas") 
>>
>> integral((dilog(-x + 1)^2 - log(-x + 1)*polylog(3, x))/x, x) 
>>
>> I checked and Sagemath supports dilog and polylog functions.
>>
>> So what is the problem? Did I do something wrong? 
>>
>> Thanks
>> --Nasser
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion visit 
https://groups.google.com/d/msgid/sage-devel/ad92e477-0edd-42f8-a15d-84e937b6e3a7n%40googlegroups.com.

Reply via email to