[BUG] [regression] falsely claim an integral is not integrable

7 views
Skip to first unread message

Qian Yun

unread,
Nov 26, 2020, 5:25:04 AM11/26/20
to fricas...@googlegroups.com
There 27 integrals from the BWD test set are affected by this.

Examples are

int(-3*x^2- 2 - 1/(sqrt(1 - atan(x)^2)*(x^2 + 1)*asin(atan(x))), x)

int(-1/(sqrt(1-(x - 5 + atan(4))^2)*acos(x - 5 + atan(4))^2), x)

The regression is svn r2510 or git c9474effcc2a0218ab641ab96d081a3538b38674.
(between 1.3.4 and 1.3.5)

diff --git a/ChangeLog b/ChangeLog
index 46325dc2..26542069 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2018-10-20 Waldek Hebisch <heb...@math.uni.wroc.pl>
+
+ * src/algebra/efstruc.spad: Block unwanted evaluation
+
2018-10-16 Qian Yun <oldk...@gmail.com>

* src/hyper/titlebar.c: Support long filename in HyperDoc
diff --git a/src/algebra/efstruc.spad b/src/algebra/efstruc.spad
index 733ddc1f..7535cdea 100644
--- a/src/algebra/efstruc.spad
+++ b/src/algebra/efstruc.spad
@@ -836,7 +836,7 @@ InnerTrigonometricManipulations(R, F, FG) : Exports
== Implementation where
- im * (e - 1) /$FG (e + 1)
is?(k, 'atan) =>
im * log((1 -$FG im *$FG z)/$FG (1 +$FG im *$FG z))$FG / (2::FG)
- (operator k) args
+ kernel((operator k), args)

trigs2explogs(f, l) ==
smp2explogs(numer f, l) / smp2explogs(denom f, l)
diff --git a/src/input/integ.input b/src/input/integ.input
index 9861e1b3..2fc37e87 100644
--- a/src/input/integ.input
+++ b/src/input/integ.input
@@ -672,6 +672,9 @@ testIntegrate("1/(x^3*(a+b*x/sqrt(3))^(1/3))", "x",
"alg")
-- substitution
testIntegrate("1/(sqrt(10) - x^2)^(1/2)", "x", "alg")

+-- Gave ugly result due to mishandled root
+testIntegrate("sin(x^2)/fresnelS(x*(2/pi())^(1/2))", "x", "liou")
+
testcase "specific integrals"

testEquals("integrate((x + 2)^2/((x+2)^6 + 1), x)", "atan((x+2)^3)/3")

Qian Yun

unread,
Mar 1, 2021, 10:38:31 PM3/1/21
to fricas...@googlegroups.com

Waldek Hebisch

unread,
Mar 2, 2021, 7:27:06 AM3/2/21
to fricas...@googlegroups.com
On Tue, Mar 02, 2021 at 11:38:19AM +0800, Qian Yun wrote:
> I guess this is fixed by=20
> https://github.com/fricas/fricas/commit/321784b54aec497d3049c56f14b654bf8b1=
> 99ea0

I think so. In core integrator we should work with differential
field, which in practice means use some fixed set of kernels.
Apparently, before svn r2510 two wrongs cancelled...
> On 11/26/20 6:24 PM, Qian Yun wrote:
> > There 27 integrals from the BWD test set are affected by this.
> > =20
> > Examples are
> > =20
> > int(-3*x^2- 2 - 1/(sqrt(1 - atan(x)^2)*(x^2 + 1)*asin(atan(x))), x)
> > =20
> > int(-1/(sqrt(1-(x - 5 + atan(4))^2)*acos(x - 5 + atan(4))^2), x)
> > =20
> > The regression is svn r2510 or git=20
> > c9474effcc2a0218ab641ab96d081a3538b38674.
> > (between 1.3.4 and 1.3.5)

--
Waldek Hebisch
Reply all
Reply to author
Forward
0 new messages