Ask Your Question
1

many integrals cause giac crash but work inside giac

asked 2022-02-18 04:28:47 +0200

Nasser gravatar image

updated 2022-02-18 04:47:50 +0200

Using sagemath 9.5, some integrals in giac return antiderivative which can be used, but giac adds some warning messages before these.

But from sagemath instead I get

Giac crashed -- automatically restarting.
sage16*x

Is it possible to make sagemath return the antiderivative found? Here is an example

sage: var("x d e a b c m")
sage: integrate(x^4 / (b ^ 2 * x^2 + 2 * a * b * x + a^2)^(3 / 2), x, algorithm="giac")
Giac crashed -- automatically restarting.
sage20*x

Doing same thing from inside giac 1.7 gives

12>> integrate(x^4/(b^2*x^2 + 2*a*b*x + a^2)^(3/2),x)
Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):
Check [abs(b*x+a)]
Discontinuities at zeroes of b*x+a were not checked
1/2*(8*a^3*b*x+7*a^4)/(b^5*(b*x+a)^2*sign(b*x+a))+(1/2*b^3*x^2*sign(b*x+a)-3*a*b^2*x*sign(b*x+a))/(b^6*sign(b*x+a)^2)+6*a^2*ln(abs(b*x+a))/(b^5*sign(b*x+a))
// Time 0.01
13>>

So it worked in spite of these warning messages. This makes it look like giac did not solve this integral when in fact it solved it (I do not know if the result is correct or not)

I might have asked about this before but I do not remember now. if I did, it must be long time ago, and the problem is still here.

This causes giac result in a test I am running to show lower than they should be.

There are many many more such examples. Here are few more integrand which all cause giac crashes in sagemath

x^3/(b^2*x^2+2*a*b*x+a^2)^(3/2)
x^2/(b^2*x^2+2*a*b*x+a^2)^(3/2)
x/(b^2*x^2+2*a*b*x+a^2)^(3/2)
1/(b^2*x^2+2*a*b*x+a^2)^(3/2)
1/x/(b^2*x^2+2*a*b*x+a^2)^(3/2)
etc..

Is there an option or way to handle this? Why does sagemath say that giac crashed when it does not when used directly?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
2

answered 2022-02-18 23:30:02 +0200

mwageringel gravatar image

This looks like a bug in giac. The integrand that Sage passes to giac is

(b^2*x^2 + a*b*x*2 + a^2)^(-3/2) * x^4

which is equivalent to the one you defined. This however crashes in giac itself:

0>> integrate((b^2*x^2 + a*b*x*2 + a^2)^(-3/2) * x^4, x)
Warning, integration of abs or sign assumes constant sign by intervals (correct if the argument is real):
Check [abs(b*t_nostep+a)]
Discontinuities at zeroes of b*t_nostep+a were not checked
Segmentation fault (core dumped)

(tested with giac 1.7.0)

edit flag offensive delete link more

Comments

Thanks. This is strange since it is the same integral but because sagemath wrote differently it caused a coredump in giac?. Is there a forum to post giac bugs at? I have not been able to find one.

Nasser gravatar imageNasser ( 2022-02-19 00:02:09 +0200 )edit

fyi, I just send email about this to the developer of giac directly as I know of no site to report bugs in giac.

Nasser gravatar imageNasser ( 2022-02-19 00:10:44 +0200 )edit

fyi. I Just asked another question about giac crash in sagemath. but it looks to me due to different cause than this question, as it does not crash in giac. Only in sagemath

Nasser gravatar imageNasser ( 2022-02-19 07:12:36 +0200 )edit
slelievre gravatar imageslelievre ( 2022-02-19 16:28:20 +0200 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2022-02-18 04:28:47 +0200

Seen: 192 times

Last updated: Feb 18 '22