Axiom web interface currently out of whack

158 views
Skip to first unread message

clicl...@freenet.de

unread,
Jan 2, 2016, 4:15:49 PM1/2/16
to

This does not augur well for 2016: The year starts with the axiom web
interface at

<http://axiom-wiki.newsynthesis.org/RationalInterpolation>

being out of order. Trying the trivial input

\begin{axiom}
integrate(x, x)
\end{axiom}

and hitting the "Preview" button gives:

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Site Error

An error was encountered while publishing this resource.

IOError
Sorry, a site error occurred.

Traceback (innermost last):

* Module ZPublisher.Publish, line 202, in publish_module_standard
* Module ZPublisher.Publish, line 150, in publish
* Module plone.app.linkintegrity.monkey, line 21, in
zpublisher_exception_hook_wrapper
* Module Zope2.App.startup, line 221, in zpublisher_exception_hook
* Module ZPublisher.Publish, line 119, in publish
* Module ZPublisher.mapply, line 88, in mapply
* Module ZPublisher.Publish, line 42, in call_object
* Module Products.ZWiki.ZWikiPage, line 229, in __call__
* Module Products.ZWiki.ZWikiPage, line 241, in render
* Module Products.ZWiki.pagetypes.stx, line 96, in render
* Module Products.ZWiki.Views, line 668, in addSkinTo
* Module Shared.DC.Scripts.Bindings, line 313, in __call__
* Module Products.PloneHotfix20110531, line 106, in
_patched_bindAndExec
* Module Products.PloneHotfix20121106.python_scripts, line 63, in
_patched_bindAndExec
* Module Shared.DC.Scripts.Bindings, line 350, in _bindAndExec
* Module Products.PageTemplates.ZopePageTemplate, line 330, in _exec
* Module Products.PageTemplates.ZopePageTemplate, line 427, in
pt_render
* Module Products.PageTemplates.PageTemplate, line 89, in pt_render
* Module zope.pagetemplate.pagetemplate, line 117, in pt_render
* Module zope.tal.talinterpreter, line 271, in __call__
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 891, in do_useMacro
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 536, in do_optTag_tal
* Module zope.tal.talinterpreter, line 521, in do_optTag
* Module zope.tal.talinterpreter, line 516, in no_tag
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 949, in do_defineSlot
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 534, in do_optTag_tal
* Module zope.tal.talinterpreter, line 516, in no_tag
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 891, in do_useMacro
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 891, in do_useMacro
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 855, in do_condition
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 855, in do_condition
* Module zope.tal.talinterpreter, line 346, in interpret
* Module zope.tal.talinterpreter, line 745, in
do_insertStructure_tal
* Module Products.PageTemplates.Expressions, line 221, in
evaluateStructure
* Module zope.tales.tales, line 696, in evaluate
URL: /mathaction/commentform
Line 90, Column 0
Expression: <PythonExpr here.renderText(
text,type,REQUEST=request,RESPONSE=request.RESPONSE)>
Names:

