Opened 11 months ago

Last modified 4 days ago

#29966 new defect

integrate(sqrt(x + sqrt(x)), x, algorithm='giac') raises RuntimeError

Reported by: slabbe Owned by:
Priority: major Milestone: sage-9.4
Component: symbolics Keywords: integral, giac, pari
Cc: chapoton, dimpase, frederichan, parisse, slabbe, slelievre Merged in:
Authors: Reviewers:
Report Upstream: Fixed upstream, but not in a stable release. Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

From https://ask.sagemath.org/question/50885/is-there-a-way-to-integrate-sqrtxsqrtx-in-sage/, the command

sage: integrate(sqrt(x + sqrt(x)), x, algorithm='giac')

returns

Traceback (most recent call last):
...
AttributeError: 
...
During handling of the above exception, another exception occurred:
...
RuntimeError: An error occurred running a Giac command:
INPUT:
sage2
OUTPUT:
Warning, choosing root of [1,0,0,%%%{4,[1]%%%},%%%{4,[2]%%%}+%%%{-1,[1]%%%}] at parameters values [-97]
Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong.
The choice was done assuming [x]=[9]
Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong.
The choice was done assuming [x]=[54]
  ***   bug in PARI/GP (Bus Error), please report.sym2poly exception caught Error in PARI subsystem Error: Bad Argument Value
Warning, need to choose a branch for the root of a polynomial with parameters. This might be wrong.
The choice was done assuming [x]=[64]

  ***   bug in PARI/GP (Segmentation Fault), please report.sym2poly exception caught Error in PARI subsystem Error: Bad Argument Value

  ***   bug in PARI/GP (Segmentation Fault), please report.sym2poly exception caught Error in PARI subsystem Error: Bad Argument Value

  ***   Warning: normalizing a polynomial with 0 leading term.
  ***   Warning: normalizing a polynomial with 0 leading term.
Warning, choosing root of [1,0,0,%%%{4,[1]%%%},%%%{4,[2]%%%}+%%%{-1,[1]%%%}] at parameters values [6.38357630698]
  ***   Warning: normalizing a polynomial with 0 leading term.
  ***   Warning: normalizing a polynomial with 0 leading term.
Warning, choosing root of [1,0,0,%%%{4,[1]%%%},%%%{4,[2]%%%}+%%%{-1,[1]%%%}] at parameters values [82.1195442914]
2*(2*((1/6*sqrt(x)+1/24)*sqrt(x)-1/16)*sqrt(x+sqrt(x))-1/16*ln(sqrt(4*sqrt(x)+1-4*sqrt(x)*cos((pi*sign(im(sqrt(x)))*sign(x+re(sqrt(x)))-pi*sign(im(sqrt(x)))-2*atan(im(sqrt(x))/(x+re(sqrt(x)))))/2)+rootof([[-4,-4,0],[1,0,0,4*x,4*x^2-x]])*cos(1/2*(atan(im(sqrt(x))/(x+re(sqrt(x))))+(1-sign(x+re(sqrt(x))))*sign(im(sqrt(x)))*pi/2)))))

This was not fixed by #28913.

Change History (8)

comment:1 Changed 8 months ago by chapoton

  • Keywords integral added

comment:2 Changed 7 months ago by mkoeppe

  • Milestone changed from sage-9.2 to sage-9.3

comment:3 Changed 4 months ago by slelievre

  • Cc chapoton dimpase frederichan parisse slabbe slelievre added
  • Keywords giac pari added

comment:4 Changed 4 months ago by parisse

Now returns

2*(2*((1/6*sqrt(x)+1/24)*sqrt(x)-1/16)*sqrt(x+sqrt(x))-1/16*ln(abs(2*(sqrt(x+sqrt(x))-sqrt(x))-1)))

abs inside the ln was ineffective

comment:5 Changed 4 months ago by chapoton

dans quelle version de giac ?

comment:7 Changed 4 months ago by slabbe

  • Report Upstream changed from N/A to Fixed upstream, but not in a stable release.

Do we know the version of some release of giac which will solve the bug?

The current version with the bug is:

$ sage -standard | grep giac
giac....................................1.5.0.87p2.p1 (1.5.0.87p2.p1)

comment:8 Changed 4 days ago by mkoeppe

  • Milestone changed from sage-9.3 to sage-9.4

Moving to 9.4, as 9.3 has been released.

Note: See TracTickets for help on using tickets.