disable generating warning messages from integrate command?
Publié : lun. juin 19, 2023 11:29 pm
Is there a global option to set in giac to disable generating warning messages that show before the result of integration?
I will an example below.
The reason I am asking, is that I am calling giac from sagemath. And sagemath gives an exception when it gets back result with these warning in them as it does not how to parse them. And so now these integrals are counted as failed.
Here is an example
If it could generate only
Then it will at least not give an exception in sagemath. This is what happens in sagemath
If there is a way to configure or build giac not to generate these warnings (just for the purpose of these tests), it will also improve its score of number of solved integrals. This is regardless if the result is correct or not, as that is different issue. But at least it will be able to record the result instead of now not being able to do that.
Using sagemath 10 and giac 1.9.0-55
--Nasser
I will an example below.
The reason I am asking, is that I am calling giac from sagemath. And sagemath gives an exception when it gets back result with these warning in them as it does not how to parse them. And so now these integrals are counted as failed.
Here is an example
Code : Tout sélectionner
>giac
0>> integrate(1/(2*x^(1/2)+(1+x)^(1/2))^2,x)
Warning, choosing root of [1,0,%%%{-4,[1]%%%}+%%%{-2,[0]%%%},0,1] at parameters values [92.1017843988]
Warning, choosing root of [1,0,%%%{-4,[1]%%%}+%%%{-2,[0]%%%},0,1] at parameters values [1.14118046779]
2*((-5*x-1)/6/(3*x-1)+5/18*ln(abs(3*x-1))+2*(2/9*ln(sqrt(x+1)-sqrt(x))+5/36*ln(abs((sqrt(x+1)-sqrt(x))^2-3))-5/36*ln(abs(3*(sqrt(x+1)-sqrt(x))^2-1))-(10*(sqrt(x+1)-sqrt(x))^2-6)/9/(3*(sqrt(x+1)-sqrt(x))^4-10*(sqrt(x+1)-sqrt(x))^2+3)))
// Time 0.02
1>>
Code : Tout sélectionner
2*((-5*x-1)/6/(3*x-1)+5/18*ln(abs(3*x-1))+2*(2/9*ln(sqrt(x+1)-sqrt(x))+5/36*ln(abs((sqrt(x+1)-sqrt(x))^2-3))-5/36*ln(abs(3*(sqrt(x+1)-sqrt(x))^2-1))-(10*(sqrt(x+1)-sqrt(x))^2-6)/9/(3*(sqrt(x+1)-sqrt(x))^4-10*(sqrt(x+1)-sqrt(x))^2+3)))
Code : Tout sélectionner
>sage
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 10.0, Release Date: 2023-05-20 │
│ Using Python 3.10.9. Type "help()" for help. │
└────────────────────────────────────────────────────────────────────┘
sage: var('x')
x
sage: integrate(1/(2*x^(1/2)+(1+x)^(1/2))^2,x, algorithm="giac")
NotImplementedError: unable to parse Giac output: Warning, choosing root of [1,0,%%%{-4,[1]%%%}+%%%{-2,[0]%%%},0,1] at parameters values [5.38357630698]
Warning, choosing root of [1,0,%%%{-4,[1]%%%}+%%%{-2,[0]%%%},0,1] at parameters values [81.1195442914]
2*((-5*(sageVARx+1)+4)/6/(3*(sageVARx+1)-4)+5/18*ln(abs(3*(sageVARx+1)-4))+2*(1/9*ln((sqrt(sageVARx)-sqrt(sageVARx+1))^2)+5/36*ln(abs((sqrt(sageVARx)-sqrt(sageVARx+1))^2-3))-5/36*ln(abs(3*(sqrt(sageVARx)-sqrt(sageVARx+1))^2-1))-(10*(sqrt(sageVARx)-sqrt(sageVARx+1))^2-6)/9/(3*(sqrt(sageVARx)-sqrt(sageVARx+1))^4-10*(sqrt(sageVARx)-sqrt(sageVARx+1))^2+3)))
sage:
Using sagemath 10 and giac 1.9.0-55
--Nasser