{'container': <Folder at /mathaction>,
'context': <ZWikiPage 'RationalInterpolation' at 0x246e8290>,
'default': <object object at 0x7ffbeb569240>,
'here': <ZWikiPage 'RationalInterpolation' at 0x246e8290>,
'loop': {},
'nothing': None,
'options': {'args': (<ZWikiPage 'RationalInterpolation' at 0x246e8290>,
<HTTPRequest,
URL=http://axiom-wiki.newsynthesis.org/RationalInterpolation/view>),
'body': '<div
class="latexwiki">\n<h2>Introduction</h2>\n<p> This file contains an
implementation of rational interpolation, where the data\npoints are
element of any integral domain.</p>\n<h2>Questions and
Outlook</h2>\n\n<ul>\n<li>Maybe this file should be joined with
pinterp.spad, where polynomial\n Lagrange interpolation is
implemented. This version parallels the structure\n of pinterp.spad
closely. This also answers comments and questions from\n wyscc. He
remarked\n<ul>\n<li>Abbreviations for a constructor should be limited to
7 letters (not 8).\n The system occasionally adds the 8th character
to a package for internal\n use.</li>\n<li>Function names begin
with a lower case, so <a
href="http://axiom-wiki.newsynthesis.org/RationalInterpolation">RationalInterpolation</a>
should\n be rationalInterpolation, or better,
rationalInterpolate.</li>\n\n</ul>\n</li>\n<li>Regarding the types I
used for the values, wyscc remarked\n<ul>\n<li>If we are doing a
rational interpolation, presumably the values are\n rational, so it
does not make sense to require the <img alt="y" title="y"
class="equation" src="images/3644510302842779560-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="9"
height="12"/>-coordinates of\n inputs be integral. On the other
hand, as in the above example, if one\n uses <code>FRAC INT</code>,
problems can arise when this package is combined with\n other
packages that constructs the quotient field of the parameter
domain\n <code>F</code> because Axiom does not like constructing
<code>FRAC FRAC INT</code>.</li>\n\n</ul>\n<p> Note however, that the
package would rather construct the type <code>FRAC SUP\n FRAC
INT</code>, so this problem should not occur. Moreover, there are
situations\n - for example in the package [mantepse.spad2]<a
class="new visualNoPrint"
href="http://axiom-wiki.newsynthesis.org/RationalInterpolation/createform?page=mantepse.spad2"
title="create this page">?</a>, where we want to interpolate values\n
from an IntegralDomain<a class="new visualNoPrint"
href="http://axiom-wiki.newsynthesis.org/RationalInterpolation/createform?page=IntegralDomain"
title="create this page">?</a>. Of course we could first convert them to
the\n quotient field, however, the current approach seems more
natural to me.</p>\n</li>\n<li>Finally, wyscc asked:\n If <code>p(xx)
= interpolate(lx, ly, m, k)</code>, what is the purpose of\n
<code>elt(px, qx) = p(qx)</code>, the composition of <code>p(xx)</code>
and\n <code>qx</code>, especially when <code>qx</code> is from
<code>FRAC UP(xx,\n F)</code> instead of from just <code>F</code>?
and why is this function\n (the composition) also called
<code>interpolate</code>?<p> I do not really know - apart from a very
superficial level: Clearly, the\n second function was intended to let
the user easily plug in values into the\n interpolated function. I
don\'t find this sensible and I would be happy to\n change it.
Indeed, this would also get rid of the first parameter to\n
<code>RINTERP</code>, which is quite a nuisance.</p>\n<p> I think we
should agree on a general interface for interpolation\n algorithms,
and mark <code>PINTERP</code> as obsolete. By the way, it seems
that\n <code>RINTERP</code> is faster, too.</p>\n</li>\n<li>There are
probably better ways to implement rational interpolation. Maybe\n <a
href="http://www.cs.ucsb.edu/~omer/personal/abstracts/rational.html">http://www.cs.ucsb.edu/~omer/personal/abstracts/rational.html</a>\n
contains something useful. In particular, in my package
[mantepse.spad2]<a class="new visualNoPrint"
href="http://axiom-wiki.newsynthesis.org/RationalInterpolation/createform?page=mantepse.spad2"
title="create this page">?</a>, in <code>guessRat</code>\n and
<code>guessExpRat</code> I generate interpolating polynomials for all
possible degrees \n of numerator and denominator. The above article
contains an algorithm that does \n this in time <img alt="O(n^2)"
title="O(n^2)" class="equation"
src="images/3457654165008507370-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="39" height="20"/>, which would
be quite nice. Currently, I need <img alt="O(n^2)" title="O(n^2)"
class="equation" src="images/3457654165008507370-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="39"
height="20"/> \n operations for <em>each</em> degree!</li>\n<li>For
polynomial interpolation, there seems to be an algorithm that needs
\n only <img alt="O(n\\log(n)^2\\log\\log(n))"
title="O(n\\log(n)^2\\log\\log(n))" class="equation"
src="images/2812047165959573488-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="151" height="20"/> operations.
It can be found in van zur Gathen\'s book\n "Modern computer
algebra", chapter 10.</li>\n<li>For those who speak german,\n <a
href="http://www.num.math.uni-goettingen.de/schaback/teaching/numath.ps">http://www.num.math.uni-goettingen.de/schaback/teaching/numath.ps</a>\n
contains quite a bit of information.</li>\n<li>This implementation of
rational interpolation neither takes care of\n unattainable points,
nor does it check whether the values of the\n <img alt="x" title="x"
class="equation" src="images/3644510302843779557-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="8"
height="9"/>-coordinates are all distinct.</li>\n<li>Comments
welcome!</li>\n\n</ul>\n<p><div id="axiomlabel"
align="right">spad</div><pre id="axiomcode">)abbrev package RINTERPA
RationalInterpolationAlgorithms\n++ Description&#58;\n++ This package
exports rational interpolation
algorithms\nRationalInterpolationAlgorithms(F,<wbr /> P)&#58; Cat ==
Body where\n F&#58; IntegralDomain \n P&#58;
UnivariatePolynomialCategory(F)\n Cat == with\n
RationalInterpolation&#58; (List F,<wbr /> List F,<wbr />
NonNegativeInteger,<wbr />\n
NonNegativeInteger) \n -&gt; Fraction
P\n +++ We assume that the elements of the first list are all
distinct.\n +++ If they are not,<wbr /> division by zero might
occur.<br />\n Body == add\n RationalInterpolation(xlist,<wbr
/> ylist,<wbr /> m,<wbr /> k) ==\n &#35;xlist ^= &#35;ylist
=&gt;\n error &quot;Different number of points and
values.&quot;\n &#35;xlist ^= m+k+1 =&gt;\n
error &quot;wrong number of points&quot;\n tempvec&#58; List
F &#58;= &#91;1 for i in 1..(m+k+1)&#93;<br />\n collist&#58;
List List F &#58;= cons(tempvec,<wbr />
\n &#91;(tempvec &#58;=
&#91;tempvec.i &#42; xlist.i
&#95;\n for i in
1..(m+k+1)&#93;) &#95;\n for j
in 1..max(m,<wbr /> k)&#93;)<br />\n collist &#58;=
append(&#91;collist.j for j in 1..(m+1)&#93;,<wbr />
&#95;\n &#91;&#91;- collist.j.i &#42;
ylist.i for i in 1..(m+k+1)&#93; &#95;\n
for j in 1..(k+1)&#93;)\n resspace&#58; List Vector F &#58;=
nullSpace((transpose matrix collist)
&#95;\n &#58;&#58;Matrix
F)\n reslist&#58; List List P &#58;=
&#95;\n &#91;&#91;monomial((resspace.1).(i+1),<wbr
/> i) for i in 0..m&#93;,<wbr /> &#95;\n
&#91;monomial((resspace.1).(i+m+2),<wbr /> i) for i in 0..k&#93;&#93;<br
/>\n reduce((&#95;+),<wbr /> reslist.1)/reduce((&#95;+),<wbr
/> reslist.2)</pre>\n<div id="axiomtext"><div id="axiomlabel"
title="Expand +/- Collapse folded text"align="right"
onClick="expandcontent(this, this.nextSibling.id)" style="cursor:hand;
cursor:pointer;"><span class="showstate"></span>spad</div><div
id="sc1054" class="switchcontent"><pre> Compiling FriCAS source code
from file \n
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/959208282017174297-25px001.spad\n
using old system compiler.\n RINTERPA abbreviates package
RationalInterpolationAlgorithms
\n&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42; Spad syntax error detected
&#42;&#42;&#42;&#42;&#42;&#42;&#42;&#42;\nThe prior line was&#58;<br
/>\n 15&gt; RationalInterpolation(xlist,<wbr /> ylist,<wbr />
m,<wbr /> k) ==<br />\nThe current line is&#58;<br />\n
16&gt; &#35;xlist ^= &#35;ylist =&gt;<br />\nThe number of
valid tokens is 2.\nThe prior token was &#35;S(TOKEN &#58;SYMBOL ^
&#58;TYPE KEYWORD &#58;NONBLANK 16)\nThe current token is &#35;S(TOKEN
&#58;SYMBOL = &#58;TYPE KEYWORD &#58;NONBLANK 16)\nThe next token is
&#35;S(TOKEN &#58;SYMBOL |&#35;| &#58;TYPE KEYWORD &#58;NONBLANK
16)</pre></div></div></p>\n<p><div id="axiomlabel"
align="right">spad</div><pre id="axiomcode">)abbrev package RINTERP
RationalInterpolation\n++ Description&#58;\n++ This package exports
interpolation algorithms\nRationalInterpolation(xx,<wbr /> F)&#58; Cat
== Body where\n xx&#58; Symbol\n F&#58; IntegralDomain\n UP
==&gt; UnivariatePolynomial\n SUP ==&gt;
SparseUnivariatePolynomial<br />\n Cat == with\n
interpolate&#58; (Fraction UP(xx,<wbr /> F),<wbr /> List F,<wbr /> List
F,<wbr /> &#95;\n NonNegativeInteger,<wbr />
NonNegativeInteger) &#95;\n -&gt; Fraction
UP(xx,<wbr /> F)<br />\n interpolate&#58; (List F,<wbr /> List
F,<wbr /> NonNegativeInteger,<wbr /> NonNegativeInteger)
&#95;\n -&gt; Fraction SUP F<br />\n Body ==
add\n RIA ==&gt; RationalInterpolationAlgorithms<br />\n
interpolate(qx,<wbr /> lx,<wbr /> ly,<wbr /> m,<wbr /> k)
==\n px &#58;= RationalInterpolation(lx,<wbr /> ly,<wbr />
m,<wbr /> k)&#36;RIA(F,<wbr /> UP(xx,<wbr /> F))<br />\n
elt(px,<wbr /> qx)<br />\n interpolate(lx,<wbr /> ly,<wbr />
m,<wbr /> k) ==\n RationalInterpolation(lx,<wbr /> ly,<wbr />
m,<wbr /> k)&#36;RIA(F,<wbr /> SUP F)</pre>\n<div id="axiomtext"><div
id="axiomlabel" title="Expand +/- Collapse folded text"align="right"
onClick="expandcontent(this, this.nextSibling.id)" style="cursor:hand;
cursor:pointer;"><span class="showstate"></span>spad</div><div
id="sc1055" class="switchcontent"><pre> Compiling FriCAS source code
from file \n
/var/lib/zope2.10/instance/axiom-wiki/var/LatexWiki/6898989268314666018-25px002.spad\n
using old system compiler.\n RINTERP abbreviates package
RationalInterpolation
\n------------------------------------------------------------------------\n
initializing NRLIB RINTERP for RationalInterpolation \n compiling into
NRLIB RINTERP \n processing macro definition RIA ==&gt;
RationalInterpolationAlgorithms \n compiling exported interpolate
&#58; (Fraction UnivariatePolynomial(xx,<wbr />F),<wbr />List F,<wbr
/>List F,<wbr />NonNegativeInteger,<wbr />NonNegativeInteger) -&gt;
Fraction UnivariatePolynomial(xx,<wbr
/>F)\n&#42;&#42;&#42;&#42;&#42;&#42; comp fails at level 3 with
expression&#58; &#42;&#42;&#42;&#42;&#42;&#42;\nerror in function
interpolate <br />\n(SEQ\n (LET |px|\n | &lt;&lt; |\n ((|elt|\n
(|RationalInterpolationAlgorithms| F (|UnivariatePolynomial| |xx|
F))\n |RationalInterpolation|)\n |lx| |ly| |m| |k|)\n |
&gt;&gt; |)\n (|exit| 1 (|elt| |px|
|qx|)))\n&#42;&#42;&#42;&#42;&#42;&#42; level 3
&#42;&#42;&#42;&#42;&#42;&#42;\n&#36;x&#58;= ((elt
(RationalInterpolationAlgorithms F (UnivariatePolynomial xx F))
RationalInterpolation) lx ly m k)\n&#36;m&#58;=
&#36;EmptyMode\n&#36;f&#58;=\n((((|last| &#35;) (|rest| &#35;) (|first|
&#35;) (|value| &#35;) ...)))<br />\n &gt;&gt; Apparent user
error&#58;\n no modemap for RationalInterpolation with 4
arguments</pre></div></div></p>\n<p>First we check whether we have the
right number of points and values. Clearly\nthe number of points and the
number of values must be identical. Note that we\nwant to determine the
numerator and denominator polynomials only up to a\nfactor. Thus, we
want to determine <img alt="m+k+1" title="m+k+1" class="equation"
src="images/7257407665151355658-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="68" height="14"/>
coefficients, where <img alt="m" title="m" class="equation"
src="images/3644510302862779548-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="15" height="9"/> is the
degree\nof the polynomial in the numerator and <img alt="k" title="k"
class="equation" src="images/3644510302856779534-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="8"
height="13"/> is the degree of the polynomial in\nthe
denominator.</p>\n<p>In fact, we could also leave - for example - <img
alt="k" title="k" class="equation"
src="images/3644510302856779534-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="8" height="13"/> unspecified
and determine it\nas <img alt="k=\\#xlist-m-1" title="k=\\#xlist-m-1"
class="equation" src="images/7632808778548436700-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="135"
height="16"/>: I don\'t know whether this would be better.</p>\n<p>The
next step is to set up the matrix. Suppose that our numerator polynomial
is\n<img alt="p(x)=a_0+a_1x+\\dots+a_mx^m"
title="p(x)=a_0+a_1x+\\dots+a_mx^m" class="equation"
src="images/4897668193594025602-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="203" height="18"/> and that
our denominator polynomial is\n<img alt="q(x)=b_0+b_1x+\\dots+b_mx^m"
title="q(x)=b_0+b_1x+\\dots+b_mx^m" class="equation"
src="images/5918338235473531580-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="197" height="18"/>. Then we
have the following equations, writing <img alt="n" title="n"
class="equation" src="images/3644510302861779551-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="10"
height="9"/>\nfor <img alt="m+k+1" title="m+k+1" class="equation"
src="images/7257407665151355658-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="68" height="14"/>:</p>\n<p><a
name="unnumbered"><table width="95%"><tr><td align="center"
width="95%"><img alt="\n p(x_1)-y_1q(x_1)&amp;=a_0+a_1x_1+\\dots
+a_mx_1^m-y_1(b_0+b_1x_1+\\dots +b_kx_1^k)=0\\\n
p(x_2)-y_2q(x_2)&amp;=a_0+a_1x_2+\\dots +a_mx_2^m-y_2(b_0+b_1x_2+\\dots
+b_kx_2^k)=0\\\n
&amp;\\;\\;\\vdots\\ \n
p(x_n)-y_nq(x_n)&amp;=a_0+a_1x_n+\\dots +a_mx_n^m-y_n(b_0+b_1x_n+\\dots
+b_kx_n^k)=0\n" title="\n p(x_1)-y_1q(x_1)&amp;=a_0+a_1x_1+\\dots
+a_mx_1^m-y_1(b_0+b_1x_1+\\dots +b_kx_1^k)=0\\\n
p(x_2)-y_2q(x_2)&amp;=a_0+a_1x_2+\\dots +a_mx_2^m-y_2(b_0+b_1x_2+\\dots
+b_kx_2^k)=0\\\n
&amp;\\;\\;\\vdots\\ \n
p(x_n)-y_nq(x_n)&amp;=a_0+a_1x_n+\\dots +a_mx_n^m-y_n(b_0+b_1x_n+\\dots
+b_kx_n^k)=0\n" class="equation"
src="images/8348387546368312890-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="522" height="95"/></td><td
width="5%" align="right">&nbsp;</td></tr></table></a></p>\n<p>This can
be written as\n<a name="unnumbered"><table width="95%"><tr><td
align="center" width="95%"><img alt="\n\\begin{bmatrix}\n
1&amp;x_1&amp;\\dots&amp;x_1^m&amp;-y_1&amp;-y_1x_1&amp;\\dots&amp;-y_1x_1^k\\\n
1&amp;x_2&amp;\\dots&amp;x_2^m&amp;-y_2&amp;-y_2x_2&amp;\\dots&amp;-y_2x_2^k\\\n\\vdots\\\n
1&amp;x_n&amp;\\dots&amp;x_n^m&amp;-y_n&amp;-y_nx_n&amp;\\dots&amp;-y_nx_2^k\n"
title="\n\\begin{bmatrix}\n
1&amp;x_1&amp;\\dots&amp;x_1^m&amp;-y_1&amp;-y_1x_1&amp;\\dots&amp;-y_1x_1^k\\\n
1&amp;x_2&amp;\\dots&amp;x_2^m&amp;-y_2&amp;-y_2x_2&amp;\\dots&amp;-y_2x_2^k\\\n\\vdots\\\n
1&amp;x_n&amp;\\dots&amp;x_n^m&amp;-y_n&amp;-y_nx_n&amp;\\dots&amp;-y_nx_2^k\n"
class="equation" src="images/309858286919208781-16.0px.png"
align="bottom" Style="vertical-align:text-bottom" width="383"
height="165"/></td><td width="5%"
align="right">&nbsp;</td></tr></table></a></p>\n<p>We generate this
matrix columnwise, then we can solve the system using
<code>nullSpace</code>.</p>\n<p>Note that it may happen that the system
has several solutions. In this case,\nsome of the data points may not be
interpolated correctly. However, the\nsolution is often still useful,
thus we do not signal an error.</p>\n<p>Since all the solutions of
<code>nullSpace</code> will be equivalent, we can always\nsimply take
the first one. Finally, we return the rational
function.</p>\n<h2>Examples</h2>\n<p> To conclude we present some
examples. To begin with, the following interpolation \nillustrates the
concept of unattainable points:</p>\n<p><div id="axiomlabel"
align="right">fricas</div><pre id="axiomcode">interpolate(&#91;q,<wbr
/>q^2,<wbr />q^3&#93;,<wbr />&#91;0,<wbr />x^1,<wbr />x^2&#93;,<wbr
/>0,<wbr />2)&#36;RINTERP(qn,<wbr /> FRAC POLY INT)</pre>\n<a
name="eq1"><table width="95%"><tr><td align="center" width="95%"><img
alt="\n\\label{eq1}0" title="\n\\label{eq1}0" class="equation"
src="images/6192863038255640386-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="7" height="13"/></td><td
width="5%" align="right"><a
href="#eq1">(1)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>Fraction(Polynomial(Fraction(Polynomial(Integer))))</div></p>\n<p><div
id="axiomlabel" align="right">fricas</div><pre id="axiomcode">f(x) ==
(x^3+5&#42;x-3)/(x^2-3)</pre>\n<div id="axiomtype"><b>Type:
</b>Void</div>\n<div id="axiomlabel" align="right">fricas</div><pre
id="axiomcode">xlist &#58;= &#91;1/2,<wbr /> 4,<wbr /> 1/6,<wbr />
8,<wbr /> 1/10,<wbr /> 12&#93;</pre>\n<a name="eq2"><table
width="95%"><tr><td align="center" width="95%"><img
alt="\n\\label{eq2}\\left[{1 \\over 2}, \\: 4, \\:{1 \\over 6}, \\: 8,
\\:{1 \\over{10}}, \\:{12}\\right]" title="\n\\label{eq2}\\left[{1
\\over 2}, \\: 4, \\:{1 \\over 6}, \\: 8, \\:{1 \\over{10}},
\\:{12}\\right]" class="equation"
src="images/3450946837698470248-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="134" height="41"/></td><td
width="5%" align="right"><a
href="#eq2">(2)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>List(Fraction(Integer))</div>\n<div id="axiomlabel"
align="right">fricas</div><pre id="axiomcode">ylist &#58;= &#91;f(x) for
x in xlist&#93;</pre>\n<div id="axiomtext"><div id="axiomlabel"
title="Expand +/- Collapse folded text" align="right"
onClick="expandcontent(this, this.nextSibling.id)" style="cursor:hand;
cursor:pointer"><span class="showstate"></span>fricas</div><pre
id="sc1056" class="switchcontent">Compiling function f with type
Fraction(Integer) -&gt; Fraction(Integer\n )</pre></div>\n<a
name="eq3"><table width="95%"><tr><td align="center" width="95%"><img
alt="\n\\label{eq3}\\left[{3 \\over{22}}, \\:{{81}\\over{13}},
\\:{{467}\\over{642}}, \\: 9, \\:{{2499}\\over{2990}},
\\:{{595}\\over{47}}\\right]" title="\n\\label{eq3}\\left[{3
\\over{22}}, \\:{{81}\\over{13}}, \\:{{467}\\over{642}}, \\: 9,
\\:{{2499}\\over{2990}}, \\:{{595}\\over{47}}\\right]" class="equation"
src="images/3189087869943830513-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="195" height="41"/></td><td
width="5%" align="right"><a
href="#eq3">(3)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>List(Fraction(Integer))</div>\n<div id="axiomlabel"
align="right">fricas</div><pre id="axiomcode">interpolate(xlist,<wbr />
ylist,<wbr /> 3,<wbr /> 2)&#36;RINTERP(&apos;x,<wbr /> FRAC
INT)</pre>\n<a name="eq4"><table width="95%"><tr><td align="center"
width="95%"><img alt="\n\\label{eq4}{{{x}^{3}}+{5 \\ x}-
3}\\over{{{x}^{2}}- 3}" title="\n\\label{eq4}{{{x}^{3}}+{5 \\ x}-
3}\\over{{{x}^{2}}- 3}" class="equation"
src="images/3496848037580920933-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="85" height="36"/></td><td
width="5%" align="right"><a
href="#eq4">(4)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>Fraction(Polynomial(Fraction(Integer)))</div>\n<div id="axiomlabel"
align="right">fricas</div><pre
id="axiomcode">interpolate(1/6&#58;&#58;FRAC UP(x,<wbr />FRAC INT),<wbr
/> xlist,<wbr /> ylist,<wbr /> 3,<wbr /> 2)&#36;RINTERP(&apos;x,<wbr
/>FRAC INT)<br />\n The function interpolate is not implemented in
RationalInterpolation\n (x,<wbr />Fraction(Integer))
.</pre></p>\n<p>A harder example:</p>\n<p><div id="axiomlabel"
align="right">fricas</div><pre id="axiomcode">dom &#58;=
DMP(&#91;z&#93;,<wbr />INT);</pre>\n<div id="axiomtype"><b>Type:
</b>Type</div>\n<div id="axiomlabel" align="right">fricas</div><pre
id="axiomcode">g&#58; FRAC dom -&gt; FRAC dom;</pre>\n<div
id="axiomtype"><b>Type: </b>Void</div>\n<div id="axiomlabel"
align="right">fricas</div><pre id="axiomcode">g(x) ==
(x^3&#42;z+5&#42;z^2&#42;x -3&#42;z^3)/(z&#42;x^2 - 3)</pre>\n<div
id="axiomtype"><b>Type: </b>Void</div>\n<div id="axiomlabel"
align="right">fricas</div><pre id="axiomcode">xxlist&#58; List FRAC dom
&#58;= &#91;1/(2&#42;z),<wbr /> 4&#42;z,<wbr /> 1/(6&#42;z),<wbr />
8&#42;z,<wbr /> 1/(10&#42;z),<wbr /> 12&#42;z&#93;</pre>\n<a
name="eq5"><table width="95%"><tr><td align="center" width="95%"><img
alt="\n\\label{eq5}\\left[{1 \\over{2 \\ z}}, \\:{4 \\ z}, \\:{1
\\over{6 \\ z}}, \\:{8 \\ z}, \\:{1 \\over{{10}\\ z}}, \\:{{12}\\
z}\\right]" title="\n\\label{eq5}\\left[{1 \\over{2 \\ z}}, \\:{4 \\
z}, \\:{1 \\over{6 \\ z}}, \\:{8 \\ z}, \\:{1 \\over{{10}\\ z}},
\\:{{12}\\ z}\\right]" class="equation"
src="images/6966621681782844857-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="213" height="41"/></td><td
width="5%" align="right"><a
href="#eq5">(5)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>List(Fraction(<a
href="http://axiom-wiki.newsynthesis.org/DistributedMultivariatePolynomial">DistributedMultivariatePolynomial</a>(&#91;z&#93;,<wbr
/>Integer)))</div>\n<div id="axiomlabel" align="right">fricas</div><pre
id="axiomcode">yylist &#58;= &#91;g(x) for x in xxlist&#93;</pre>\n<div
id="axiomtext"><div id="axiomlabel" title="Expand +/- Collapse folded
text" align="right" onClick="expandcontent(this, this.nextSibling.id)"
style="cursor:hand; cursor:pointer"><span
class="showstate"></span>fricas</div><pre id="sc1057"
class="switchcontent">Compiling function g with type Fraction(\n
DistributedMultivariatePolynomial(&#91;z&#93;,<wbr />Integer)) -&gt;
Fraction(\n DistributedMultivariatePolynomial(&#91;z&#93;,<wbr
/>Integer))</pre></div>\n<a name="eq6"><table width="95%"><tr><td
align="center" width="95%"><img
alt="\n\\label{eq6}\\begin{array}{@{}l}\n\\displaystyle\n\\left[{{{{24}\\
{{z}^{5}}}-{{20}\\ {{z}^{3}}}- 1}\\over{{{24}\\ {{z}^{2}}}-{2 \\ z}}},
\\:{{{{64}\\ {{z}^{4}}}+{{17}\\ {{z}^{3}}}}\\over{{{1\n6}\\ {{z}^{3}}}-
3}}, \\:{{{{648}\\ {{z}^{5}}}-{{180}\\ {{z}^{3}}}- 1}\\over{{{648}\\
{{z}^{2}}}-{6 \\ z}}}, \\:
\\right.\n\\\n\\\n\\displaystyle\n\\left.{{{{512}\\ {{z}^{4}}}+{{37}\\
{{z}^{3}}}}\\over{{{64}\\ {{z}^{3}}}- 3}}, \\:{{{{3000}\\
{{z}^{5}}}-{{500}\\ {{z}^{3}}}- 1}\\over{{{3\n000}\\ {{z}^{2}}}-{{10}\\
z}}}, \\:{{{{576}\\ {{z}^{4}}}+{{19}\\ {{z}^{3}}}}\\over{{{48}\\
{{z}^{3}}}- 1}}\\right] \n"
title="\n\\label{eq6}\\begin{array}{@{}l}\n\\displaystyle\n\\left[{{{{24}\\
{{z}^{5}}}-{{20}\\ {{z}^{3}}}- 1}\\over{{{24}\\ {{z}^{2}}}-{2 \\ z}}},
\\:{{{{64}\\ {{z}^{4}}}+{{17}\\ {{z}^{3}}}}\\over{{{1\n6}\\ {{z}^{3}}}-
3}}, \\:{{{{648}\\ {{z}^{5}}}-{{180}\\ {{z}^{3}}}- 1}\\over{{{648}\\
{{z}^{2}}}-{6 \\ z}}}, \\:
\\right.\n\\\n\\\n\\displaystyle\n\\left.{{{{512}\\ {{z}^{4}}}+{{37}\\
{{z}^{3}}}}\\over{{{64}\\ {{z}^{3}}}- 3}}, \\:{{{{3000}\\
{{z}^{5}}}-{{500}\\ {{z}^{3}}}- 1}\\over{{{3\n000}\\ {{z}^{2}}}-{{10}\\
z}}}, \\:{{{{576}\\ {{z}^{4}}}+{{19}\\ {{z}^{3}}}}\\over{{{48}\\
{{z}^{3}}}- 1}}\\right] \n" class="equation"
src="images/6690073116057656186-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="379" height="99"/></td><td
width="5%" align="right"><a
href="#eq6">(6)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>List(Fraction(<a
href="http://axiom-wiki.newsynthesis.org/DistributedMultivariatePolynomial">DistributedMultivariatePolynomial</a>(&#91;z&#93;,<wbr
/>Integer)))</div>\n<div id="axiomlabel" align="right">fricas</div><pre
id="axiomcode">interpolate(xxlist,<wbr /> yylist,<wbr /> 3,<wbr />
2)&#36;RINTERP(&apos;x,<wbr /> FRAC dom)</pre>\n<a name="eq7"><table
width="95%"><tr><td align="center" width="95%"><img
alt="\n\\label{eq7}{{{x}^{3}}+{5 \\ z \\ x}-{3 \\
{{z}^{2}}}}\\over{{{x}^{2}}-{3 \\over z}}"
title="\n\\label{eq7}{{{x}^{3}}+{5 \\ z \\ x}-{3 \\
{{z}^{2}}}}\\over{{{x}^{2}}-{3 \\over z}}" class="equation"
src="images/5304021745790262573-16.0px.png" align="bottom"
Style="vertical-align:text-bottom" width="119" height="42"/></td><td
width="5%" align="right"><a
href="#eq7">(7)</a></td></tr></table></a>\n<div id="axiomtype"><b>Type:
</b>Fraction(Polynomial(Fraction(<a
href="http://axiom-wiki.newsynthesis.org/DistributedMultivariatePolynomial">DistributedMultivariatePolynomial</a>(&#91;z&#93;,<wbr
/>Integer))))</div>\n<div id="axiomlabel" align="right">fricas</div><pre
id="axiomcode">interpolate(4&#42;z&#58;&#58;FRAC UP(x,<wbr />dom),<wbr
/> xxlist,<wbr /> yylist,<wbr /> 3,<wbr /> 2)&#36;RINTERP(&apos;x,<wbr
/> FRAC dom)<br />\n The function interpolate is not implemented in
RationalInterpolation\n (x,<wbr
/>Fraction(DistributedMultivariatePolynomial(&#91;z&#93;,<wbr
/>Integer))) .</pre></p>\n<p></p>\n\n</div>\n'},
'repeat': <Products.PageTemplates.Expressions.SafeMapping object at
0x23614e60>,
'request': <HTTPRequest,
URL=http://axiom-wiki.newsynthesis.org/RationalInterpolation/view>,
'root': <Application at >,
'template': <ZopePageTemplate at /mathaction/wikipage used for
/mathaction/RationalInterpolation>,
'traverse_subpath': [],
'user': <SpecialUser 'Anonymous User'>}

