On Mon, Mar 23, 2020 at 01:03:06PM -0700, 'Nasser M. Abbasi' via FriCAS - computer algebra system wrote:
> Could someone please explain why this call to integrate fails first time,
> but works second time?
>
> Running 1.3.6 on Linux Manjaro under Virtual box
>
> (1) -> setSimplifyDenomsFlag(true)
>
> (1) false
> Type:
> Boolean
> (2) -> integrate((b*x + a)^(3/2)*(d*x + c)^(5/2)/x^7,x)
>
> >> Error detected within library code:
> "failed" of mode
> Union(SparseUnivariatePolynomial(Expression(Integer)),"failed") cannot be
> coerced to mode SparseUnivariatePolynomial(Expression(Integer))
The failure was due to wrong GCD. GCD routine substitutes
(pseudo)-random numbers in place of parameters and it
did not notice that substitution resulted in division by
zero, hence nonsense result. Second run used different
(pseudo)-random numbers, so problem did not appear.
When you start FriCAS (pseudo)-random number generator
starts in the same state, so failure is reprducible.
This is relatively new bug, it was introduced about 5 years
ago and exposed by recent change to order of computations
(whcih chanded usage pattern of random number generator.
--
Waldek Hebisch