Usenet-ի նոր գրառումները/բաժանորդագրությունները այլևս Google Խմբերում չեն աջակցվում։ Առկա բովանդակությունը նախկինի պես հնարավոր կլինի դիտել։

what are these HUGE integers that giac generates for some integrals?

15 դիտում
Անցնել առաջին չկարդացված հաղորդագրությանը

Nasser M. Abbasi

չկարդացված,
16 հնս, 2022 թ., 00:21:2316.06.22
I am using giac 1.9.0-7. (latest) https://www-fourier.ujf-grenoble.fr/~parisse/giac.html
but using its C++ API interface to call integrate. Not using sagemath. This is much
faster.

But I noticed a problem which I do not understand. Using the
standard giac interface on Linux, some integrals do not generate
output on the terminal and no error. I think this happens
when the output is too large as in this example, and it automatically
does not show the output?

Here is an example

--------------------------
3>> integrate(cos(d*x+c)^5/(a+a*sin(d*x+c))^(1/2),x)

Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):
Check [abs(cos((d*x+c)/2-pi/4))]
Discontinuities at zeroes of cos((d*x+c)/2-pi/4) were not checked

Evaluation time: 169.17
Done
// Time 169.17
----------------------------

But my C++ program which calls the giac library directly, does get the output.

it is HUGE.

I do not understand how could the numbers it generates be so large. The
antiderivative for the above is in this file (it is 11 MB long, just
for this one integrate command)

https://12000.org/tmp/giac_large_output/large_numbers.txt


of course my Latex compiler falls apart when it hits this result.
So I have to manually remove all these outputs each time and there
are many of them. I need to automate this.

But for example, Mathematica gives this much shorter output

--------------------------------
In[164]:= Integrate[Cos[d*x + c]^5/(a + a*Sin[d*x + c])^(1/2), x]

Out[164]= (2*(1 + Sin[c + d*x])^3*(107 - 110*Sin[c + d*x] +
35*Sin[c + d*x]^2))/(315*d*Sqrt[a*(1 + Sin[c + d*x])])
--------------------------------

Any possible explanation of the algorithm that giac uses that would
result in generating such very long integers in the output of giac?

This also do not show up when using sagemath to call giac (below is link
to last year tests). I suspect that sagemath do not handle such large
output also and does not show it, that is why this is first time I see
these.

Btw, the above integrals is from Rubi's test suite. Here is last years output:

<https://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2021/test_cases/4_Trig_functions/4.1_Sine/4.1.2.2-g_cos-%5Ep-a+b_sin-%5Em-c+d_sin-%5En/rese158.htm#x162-1860003.158>


--Nasser



Nasser M. Abbasi

չկարդացված,
16 հնս, 2022 թ., 00:29:4816.06.22
On 6/15/2022 11:21 PM, Nasser M. Abbasi wrote:

> Btw, the above integrals is from Rubi's test suite. Here is last years output:
>
> <https://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2021/test_cases/4_Trig_functions/4.1_Sine/4.1.2.2-g_cos-%5Ep-a+b_sin-%5Em-c+d_sin-%5En/rese158.htm#x162-1860003.158>
>
>

Opps. Wrong link. Here is the correct integral

<https://www.12000.org/my_notes/CAS_integration_tests/reports/summer_2021/test_cases/4_Trig_functions/4.1_Sine/4.1.1.2-g_cos-%5Ep-a+b_sin-%5Em/rese158.htm#x162-1860003.158>

I see that giac last year version (1.7 version) that it generated much
shorter output for this same integral (using sagemath interface)

----------------------------

integrate(cos(d*x+c)^5/(a+a*sin(d*x+c))^(1/2),x, algorithm="giac")


2/315*(107*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1) + (315*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1) + (324*a^4/sgn(tan(1/2*d
*x + 1/2*c) + 1) + (420*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1) + (882*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1) + (882*a^4/
sgn(tan(1/2*d*x + 1/2*c) + 1) + (420*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1) + (324*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1
) + (107*a^4*tan(1/2*d*x + 1/2*c)/sgn(tan(1/2*d*x + 1/2*c) + 1) + 315*a^4/sgn(tan(1/2*d*x + 1/2*c) + 1))*tan(1
/2*d*x + 1/2*c))*tan(1/2*d*x + 1/2*c))*tan(1/2*d*x + 1/2*c))*tan(1/2*d*x + 1/2*c))*tan(1/2*d*x + 1/2*c))*tan(1
/2*d*x + 1/2*c))*tan(1/2*d*x + 1/2*c))*tan(1/2*d*x + 1/2*c))/((a*tan(1/2*d*x + 1/2*c)^2 + a)^(9/2)*d)
--------------------------------

It is possible then this could be a new bug in giac. I will report it now
just in case.

--Nasser
0 նոր հաղորդագրություն