Dima, could you open a ticket for this?  I didn't know about 
`explicit_solutions` when I wrote that code.

Martin

On Tuesday, 23 August 2022 at 17:07:37 UTC+2 Dima Pasechnik wrote:

> Behind the scene, Sage uses pynac (a clone of ginac) for its handling of 
> symbolics. Implicit roots are supported. Docs say:
>
> --------
>
> "By default, all the roots are required to be explicit rather than 
> implicit. To get implicit roots, pass explicit_solutions=False to .roots()
>
> ------
>
> I am not sure how well fricas interface is handling these,
> though.
>
> Dima
>
>
> On Tue, 23 Aug 2022, 15:22 Waldek Hebisch, <[email protected]> 
> wrote:
>
>> On Tue, Aug 23, 2022 at 05:55:29AM -0700, 'Martin R' via FriCAS - 
>> computer algebra system wrote:
>> > If I understand correctly, FriCAS' result of integrate(1/(b*x^5+a), x) 
>> > contains some algebraic numbers with placeholders like %%G0.  To 
>> convert 
>> > the result into a sage expression, these are substituted back.  
>> > Unfortunately, these expressions may be extremely large, and this 
>> effect 
>> > multiplies when the constants appear multiple times.
>>
>> Those are not placeholders, they are roots of polynomials in
>> implict form.  MMas call them RootOf.
>>
>> > If you have any suggestions on how to improve the situation, I'd be 
>> happy 
>> > to hear it.  Leaving them out is not really an option, because one may 
>> want 
>> > to do further computations with the integral.
>>
>> Represent them faithfully as implicit roots.  AFAICS Sage expands
>> them to explicit form and this is _much_ larger than necessary.
>> Worse, explicit form is problematic for later computations.
>>
>> BTW: Could you try the the attached patch?  The patch is not
>> ready to be included now, but once problems are worked out
>> many integrals will produce result like below.  In this example
>> with the patch I get:
>>
>> (1) -> integrate(1/(b*x^5+a), x)
>>
>>                 --+
>>    (1)          >             %E log(x + 5 %E a)
>>                 --+
>>               4    5
>>         3125 a b %E  - 1 = 0
>>                                          Type: 
>> Union(Expression(Integer),...)
>> (2) -> %::EXPR(INT)::InputForm
>>
>>    (2)
>>    (%root_sum  (* %E (log (+ x (* (* 5 %E) a))))  %E
>>     (/ (+ (* (* (* 3125 (^ %E 5)) (^ a 4)) b) - 1) (* (* 3125 (^ a 4)) 
>> b)))
>>                                                               Type: 
>> InputForm
>>
>>
>> -- 
>>                               Waldek Hebisch
>>
>> -- 
>> 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/20220823142241.GA29641%40fricas.math.uni.wroc.pl
>> .
>>
>

-- 
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/4c7fc330-c2a7-4824-9d67-085ad948ccb7n%40googlegroups.com.

Reply via email to