In previous therad "fix rational function integration", I made a few mistakes, and there is a new bug I just discovered, so I'm starting a new thread.
## Bug Description 1. f := (2560*x^3 - 400*x^2 - 576*x - 84)/(320*x^4 + 80*x^3 - 12*x^2 + 24*x + 9) integration of "f" is not continuous. 2. The composed function "h == eval(f, x = g x)*D(g x, x)" where "g" is another function, the integration of "h" should also be continuous. 3. "integrate( sqrt(1 - x^4)/(1 + x^4), x)" is not continuous, causing definite integration to be incorrect. ## The problem This bug originates from irexpand.spad, package IR2F, function "ilog". As the comment says, "ilog transforms i log((a + i b) / (a - i b)) into a sum of real arc-tangents using Rioboo's algorithm", see Bronstein's Symbolic Integration 1, section 2.8. This algorithm requires to compute "extendedEuclidean(a,b)", where a,b should be a univariate polynomial of something, the selected kernel k in function "ilog". In general a,b are EXPR, so the kernel selection got tricky. Simply 'k := "max"/l' does not work, this causes sqrt(11) got selected over 'x' (bug 1), sqrt(1-x^4) got selected where it shouldn't be (bug 3). ## Solution I don't think in general there's an algorithm that can: given single variable expression a,b, find a common kernel k that both a and b can be expressed as an univariate polynomial of k. My proposed change to this part will be "defensive": 1. If a,b only have one kernel, then try to simplify them. 2. If a,b have kernels [f(x),f(x)^(1/n)], treat this case specially. (Other special cases may be added.) 3. Otherwise, we don't apply this ilog simplification. -- You received this message because you are subscribed to the Google Groups "FriCAS - computer algebra system" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/fricas-devel. For more options, visit https://groups.google.com/d/optout.