* Module Products.PageTemplates.ZRPythonExpr, line 49, in __call__
__traceback_info__: here.renderText(
text,type,REQUEST=request,RESPONSE=request.RESPONSE)
* Module PythonExpr, line 1, in <expression>
* Module Products.ZWiki.ZWikiPage, line 263, in renderText
* Module Products.ZWiki.plugins.mathaction.pagetypes, line 172, in
renderText
* Module Products.ZWiki.Editing, line 754, in setText
* Module Products.ZWiki.ZWikiPage, line 257, in preRender
* Module Products.ZWiki.plugins.mathaction.pagetypes, line 205, in
preRender
* Module Products.ZWiki.plugins.mathaction.ReplaceInlineLatex, line
76, in replaceInlineLatex
* Module Products.ZWiki.plugins.mathaction.ReplaceInlineAxiom, line
147, in replaceInlineAxiom
* Module Products.ZWiki.plugins.mathaction.axiomWrapper, line 101,
in renderAxiom

IOError

Troubleshooting Suggestions

* The URL may be incorrect.
* The parameters passed to this resource may be incorrect.
* A resource that this resource relies on may be encountering an
error.

For more detailed information about the error, please refer to the error
log.

If the error persists please contact the site maintainer. Thank you for
your patience.

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

And all this user wanted was an authoritative answer to

integrate(1/(x^3 - 3*x^2 + 7*x - 5)^(1/3), x)

Martin :(((.

oldk...@gmail.com

unread,
Jan 2, 2016, 9:33:28 PM1/2/16
to
>
> And all this user wanted was an authoritative answer to
>
> integrate(1/(x^3 - 3*x^2 + 7*x - 5)^(1/3), x)
>
> Martin :(((.

You need setSimplifyDenomsFlag(true) to make this integration compute fast.

The answer is:

+-----------------+2 +-----------------+
3| 3 2 3| 3 2
- log(- 3\|x - 3x + 7x - 5 + (3x - 3)\|x - 3x + 7x - 5 + 4)
+
+-+
2\|3
*
atan
+-----------------+2
+-+3| 3 2
\|3 \|x - 3x + 7x - 5
+
+-----------------+
+-+3| 3 2 2 +-+
(- 2x + 2)\|3 \|x - 3x + 7x - 5 + (x - 2x - 1)\|3
/
2
+
+-----------------+
+-+3| 3 2 2 +-+
+-+ (6x - 6)\|3 \|x - 3x + 7x - 5 + (3x - 6x + 11)\|3
- 2\|3 atan(------------------------------------------------------)
2
9x - 18x + 9
/
4

Or:

(-1*log(-3*((x^3+-3*x^2+7*x+-5)^(1/3))^2+(3*x+-3)*(x^3+-3*x^2+7*x+-5)^(1/3)+4)+(2*3^(1/2)*atan((3^(1/2)*((x^3+-3*x^2+7*x+-5)^(1/3))^2+(-2*x+2)*3^(1/2)*(x^3+-3*x^2+7*x+-5)^(1/3)+(x^2+-2*x+-1)*3^(1/2))/2)+-2*3^(1/2)*atan(((6*x+-6)*3^(1/2)*(x^3+-3*x^2+7*x+-5)^(1/3)+(3*x^2+-6*x+11)*3^(1/2))/(9*x^2+-18*x+9))))/4

clicl...@freenet.de

unread,
Jan 3, 2016, 2:11:49 PM1/3/16
to

"Nasser M. Abbasi" schrieb:
>
> On 1/2/2016 8:33 PM, oldk...@gmail.com wrote:
>
> > Or:
> >
> > (-1*log(-3*((x^3+-3*x^2+7*x+-5)^(1/3))^2+(3*x+-3)*(x^3+-3*x^2+7*x+-5)^(1/3)+4)+
> >(2*3^(1/2)*atan((3^(1/2)*((x^3+-3*x^2+7*x+-5)^(1/3))^2+(-2*x+2)*3^(1/2)*
> >(x^3+-3*x^2+7*x+-5)^(1/3)+(x^2+-2*x+-1)*3^(1/2))/2)+-2*3^(1/2)*
> >atan(((6*x+-6)*3^(1/2)*(x^3+-3*x^2+7*x+-5)^(1/3)+(3*x^2+-6*x+11)*3^(1/2))/(9*x^2+-18*x+9))))/4
> >
>
> Mathematica 10.3.1 gives equivalent answer, but in terms of AppellF1
>
> -----------------------------------
> Integrate[1/(x^3 - 3*x^2 + 7*x - 5)^(1/3), x]
>
> (3*((2 - I) + I*x)^(1/3)*(I*(-1 + x))^(1/3)*((-1 + 2*I) + x)*
> AppellF1[2/3, 1/3, 1/3, 5/3, (-(1/4))*I*((-1 + 2*I) + x),
> (-(1/2))*I*((-1 + 2*I) + x)])/(4*(-5 + 7*x - 3*x^2 + x^3)^(1/3))
> --------------------
> Plotting the _real_ part of the above, shows it is the same as
> the answer by Axiom. (with some constant offset)
>

Are you implying that the _imaginary_ parts are not the same - apart
from some (piecewise) constant offset? This would make the Mathematica
result incorrect, I suppose. The use of a non-elementary function and
of the imaginary unit are rather ugly anyway.

Martin.

Nasser M. Abbasi

unread,
Jan 3, 2016, 3:30:47 PM1/3/16
to
Yes, only the real part was the same. (actually the real part
had 2 branches, symmetric to each others and the right branch was
the same as Axiom and Rubi, but for a shift), but the complex
part plot of the result was not. Please see:

http://12000.org/tmp/010316/int.pdf

may be it is a bug. 10.3.1. on windows 7

--Nasser

Axel Vogt

unread,
Jan 3, 2016, 4:08:50 PM1/3/16
to
...
> integrate(1/(x^3 - 3*x^2 + 7*x - 5)^(1/3), x)
...

For the records: Maple 18 can not find it.

clicl...@freenet.de

unread,
Jan 3, 2016, 4:19:17 PM1/3/16
to

"Nasser M. Abbasi" schrieb:
>
> On 1/3/2016 1:12 PM, clicl...@freenet.de wrote:
> >
> > Are you implying that the _imaginary_ parts are not the same - apart
> > from some (piecewise) constant offset? This would make the
> > Mathematica result incorrect, I suppose. The use of a non-elementary
> > function and of the imaginary unit are rather ugly anyway.
> >
>
> Yes, only the real part was the same. (actually the real part
> had 2 branches, symmetric to each others and the right branch was
> the same as Axiom and Rubi, but for a shift), but the complex
> part plot of the result was not. Please see:
>
> http://12000.org/tmp/010316/int.pdf
>
> may be it is a bug. 10.3.1. on windows 7
>

None of your plots seems to have anything to do with the correct
antiderivative, which is finite for all finite x and real for x >= 1
(like the integrand) if (piecewise) constants are ignored. So the
Mathematica result may actually be correct. Here is a streamlined result
of the antiderivative:

INT(1/(x^3 - 3*x^2 + 7*x - 5)^(1/3), x) = 1/4*LN(4*(x - 1))
- 3/4*LN(((x - 1)*(x^2 - 2*x + 5))^(1/3) - (x - 1)) + SQRT(3)/2
*ATAN(1/SQRT(3) + 2*(x - 1)/(SQRT(3)*((x - 1)*(x^2 - 2*x + 5))^(1/3)))

Maybe you are using Mathematica improperly, somehow?

Martin.

Nasser M. Abbasi

unread,
Jan 3, 2016, 4:28:28 PM1/3/16
to
Ok, fyi, Changed the plot range to {x,1,10}

http://12000.org/tmp/010316/int.pdf

--Nasser

Axel Vogt

unread,
Jan 3, 2016, 4:39:22 PM1/3/16
to
After x-1 = t and re-substitution it finds as
3/4*2^(1/3)*(x-1)^(2/3)*hypergeom([1/3, 1/3],[4/3],-1/4*(x-1)^2)

oldk...@gmail.com

unread,
Jan 3, 2016, 8:40:12 PM1/3/16
to
First, a clarification, the result I got is computed by FriCAS,
and I think Axiom can not compute (or take days), because Axiom
does not implement 'setSimplifyDenomsFlag' and associated changes.

Second, this integration clearly belongs to the Risch algorithm
pure algebraic case, so the inability to give an elementary answer
(or prove such elementary answer doesn't exist) is considered by me
as a bug. When there exists elementary answer, I think answers with
non-elementary functions is "half-correct".

Lots of tests from "CAS integration tests" have this problem,
which I think it is unfair to systems like FriCAS which implements
most of Risch algorithm (ALBI, Algorithm Based Integration) compared
with RUBI systems.

In "Specialized integral tests" section of "CAS integration tests",
I analyzed the cases which Mathematica or RUBI fails and with
elementary answer. There are 33 cases, and FriCAS solves 31.

Finally, FYI, I list all pure algebraic integration of the
"Specialized integral tests" section:

* A.F. Timofeev
** 319 mathematica fails
http://12000.org/my_notes/CAS_integration_tests/test_cases/timofeev/resu32.htm#319
** 324 mathematica fails
http://12000.org/my_notes/CAS_integration_tests/test_cases/timofeev/resu33.htm#324

* Vladimir Bondarenko
** 15 mathematica fails
http://12000.org/my_notes/CAS_integration_tests/test_cases/bondarenko/resu2.htm#15
** 16 mathematica fails
http://12000.org/my_notes/CAS_integration_tests/test_cases/bondarenko/resu2.htm#16
** 18 mathematica fails
http://12000.org/my_notes/CAS_integration_tests/test_cases/bondarenko/resu2.htm#18

* Manuel Bronstein
** 6 both fail
http://12000.org/my_notes/CAS_integration_tests/test_cases/bronstein/resu1.htm#6

* Tony Hearn
** 204 rubi fails
http://12000.org/my_notes/CAS_integration_tests/test_cases/hearn/resu21.htm#204
** 279 both fail
http://12000.org/my_notes/CAS_integration_tests/test_cases/hearn/resu28.htm#279
** 280 both fail
http://12000.org/my_notes/CAS_integration_tests/test_cases/hearn/resu28.htm#280

* Martin Welz
** 9 both fail
http://www.12000.org/my_notes/CAS_integration_tests/test_cases/welz/resu1.htm#9
** 10 both fail
http://www.12000.org/my_notes/CAS_integration_tests/test_cases/welz/resu1.htm#10
** 12 mathematica fails
http://www.12000.org/my_notes/CAS_integration_tests/test_cases/welz/resu2.htm#12
** 13 mathematica fails
http://www.12000.org/my_notes/CAS_integration_tests/test_cases/welz/resu2.htm#13


Of these 13 pure algebraic integration, FriCAS only fails at Timofeev#319.

clicl...@freenet.de

unread,
Jan 4, 2016, 4:20:37 AM1/4/16
to

oldk...@gmail.com schrieb:
>
> First, a clarification, the result I got is computed by FriCAS,
> and I think Axiom can not compute (or take days), because Axiom
> does not implement 'setSimplifyDenomsFlag' and associated changes.
>
> Second, this integration clearly belongs to the Risch algorithm
> pure algebraic case, so the inability to give an elementary answer
> (or prove such elementary answer doesn't exist) is considered by me
> as a bug. When there exists elementary answer, I think answers with
> non-elementary functions is "half-correct".
>
> Lots of tests from "CAS integration tests" have this problem,
> which I think it is unfair to systems like FriCAS which implements
> most of Risch algorithm (ALBI, Algorithm Based Integration) compared
> with RUBI systems.
>
> In "Specialized integral tests" section of "CAS integration tests",
> I analyzed the cases which Mathematica or RUBI fails and with
> elementary answer. There are 33 cases, and FriCAS solves 31.
>
> Finally, FYI, I list all pure algebraic integration of the
> "Specialized integral tests" section:
>
> * A.F. Timofeev
> ** 319 mathematica fails
> [...]
> ** 324 mathematica fails
> [...]
>
> * Vladimir Bondarenko
> ** 15 mathematica fails
> [...]
> ** 16 mathematica fails
> [...]
> ** 18 mathematica fails
> [...]
>
> * Manuel Bronstein
> ** 6 both fail
> [...]
>
> * Tony Hearn
> ** 204 rubi fails
> [...]
> ** 279 both fail
> [...]
> ** 280 both fail
> [...]
>
> * Martin Welz
> ** 9 both fail
> [...]
> ** 10 both fail
> [...]
> ** 12 mathematica fails
> [...]
> ** 13 mathematica fails
> [...]
>
> Of these 13 pure algebraic integration, FriCAS only fails at
> Timofeev#319.

Sorry for writing Axiom instead of FriCAS: I knew I was using FriCAS,
but the site error threw me off, and having had to type in things like
\begin{axiom} and having been reminded by the error message that the
site URL starts on "axiom-wiki" obviously had some subconscious effect!

I am not so sure about counting purely algebraic Risch failures as bugs.
Even the purely algebraic case has never been implemented more fully
than in FriCAS - apparently because it proves too hard a task.
Considering that this situation has persisted for three decades, one may
suspect that the algorithm is not really practical.

I agree that non-elementary results returned when elementary ones exist
should not be counted as full successes; Albert Rich should perhaps
consider counting them as "nonoptimal" in his tables. And of course, a
Risch result correctly certifying an integral as undoable in elementary
terms must be considered as a full success.

Timofeev#319 is example 112 from Timofeev's Chapter 4:

INT(1/((3*x + 3*x^2 + x^3)*(3 + 3*x + 3*x^2 + x^3)^(1/3)), x)

However, on a considerable number of other algebraic Timofeev
integrands FriCAS succeeds only because they are first transformed by
pattern matching; some of these Rubi-type rules were added specifically
to increase the Timofeev score of FriCAS, I believe. Axiom (sic) should
thus presumably fail on integral 21 from Chapter 4, for example:

INT(((x - 1)^2*(x + 1))^(1/3)/x^2, x)

Martin.

oldk...@gmail.com

unread,
Jan 4, 2016, 8:25:48 AM1/4/16
to
> I am not so sure about counting purely algebraic Risch failures as bugs.
> Even the purely algebraic case has never been implemented more fully
> than in FriCAS - apparently because it proves too hard a task.
> Considering that this situation has persisted for three decades, one may
> suspect that the algorithm is not really practical.

Something is not implemented for a long time is not necessarily because
it is difficult. Pure rational integration is very easy to implement,
even SymPy implemented it in a GSOC, however Mathematica is still missing
its implementation for 3 decades:

INT( (72*x^7+256*x^6-192*x^5-1280*x^4-312*x^3+1440*x^2+576*x-96)/(9*x^8+36*x^7-32*x^6-252*x^5-78*x^4+468*x^3+288*x^2-108*x+9)
,x)

INT( (2560*x^3-400*x^2-576*x-84)/(320*x^4+80*x^3-12*x^2+24*x+9) ,x)

clicl...@freenet.de

unread,
Jan 4, 2016, 1:50:29 PM1/4/16
to

oldk...@gmail.com schrieb:
Derive can do the second integral by explicitly factoring the
denominator, and it returns the first one unevaluated.

Mathematica's designers may have considered explicit results in terms of
the minimal algebraic extension of limited relevance, and thus prefer
antiderivatives in terms of symbolic denominator root objects instead.

All rational integrands can be handled in this way, whereas FriCAS will
never be able to handle arbitrary algebraic integrands by adding
specific rewrite rules.

Martin.

Richard Fateman

unread,
Jan 4, 2016, 7:28:34 PM1/4/16
to
On 1/4/2016 10:51 AM, clicl...@freenet.de wrote:
> Mathematica's designers may have considered explicit results in terms of
> the minimal algebraic extension of limited relevance, and thus prefer
> antiderivatives in terms of symbolic denominator root objects instead.

If so, I think this is a bad decision, and that using the minimal
algebraic extension is an important (and solved!) part of the routine.

>
> All rational integrands can be handled in this way, whereas FriCAS will
> never be able to handle arbitrary algebraic integrands by adding
> specific rewrite rules.

What I think is interesting here is the commentary on what it is that
Axiom/Fricas can or cannot do relative to implementation of Risch
methods. Though the purely algebraic case is,I think algorithmic,
the transcendental simplification issues make the whole deal not
computable in general... But if Axiom/Fricas doesn't do the algebraic
case and Mathematica sort-of does, then people who believe that
there is a complete implementation and it is Axiom, are misinformed.

The need to add arbitrary numbers of rules to Rubi is maybe not
such an issue if there is a way of identifying where it fails, e.g.
"Rubi cannot handle algebraic extensions of degree XXX" or some
other recognizable characterization.

By the way, I don't see this as a big deal. The general world
views definite integration by numerical methods as a thoroughly
examined and mostly-solved problem. Indefinite integration
(anti-differentiation) is a kind of boutique theory problem with
a very few applications in multiple-integral problems. Some of
these are important to some people doing Feynman diagram calcs.
It was the motivation for Hearn's REDUCE system. Should
these then be a benchmark for systems not being used for
such things?

Independent of any applications, there is an interesting
theoretical history of the problem of Integration in Finite Terms
from Liouville (with many many contributors, only a scattering
of whom committed their work to computer implementations.)
RJF




RJF



clicl...@freenet.de

unread,
Jan 5, 2016, 1:51:14 AM1/5/16
to

Richard Fateman schrieb:
>
> What I think is interesting here is the commentary on what it is that
> Axiom/Fricas can or cannot do relative to implementation of Risch
> methods.

The answer can be found here:

<http://axiom-wiki.newsynthesis.org/RischImplementationStatus>

My guess is that this represents only a small fraction of a hypothetical
full Risch integrator, provided all of the missing parts are practical.

Martin.

clicl...@freenet.de

unread,
Jan 6, 2016, 2:31:34 PM1/6/16
to

clicl...@freenet.de schrieb:
> 'body': [...]},
Something appears to be going on:

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Service Temporarily Unavailable

The server is temporarily unable to service your request due to
maintenance downtime or capacity problems. Please try again later.
Apache/2.2.22 (Debian) Server at axiom-wiki.newsynthesis.org Port 80

= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =

Martin :).

Waldek Hebisch

unread,
Jan 6, 2016, 6:39:32 PM1/6/16
to
clicl...@freenet.de wrote:
>
>
> Something appears to be going on:
>
> = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =
>
> Service Temporarily Unavailable
>
> The server is temporarily unable to service your request due to
> maintenance downtime or capacity problems. Please try again later.
> Apache/2.2.22 (Debian) Server at axiom-wiki.newsynthesis.org Port 80
>

Hard disc died. It will take some time to replace...

--
Waldek Hebisch

Waldek Hebisch

unread,
Feb 9, 2016, 2:22:52 PM2/9/16
to
It is back online.

--
Waldek Hebisch

clicl...@freenet.de

unread,
Feb 9, 2016, 5:54:30 PM2/9/16
to

Waldek Hebisch schrieb:
Am confirming this. And the current Fricas

)version

Value = "FriCAS 1.2.7 compiled at Tue Sep 29 13:45:04 UTC 2015"

returns

integrate(1/(x*(x^2 - 3*x + 2)^(1/3)), x)

>> Error detected within library code:
impossible

Boooooooooooooooooooooooooo.

Martin :(((.

Axel Vogt

unread,
Feb 10, 2016, 4:51:34 PM2/10/16
to
On 09.02.2016 23:55, clicl...@freenet.de wrote:
>
...

> Value = "FriCAS 1.2.7 compiled at Tue Sep 29 13:45:04 UTC 2015"
> returns
> integrate(1/(x*(x^2 - 3*x + 2)^(1/3)), x)
>>> Error detected within library code:
> impossible
>
> Boooooooooooooooooooooooooo.

Maple also does not do it. What is the good approach?

clicl...@freenet.de

unread,
Feb 11, 2016, 12:03:09 PM2/11/16
to

Axel Vogt schrieb:
This depends on your needs and preferences:

Hard-boiled politicos might end up conspiring to have Barry Trager
abducted and an interrogation team put to work on him in the Polish
backwoods.

Practically-minded realists should try to implement Manuel Kauers'
Groebner-basis scheme of 2008. If that turns out to fail on the present
integrand they could ask him to provide something better, at the threat
of exposure if necessary.

Nostalgic purists may want to analyze transformation properties of the
integrand under Moebius transformations that map radicand roots onto
each other, thus adapting Goursat's 1887 approach from square roots of
quartics (and cubics) to cube roots of cubics (and quadratics).

Rubi wouldn't be Rubi if it didn't come up with still another solution;
lazybones could simply rest up and wait for this to happen. Meanwhile,
beware of gravitational waves!

Martin.

Albert Rich

unread,
Feb 11, 2016, 9:26:28 PM2/11/16
to
I've stacked lead filled sandbags all around my house to keep out these deadly waves...

Rubi uses the integration rule shown at

http://www.apmaths.uwo.ca/~arich/LinearQuadraticRule.pdf

to integrate 1/(x*(x^2-3*x+2)^(1/3)) to

-3*(-(1-x)/x)^(1/3)*(-(2-x)/x)^(1/3)/(2*(2-3*x+x^2)^(1/3))*
AppellF1[2/3, 1/3, 1/3, 5/3, 1/x, 2/x]

in a single step. Mathematica returns a similar result.

Albert

Richard Fateman

unread,
Feb 12, 2016, 1:36:22 AM2/12/16
to
Let us say you want a number for

f(a,b):= integrate (....,x from a to b);

What would be faster, more accurate, and on the right branch of the cube
root? (there are presumably 3 different answers!

: Would you have f set up for

1. running the integrand through symbolic integration, and then
evaluating AppellF1 at a and b.
2. running a standard quadratic procedure on the integrand from a to b.
3. approximating the integrand (say, by rational function, Chebyshev
approximation, piecewise perhaps), and integrating that trivially from a
to b.

Versions 1 and 3 can do part of the processing "at compile time"
and then do the second part repeatedly for different values of a,b.

Now if you don't want a number, but are trying to say something
about the integrability of something -- not in terms of elementary
functions -- but in terms of functions that
you may not every heard of before, well, go for it.
That's certainly of interest, but not necessarily to the same people.

RJF

Waldek Hebisch

unread,
Feb 28, 2016, 9:28:59 PM2/28/16
to
clicl...@freenet.de wrote:
>
> And the current Fricas
>
> )version
>
> Value = "FriCAS 1.2.7 compiled at Tue Sep 29 13:45:04 UTC 2015"
>
> returns
>
> integrate(1/(x*(x^2 - 3*x + 2)^(1/3)), x)
>
> >> Error detected within library code:
> impossible
>

In developement version I now get:

(3) -> integrate(1/(x*(x^2 - 3*x + 2)^(1/3)), x)


(3)
-
3+-+2
\|2
*
log
+-----------+2
2 3+-+2 3| 2
(12x - 72x + 72)\|2 \|x - 3x + 2
+
+-----------+
3 2 3| 2
(- 6x + 84x - 216x + 144)\|x - 3x + 2
+
4 3 2 3+-+
(x - 36x + 180x - 288x + 144)\|2
/
4
x
+
+-----------+2 +-----------+
3| 2 3+-+3| 2 2 3+-+2
3+-+2 12\|x - 3x + 2 + (6x - 12)\|2 \|x - 3x + 2 + x \|2
2\|2 log(---------------------------------------------------------)
2
x
+
+-----+
+-+ | 3+-+
2\|2 \|3\|2
*
atan
4 3 2 +-+3+-+2
(48x - 1008x + 4464x - 6912x + 3456)\|2 \|2
*
+-----------+2
3| 2
\|x - 3x + 2
+
5 4 3 2 +-+
(- 12x - 120x + 2160x - 7200x + 8640x - 3456)\|2
*
+-----------+
3| 2
\|x - 3x + 2
+
6 5 4 3 2 +-+3+-+
(x - 108x + 972x - 3456x + 6048x - 5184x + 1728)\|2 \|2
*
+-----+
| 3+-+
\|3\|2
/
6 5 4 3 2
2x + 648x - 11016x + 51840x - 103680x + 93312x - 31104
/
24
Type: Union(Expression(Integer),...)
Time: 0.01 (IN) + 4.49 (EV) + 0.02 (OT) = 4.52 sec

This is somewhat specific to the example: problematic part of
Trager resultant is of form z^3 - a, and I hardcoded knowledge
of splitting field of such polynomials. This seem to cure all
Goursat-like examples (however, some take a very long time).
I wonder if Goursat always gives residues which are cube roots
or may produce something more complicated?

--
Waldek Hebisch

clicl...@freenet.de

unread,
Feb 29, 2016, 12:00:34 PM2/29/16
to

Waldek Hebisch schrieb:
Congratulations! A compact version of the antiderivative is:

INT(1/(x*(x^2 - 3*x + 2)^(1/3)), x)
= - 1/(4*2^(1/3))*LN(4*(x^2 - 3*x + 2) + (x - 2)^3)
+ 3/(4*2^(1/3))*LN(2^(2/3)*(x^2 - 3*x + 2)^(1/3) + (x - 2))
- SQRT(3)/(2*2^(1/3))
*ATAN(1/SQRT(3) - 2^(1/3)*(x - 2)/(SQRT(3)*(x^2 - 3*x + 2)^(1/3)))

How long is "very long" in minutes, say? If this could be speeded up,
any rewrite rules specific to cube-root integrands could probably be
removed from the FriCAS integrator. And, maybe, other common and simple,
yet problematic factors of Trager resultants could be hard-coded too? To
me this looks like a better place for hard-coding than rewriting at the
integrand level.

Collected examples of Goursat pseudo-elliptics involving cube roots have
been added to "my" integration problems on the Rubi website, according
to Albert Rich. Other examples are numbers 99, 107, 109 and 112 (!) from
Chapter 4 of Timofeev's 1948 textbook. Indeed, I believe that all
classical examples of transcendental elementary algebraic integrals
involving a cube root of a non-degenerate quadratic or cubic polynomial
belong to this class of pseudo-elliptics.

I don't know the answer to your question but could mail Derive code that
tests if algebraics of the forms R(x)/((a + b*x + c*x^2 + d*x^3))^(1/3)
and R(x)/((a + b*x + c*x^2 + d*x^3))^(2/3) are Goursat pseudo-elliptic;
its inspection might enable you to answer the question yourself. My code
checks the symmetry properties of R(x) under Möbius transformations that
map the radicand roots onto each other, the mappings being a realization
of the symmetric group S_3 (equivalently dihedral D_3) with subgroups
C_2, C_2, C_2 and A_3 (alternating A_3 is isomorphic to cyclic C_3).
Alternatively, you could post suspect candidates of cube-root algebraics
for testing by me.

Martin.

Sam Blake

unread,
Dec 4, 2022, 5:52:14 PM12/4/22
to
Hi Martin,

I know I am a bit late (6+ years) to this conversation, but did you ever publish your code/algorithmic extensions for Goursat's cube-root type integrals?

Cheers,

Sam


nob...@nowhere.invalid

unread,
Dec 11, 2022, 12:12:09 PM12/11/22
to

Sam Blake schrieb:
It took me a week to find the time for this context switch. No, I
haven't written anything about my cube root integrals of Goursat type,
apart from explanatory remarks in this (January to February 2016) and
many other <sci.math.symbolic> threads. Posts under "Announce: FriCAS
1.2.4 has been released" (November 2014 to February 2015) in particular
come to my mind.

Since hardcoding of the splitting field for factors of the form z^3 - a
in the Trager resultant has greatly improved the performance of FriCAS
on cube-root integrands, implementing an analogue for factors of the
form z^4 - a might have a similar effect with fourth-root integrands.
There are cases by Euler that FriCAS still fails to solve.

Martin.
Message has been deleted

nob...@nowhere.invalid

unread,
Sep 30, 2023, 1:02:07 AMSep 30
to

Sam Blake schrieb:
> Here are some nice cube root-type integrals which may or may not be integrable using your Goursat adaption. I am guessing that as Rubi cannot integrate these that they may not be Goursat type integrals?
>
> (1 + x)/(x*(-1 + x^3)^(1/3))
> (-1 + x^2)/(x*(-1 + x^3)^(2/3))
> ((1 + x)*(-1 + x^3)^(1/3))/((-1 + x)^2*x)
> ((-1 + x)^2*(1 + x))/(x*(1 + x + x^2)*(-1 + x^3)^(1/3))
> ((1 + x)*(-1 + x^3)^(2/3))/((-1 + x)^3*x)
> (x*(-2 + x^3))/((-1 + x^3)^(1/3)*(-1 + x^3 + x^6))
> (x^3*(2 + x^3))/((1 + x^3)^(2/3)*(1 + x^3 + x^6))
> ((1 - x^3)^(1/3)*(-2 + x^3))/(x^3*(-1 + x^3 + x^6))
> ((2 + x + x^2)*(-1 + x^3)^(1/3))/(x*(-1 + x^2)^2*(-3 - 2*x + x^2 + x^3))
> (1 + 3*x)/((-1 + 3*x)*(-x + x^3)^(1/3))
> ((-1 + x)*(1 + 3*x))/((-1 + 3*x)*(-x + x^3)^(2/3))
> ((-1 + x)^2*(1 + 3*x))/(x*(1 + x)*(-1 + 3*x)*(-x + x^3)^(1/3))
> (x*(1 + x)*(1 + 3*x))/((-1 + x)*(-1 + 3*x)*(-x + x^3)^(2/3))
> (x*(1 + x)*(1 + 3*x))/((-1 + x)^2*(-1 + 3*x)*(-x + x^3)^(1/3))
>

There are 14 integrands here. The first two are readily integrated by
Derive 6.10 and should therefore be doable by standard recipes from
books like G&R and Timofeev:

INT((x + 1)/(x*(x^3 - 1)^(1/3)), x)
INT((x^2 - 1)/(x*(x^3 - 1)^(2/3)), x)

So Rubi could and should be tought to do these as well.

The subsequent twelve integrands, however, fail in Derive 6.10:

INT((x + 1)*(x^3 - 1)^(1/3)/(x*(x - 1)^2), x)
INT((x + 1)*(x - 1)^2/(x*(x^2 + x + 1)*(x^3 - 1)^(1/3)), x)
INT((x + 1)*(x^3 - 1)^(2/3)/(x*(x - 1)^3), x)
INT(x*(x^3 - 2)/((x^3 - 1)^(1/3)*(x^6 + x^3 - 1)), x)
INT(x^3*(x^3 + 2)/((x^3 + 1)^(2/3)*(x^6 + x^3 + 1)), x)
INT((1 - x^3)^(1/3)*(x^3 - 2)/(x^3*(x^6 + x^3 - 1)), x)
INT((x^2 + x + 2)*(x^3 - 1)^(1/3)/(x*(x^2 - 1)^2*(x^3 + x^2 - 2*x - 3)),
x)
INT((3*x + 1)/((3*x - 1)*(x^3 - x)^(1/3)), x)
INT((x - 1)*(3*x + 1)/((3*x - 1)*(x^3 - x)^(2/3)), x)
INT((x - 1)^2*(3*x + 1)/(x*(x + 1)*(3*x - 1)*(x^3 - x)^(1/3)), x)
INT(x*(x + 1)*(3*x + 1)/((x - 1)*(3*x - 1)*(x^3 - x)^(2/3)), x)
INT(x*(x + 1)*(3*x + 1)/((x - 1)^2*(3*x - 1)*(x^3 - x)^(1/3)), x)

My Goursat tests for cube-root integrands determine all but the four
integrals from #6 to #9 to be directly of Goursat type, which means
that the integrands become rational under one of the characteristic
substitutions. Of the other four, the first three become Goursat
integrable under the fairly obvious substitution t = x^3.

A more involved substitution must have been used to scramble integrand
#9; even FriCAS fails on this one, but succeeds once t = x^3 has been
applied. The substitution doesn't make the integrand look nicer though,
and while the change cannot be considered momentous either, for FriCAS
it evidently is. The integrand simplifies a bit when an algebraic part
of the antiderivative is removed:

INT((x^2 + x + 2)*(x^3 - 1)^(1/3)/
(x*(x^2 - 1)^2*(x^3 + x^2 - 2*x - 3)), x) =
(x^3 - 1)^(1/3)/(x^2 - 1) +
INT((x^2 - 1)*(x^2 + x + 2)/
(x*(x^3 - 1)^(2/3)*(x^3 + x^2 - 2*x - 3)), x)

There is no reason to assume that Rubi can handle Goursat type
integrals in general.

Martin.

nob...@nowhere.invalid

unread,
Oct 30, 2023, 2:59:01 PMOct 30
to

"clicl...@freenet.de" schrieb:
>
> Sam Blake schrieb:
For the record, and as an "optimal" reference solution for Nasser's
integrator tests, a compact antiderivative of the non-Goursat integral
#9:

INT((x^2 + x + 2)*(x^3 - 1)^(1/3)/(x*(x^2 - 1)^2*(x^3 + x^2 - 2*x - 3)),
x)

is given by a sum of the following five components:

- INT(x*(x^2 + x + 2)/((x + 1)*(x^2 - 1)*(x^3 - 1)^(2/3)), x) =
(x^3 - 1)^(1/3)/(x^2 - 1)

INT(2/(3*x*(x^3 - 1)^(2/3)), x) =
- 2*SQRT(3)/9*ATAN(SQRT(3)/3*(1 - 2*(x^3 - 1)^(1/3)))
+ 1/3*LN((x^3 - 1)^(1/3) + 1) - 1/9*LN(x^3)

- INT(x^2*(2*x^6 - 19*x^3 - 10)
/(3*(x^3 - 1)^(2/3)*(x^9 - 2*x^6 + x^3 - 27)), x) =
SQRT(3)/9*ATAN(SQRT(3)/3*(1 - 2*(2*(x^3 - 1)^(2/3) + x^3 - 4)
/((x^3 - 1)^(1/3)*(2*(x^3 - 1)^(1/3) + 3))))
+ 1/6*LN(- 2*(x^3 - 1)^(2/3) + 3*(x^3 - 1)^(1/3) + x^3 - 4)
- 1/18*LN(x^9 - 2*x^6 + x^3 - 27)

INT(x*(x^3 - 1)^(1/3)*(3*x^3 - 1)/(x^9 - 2*x^6 + x^3 - 27), x) =
SQRT(3)/9*ATAN(SQRT(3)/3*(1 + 2*(x*(x^3 - 1)^(2/3))/3))
+ 1/6*LN(x*(x^3 - 1)^(2/3) - 3) - 1/18*LN(x^9 - 2*x^6 + x^3 - 27)

INT((x^9 - 3*x^6 + 8*x^3 + 3)
/((x^3 - 1)^(2/3)*(x^9 - 2*x^6 + x^3 - 27)), x) =
SQRT(3)/9*ATAN(SQRT(3)/3*(1 + 2*(x^3 - 1)^(1/3)*(x*(x^3 - 1)^(1/3) - 3)
/(3*((x^3 - 1)^(1/3) + x^2))))
+ 1/6*LN(x*(x^3 - 1)^(2/3) + 3*(x^3 - 1)^(1/3) - 3*x^2)
- 1/18*LN(x^9 - 2*x^6 + x^3 - 27)

All but the first and last of these turn into classical cases of
elementary integrals under the substitutions t = x^3 or t = 1/x^3.

Of course, the three -1/18*LN(x^9 - 2*x^6 + x^3 - 27) terms should be
merged into one. Is the FriCAS antiderivative suboptimal because its
leaf count exceeds twice that of this optimal result?

Martin.

Nasser M. Abbasi

unread,
Oct 31, 2023, 10:10:49 AMOct 31
to
On 10/30/2023 2:02 PM, clicl...@freenet.de wrote:

> Of course, the three -1/18*LN(x^9 - 2*x^6 + x^3 - 27) terms should be
> merged into one. Is the FriCAS antiderivative suboptimal because its
> leaf count exceeds twice that of this optimal result?
>
> Martin.

fyi, I've added your 14 integrals as separate new test file
to CAS integration tests. Maybe this will make it easier to reference things.

Created a new test file (#213) of them, and converted them to all
the other CAS formats and added them to
CAS integration tests summer 2023 version.

So now you can see the full report for all 8 CAS systems. Link at end.

Result % solved is
-------------------
1. Maple 100.00% 14/14
2. Fricas 92.86% 13/14
3. Mathematica 78.57% 11/14
4. Rubi 71.43% 10/14
5. Maxima 14.29% 2/14
6. Sympy 14.29% 2/14
7. Mupad 7.14% 1/14
8. Giac 0.00% 0/14

In terms of grading:

A B C F
Fricas 85.714 7.143 0.000 7.143
Mathematica 78.571 0.000 0.000 21.429
Rubi 35.714 0.000 35.714 28.571
Maxima 14.286 0.000 0.000 85.714
Maple 7.143 0.000 92.857 0.000
Mupad 0.000 7.143 0.000 92.857
Giac 0.000 0.000 0.000 100.000
Sympy 0.000 0.000 14.286 85.714

For optimal anti, I picked the smallest one by trying each integral
on different CAS's. So it is possible a better optimal exists that
I missed.

Only Maple was able to solve them all but the grading was not the best.
FriCAS got the best A grading and was in second place in terms of number
solved. Maxima, mupad, giac and sympy did not do well on these hard
integrals.

Link to the new test report is

<https://12000.org/my_notes/CAS_integration_tests/reports/summer_2023/test_cases/213_Goursat/report.htm>

Which you can also access from the main web page

<https://12000.org/my_notes/CAS_integration_tests/reports/summer_2023/index.htm>

by going to the "links to individual test reports" page and scroll all
the way down.

--Nasser

nob...@nowhere.invalid

unread,
Oct 31, 2023, 1:42:47 PMOct 31
to

"Nasser M. Abbasi" schrieb:
>
> On 10/30/2023 2:02 PM, clicl...@freenet.de wrote:
>
> > Of course, the three -1/18*LN(x^9 - 2*x^6 + x^3 - 27) terms should
> > be merged into one. Is the FriCAS antiderivative suboptimal because
> > its leaf count exceeds twice that of this optimal result?
> >
>
> fyi, I've added your 14 integrals as separate new test file
> to CAS integration tests. Maybe this will make it easier to reference
> things.
>

Just to avoid misunderstandings: these 14 integrals are by Sam Blake
who posted them on 11 December 2022; they may even be duplicated from
his test suite of algebraic integrals - I simply don't know.

> Created a new test file (#213) of them, and converted them to all
> the other CAS formats and added them to
> CAS integration tests summer 2023 version.
>
> So now you can see the full report for all 8 CAS systems. Link at end.
>
> Result % solved is
> -------------------
> 1. Maple 100.00% 14/14
> 2. Fricas 92.86% 13/14
> 3. Mathematica 78.57% 11/14
> 4. Rubi 71.43% 10/14
> 5. Maxima 14.29% 2/14
> 6. Sympy 14.29% 2/14
> 7. Mupad 7.14% 1/14
> 8. Giac 0.00% 0/14
>

Rubi's success rate on these 14 cube root integrals is impressive even
though many solutions appear to involve functions higher than
elementary. And I notice that my antiderivative for integral #9 was
very far from optimal! The optimal solution is just something like:

INT((x^2 + x + 2)*(x^3 - 1)^(1/3)
/(x*(x^2 - 1)^2*(x^3 + x^2 - 2*x - 3)), x) =
(x^3 - 1)^(1/3)/(x^2 - 1)
+ SQRT(3)/3*ATAN(SQRT(3)/3*(1 + 2*(x^2 - 1)/(x^3 - 1)^(1/3)))
+ 1/2*LN((x^3 - 1)^(1/3) - x^2 + 1)
- 1/6*LN(x^2*(x^4 - 3*x^2 - x + 3))

Wow,

Martin.

> In terms of grading:
>
> A B C F
> Fricas 85.714 7.143 0.000 7.143
> Mathematica 78.571 0.000 0.000 21.429
> Rubi 35.714 0.000 35.714 28.571
> Maxima 14.286 0.000 0.000 85.714
> Maple 7.143 0.000 92.857 0.000
> Mupad 0.000 7.143 0.000 92.857
> Giac 0.000 0.000 0.000 100.000
> Sympy 0.000 0.000 14.286 85.714
>
> For optimal anti, I picked the smallest one by trying each integral
> on different CAS's. So it is possible a better optimal exists that
> I missed.
>
> Only Maple was able to solve them all but the grading was not the
> best. FriCAS got the best A grading and was in second place in terms
> of number solved. Maxima, mupad, giac and sympy did not do well on
> these hard integrals.
>
> Link to the new test report is
>
> <https://12000.org/my_notes/CAS_integration_tests/reports/summer_2023/test_cases/213_Goursat/report.htm>
>
> Which you can also access from the main web page
>
> <https://12000.org/my_notes/CAS_integration_tests/reports/summer_2023/index.htm>
>
> by going to the "links to individual test reports" page and scroll all
> the way down.
>

PS: Can any of the systems solve the fifth component integral:

INT((x^9 - 3*x^6 + 8*x^3 + 3)
/((x^3 - 1)^(2/3)*(x^9 - 2*x^6 + x^3 - 27)), x) =
SQRT(3)/9*ATAN(SQRT(3)/3*(1 + 2*(x^3 - 1)^(1/3)*(x*(x^3 - 1)^(1/3) - 3)
/(3*((x^3 - 1)^(1/3) + x^2))))
+ 1/6*LN(x*(x^3 - 1)^(2/3) + 3*(x^3 - 1)^(1/3) - 3*x^2)
- 1/18*LN(x^9 - 2*x^6 + x^3 - 27)

in elementary terms?

Sam Blake

unread,
Oct 31, 2023, 5:37:06 PMOct 31