Skip to content

integral computation with giac crashes giac #25822

@sagetrac-tmonteil

Description

@sagetrac-tmonteil

As reported on this Ask Sage question, Giac crashes on the following integral:

sage: print(version())
SageMath version 8.3.rc0, Release Date: 2018-07-08
sage: a, b, c, d, e, x = SR.var('a b c d e x')
sage: F = sqrt(d*x^2 + e*x + c)*sqrt((b*x^2 + a)^2)/x^4
sage: FF = integrate(F, x, algorithm='giac')
Giac crashed -- automatically restarting.
sage:

This is fixed upstream and will be part of the next stable version of Giac.

Another issue when using Giac for integration is the following:

sage: print(version())
SageMath version 8.3.rc0, Release Date: 2018-07-08
sage: a, b, c, d, e, f, g, n, x = SR.var('a b c d e f g n x')
sage: G = 1/((g*x + f)^2*(b*log((e*x + d)^n*c) + a)^3)
sage: GG = integrate(G, x, algorithm='giac')
sage: GG
Done
sage:

Quoting Frederic Han's comment (with minor edits):

this is a bug of the pexpect Giac interface that takes the string
representation of the Giac output. The computation is done in Giac
but when the output is large Giac just prints Done, and that is
the string that the pxepect interface gets. It is not specific to
integrate: it will concern all large Giac output.

Quoting Bernard Parisse's comment:

The maximal size of objects that will be printed should be
controllable with the environment variable GIAC_TAILLEMAX
(default 1000). Size is not the length of the printed string,
but the size of the giac::gen as defined in symbolic.h:

unsigned taille(const gen & g,unsigned max);

Depends on #26315

Upstream: Fixed upstream, but not in a stable release.

CC: @frederichan-IMJPRG @sagetrac-parisse @slel

Component: symbolics

Keywords: giac, integrate, crash, pexpect

Issue created by migration from https://trac.sagemath.org/ticket/25822

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions