Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

An independent integration test suite

650 views
Skip to first unread message

clicl...@freenet.de

unread,
Feb 24, 2013, 10:11:47 AM2/24/13
to

The Russian book "Integration of Functions"
(Интегрирование функций) published by A.F. Timofeev
(А.Ф. Тимофеев) in 1948 provides many integration Examples
(Примеры) of the following general kind:

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

INT(LN(x)/x^5, x) = - (4*LN(x) + 1)/(16*x^4)

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

INT(COS(x)^5, x) = SIN(x)/15*(3*COS(x)^4 + 4*COS(x)^2 + 8)

INT(SIN(x)^2*COS(x)^4, x) = 1/6*SIN(x)^3*COS(x)^3 + 1/8*SIN(x)^3*COS(x)
- 1/16*SIN(x)*COS(x) + x/16

INT(1/SIN(x)^5, x) = 3/8*LN(TAN(x/2)) - 3*COS(x)/(8*SIN(x)^2) -
COS(x)/(4*SIN(x)^4)

INT(SIN(x)/#e^x, x) = - (COS(x) + SIN(x))/(2*#e^x)

INT(#e^(2*x)*SIN(3*x), x) = 1/13*#e^(2*x)*(2*SIN(3*x) - 3*COS(3*x))

INT(a^x*COS(x), x) = a^x/(LN(a)^2 + 1)*(LN(a)*COS(x) + SIN(x))

INT(COS(LN(x)), x) = x/2*(COS(LN(x)) + SIN(LN(x)))

INT(SEC(x)^2*LN(COS(x)), x) = TAN(x)*LN(COS(x)) + TAN(x) - x

INT(x*TAN(x)^2, x) = LN(COS(x)) + x*TAN(x) - 1/2*x^2

INT(ASIN(x)/x^2, x) = - ASIN(x)/x + LN((1 - SQRT(1 - x^2))/x)

INT(ASIN(x)^2, x) = x*ASIN(x)^2 + 2*SQRT(1 - x^2)*ASIN(x) - 2*x

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

INT(ACOS(SQRT(x/(x + 1))), x) = (x + 1)*(ACOS(SQRT(x/(x + 1))) +
SQRT(1/(x + 1))*SQRT(x/(x + 1)))

There are 8 chapters in the book containing 81+90+14+132+120+26+11+59 =
533 integration examples; the above are numbers 76 to 81 from chapter 1.
I believe the whole would make a good independent integration test suite
because the book antedates all automated integrators and because the
author claims to cover the field thoroughly (with respect to integrals
expressible by elementary functions and by elliptic integrals). In the
Foreword (Предисловие), he writes (as translated by Google):

"In most of the guides on higher mathematics the question of integration
of functions of one independent variable has a fairly complete coverage,
so that very often students do not get a clear idea of ??what functions
are integrated in closed form, for which this integration is impossible,
and what techniques are useful in a particular case for various kinds of
functions. With this in mind, the author of this book sought to explain
the issue to a possible full, paying particular attention to the
practice of integration, thus introducing a large number of examples.
Thus, this book can serve as a first, a reference book for those wanting
to get a quick response with respect to a quadrature, and secondly, aid
for students who wish to supplement and deepen their knowledge in this
matter."

Some may prefer the original:

"В большей части руководств по высшей м
атематике вопрос об интегрировании
функций одного независимого переменно
го не имеет достаточно полного
освещения, вследствие чего очень часто
учащиеся не получают ясного
представления о том, какие функции инте
грируются в конечном виде, для
каких это интегрирование невозможно и
какие приёмы целесообразно
применять в том или ином случае для раз
личных видов функций. Имея это в
виду, автор в настоящей книге стремился
изложить вопрос с возможной
полнотой, обратив особое внимание на пр
актику интегрирования, введя при
этом большое количество примеров. Таки
м образом, книга эта может
служить, во-первых, справочником для ли
ц, желающих получить скорый ответ
относительно той или иной квадратуры, а
во-вторых, пособием для
учащихся, желающих пополнить и углубит
ь свои знания в этом вопросе."

A djvu file of the book (6 Megabyte) can be downloaded freely from
various websites - just google the Russian title. The full name of the
author apparently was Aleksandr Fedotovich Timofeev (Александр
Федотович Тимофеев), but I couldn't locate any
information on him beyond this. A Russian review of the book is
available at:

<http://www.mathnet.ru/links/5566c95518efdede979ffdc8a2278b01/rm8600.pdf>

There are the usual misprints in the book, but with both the integrand
and antiderivative available, the original meaning can be reconstructed
for all (or almost all) examples I think. Timofeev's antiderivatives are
usually close to the most compact form possible (an exception is his
consistent use of logarithms for inverse hyperbolic functions), but they
have to be checked for validity over the complex plane, and be corrected
if necessary (this seems rare, but was needed for the last example
above). Apart from compactness, continuity (and reality) on the real
axis might be worth checking and repairing too.

So, if 5 to 10 people were found willing to type in and check (and
perhaps correct or improve) 50 to 100 integrals and evaluations each, a
digitization of this corpus could be an almost pleasant task, and surely
quite useful. What do you think?

Martin.

clicl...@freenet.de

unread,
Mar 19, 2013, 3:40:46 PM3/19/13
to

I bumped into this and am surprised by 70% failures (and not just
timeouts) of the Axiom integrator on algebraic integrals possessing
logarithmic antiderivatives that involve the single simple radical
SQRT(x^3+1) or SQRT(x^4+1):

<http://www.risc.jku.at/publications/download/risc_3427/Ka01.pdf>

This must be where the missing computation of the "splitting field of
the Trager resultant" comes in.

Martin.

Waldek Hebisch

unread,
Mar 21, 2013, 3:26:13 PM3/21/13
to
If one wants to describe the reason in one sentence, then yes.
However, the actual Axiom limitation is more severe: it can
only handle integrals where Trager resultant has at most one
nonlinear factor. Additionally, Axiom can handle directly
only integrands with no poles at infinity. Kauers examples
have pole at infinity, which Axiom handles by change of
variables. After change of variables Trager resultant
changes and has two nonlinear factors and Axiom gives up.

What is surprising is 12% sucess rate: Kauers examples of
given series are variation of a single example -- only numerical
coefficients differ but structure remains the same unless
there is degeneracy. Apparently distribution of coefficients
(which Kauers did not gave) is such that degeneracies are
relatively frequent.

Axiom restriction on single nonlinear factor of Trager
resultant is quite severe. Namely, given logand with
no zero or pole at infinity it will lead to at least
_two_ residues (one corresponding to zero another one
correspondig to a pole). So typically we will get a
pair of nonlinear factors.

Main difficulty of Kauers examples were already observerd
by Davenport. Namely, given derivative of

r1*log(f1) + r2*log(f2)

where r1 and r2 are rationals Trager method will consider
both terms together. If r1 and r2 are integer this
leads to

log(f1^r2*f2^r1)

f1^r2*f2^r1 may be quite large even if f1 and f2 are small.

FYI, FriCAS contans code which in many cases avoids both
problems. Namely, FriCAS tries to split integral and
integrate parts separately. This handles the sqrt(1 + x^4)
cases. Currently in sqrt(1 + x^3) case FriCAS is unable
to find working split and gives up.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
Mar 22, 2013, 2:13:48 PM3/22/13
to

Waldek Hebisch schrieb:
>
> clicl...@freenet.de wrote:
> >
> > I bumped into this and am surprised by 70% failures (and not just
> > timeouts) of the Axiom integrator on algebraic integrals possessing
> > logarithmic antiderivatives that involve the single simple radical
> > SQRT(x^3+1) or SQRT(x^4+1):
> >
> > <http://www.risc.jku.at/publications/download/risc_3427/Ka01.pdf>
> >
> > This must be where the missing computation of the "splitting field
> > of the Trager resultant" comes in.
>
> If one wants to describe the reason in one sentence, then yes.
> [...]
>
> FYI, FriCAS contans code which in many cases avoids both
> problems. Namely, FriCAS tries to split integral and
> integrate parts separately. This handles the sqrt(1 + x^4)
> cases. Currently in sqrt(1 + x^3) case FriCAS is unable
> to find working split and gives up.
>

Thanks for the explanation.

If the failure to suitably split elementary integrals involving the
radical sqrt(1 + x^3) = sqrt((1 + x)*(1 - x + x^2)) is somehow caused by
the presence of an odd power in the radicand, the substitution t^2 =
1 + x might help, which introduces the radical sqrt(3 - 3*t^2 + t^4)
where all powers of t are even. A better substitution would be t^2 =
(1 - x + x^2)/(1 + x), which introduces sqrt(-3 + 6*t^2 + t^4), because
here t remains real whenever the original radical is real.

Martin.

Waldek Hebisch

unread,
Mar 26, 2013, 8:26:00 AM3/26/13
to
clicl...@freenet.de wrote:
>
> Waldek Hebisch schrieb:
> >
> > clicl...@freenet.de wrote:
> > >
> > > I bumped into this and am surprised by 70% failures (and not just
> > > timeouts) of the Axiom integrator on algebraic integrals possessing
> > > logarithmic antiderivatives that involve the single simple radical
> > > SQRT(x^3+1) or SQRT(x^4+1):
> > >
> > > <http://www.risc.jku.at/publications/download/risc_3427/Ka01.pdf>
> > >
> > > This must be where the missing computation of the "splitting field
> > > of the Trager resultant" comes in.
> >
> > If one wants to describe the reason in one sentence, then yes.
> > [...]
> >
> > FYI, FriCAS contans code which in many cases avoids both
> > problems. Namely, FriCAS tries to split integral and
> > integrate parts separately. This handles the sqrt(1 + x^4)
> > cases. Currently in sqrt(1 + x^3) case FriCAS is unable
> > to find working split and gives up.
> >

A little correction (I wrote the above from memory): FriCAS
has problems with (1 + x^3)^(1/3). The sqrt(1 + x^3) seem
to work fine.

> Thanks for the explanation.
>
> If the failure to suitably split elementary integrals involving the
> radical sqrt(1 + x^3) = sqrt((1 + x)*(1 - x + x^2)) is somehow caused by
> the presence of an odd power in the radicand, the substitution t^2 =
> 1 + x might help, which introduces the radical sqrt(3 - 3*t^2 + t^4)
> where all powers of t are even. A better substitution would be t^2 =
> (1 - x + x^2)/(1 + x), which introduces sqrt(-3 + 6*t^2 + t^4), because
> here t remains real whenever the original radical is real.

Theoretically the sqrt(1 + x^3) is very easy. However, FriCAS does
not take any advantage of this special form and in fact changes
variables to produce IIRC square root of polynomial of degree 4.
To give more details: Trager algorithm produces expression
of form

\sum c_i*u_i

where each u_i has simple poles with integer residues. For
rational functions each u_i would produce a log term. In
algebraic case sometimes u_i directly give log term (this
is the case in Kauers examples) sometimes one must combine
several terms into one. Trager gave a method do decide if
a single u_i corresponds to a log. However, Trager test
only works if u_i has no poles at infinity. So Trager
must first change variables to remove poles at infinity.
This changes u_i, in particular in Kauers case each u_i
splits into two terms. Namely, one term corresponds to
poles of the logand, another to zeros of the logand.
Consequently, after change of variables single u_i
_never_ gives a log. one must always combine them.
FriCAS tries to find matching terms by looking at
terms that have residue differning only by signs.
This heuristic may fail if two logands have common
pole (or zero). Kauers examples put poles at infinity,
so there is common pole. In sqrt(x^4+1) there are
two poles at infinity and this seem to be the reason
that matching still works. In sqrt(x^3+1) Trager
test for logs may be modified to handle pole at
infinity, so there is no need to change variables
and then logs would be directly visible without
any need for matching. In (x^3+1)^3 case correct
way of matching terms is "obvious" for humans, but
not so easy to code in a general way.

Concerning you change of variables: it assumes knowledge
of some root of x^3+1. However, for irreducible cubic
root would introduce algebraic extension and that is
_very_ expensive for FriCAS.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
Mar 26, 2013, 5:36:12 PM3/26/13
to

Waldek Hebisch schrieb:
>
> clicl...@freenet.de wrote:
> >
> > Waldek Hebisch schrieb:
> > >
> > > clicl...@freenet.de wrote:
> > > >
> > > > I bumped into this and am surprised by 70% failures (and not just
> > > > timeouts) of the Axiom integrator on algebraic integrals possessing
> > > > logarithmic antiderivatives that involve the single simple radical
> > > > SQRT(x^3+1) or SQRT(x^4+1):
> > > >
> > > > <http://www.risc.jku.at/publications/download/risc_3427/Ka01.pdf>
> > > >
> > > > This must be where the missing computation of the "splitting field
> > > > of the Trager resultant" comes in.
> > >
> > > If one wants to describe the reason in one sentence, then yes.
> > > [...]
> > >
> > > FYI, FriCAS contans code which in many cases avoids both
> > > problems. Namely, FriCAS tries to split integral and
> > > integrate parts separately. This handles the sqrt(1 + x^4)
> > > cases. Currently in sqrt(1 + x^3) case FriCAS is unable
> > > to find working split and gives up.
> > >
>
> A little correction (I wrote the above from memory): FriCAS
> has problems with (1 + x^3)^(1/3). The sqrt(1 + x^3) seem
> to work fine.
>

Then one may substitute t^3 = (1 - x + x^2)/(1 + x)^2, introducing the
radical sqrt(-3 + 12*t^3) which is no cube root any more. It looks like
FriCAS would be able to handle this!
Yes, these substitutions work only if the radicand can be factored. (I
am aware of them because they are needed in the non-elementary case
where integrands involving square or fourth roots of cubic or quartic
polynomials, or cube roots of quadratic or cubic polynomials, are to be
reduced to the canonical elliptic integrals. I think irrational roots of
cubic or higher polynomials are best kept as symbolic objects, as seems
to be done when Maple reduces elliptic integrals.)

Martin.

clicl...@freenet.de

unread,
Apr 20, 2013, 12:16:35 PM4/20/13
to

clicl...@freenet.de schrieb:
>
> The Russian book "Integration of Functions" [...] published by A.F.
> Timofeev [...] in 1948 provides [...] 533 integration examples [...].
> I believe the whole would make a good independent integration test
> suite because the book antedates all automated integrators and because
> the author claims to cover the field thoroughly [...].
>
> There are the usual misprints in the book, but with both the integrand
> and antiderivative available, the original meaning can be
> reconstructed for all (or almost all) examples I think. Timofeev's
> antiderivatives are usually close to the most compact form possible
> (an exception is his consistent use of logarithms for inverse
> hyperbolic functions), but they have to be checked for validity over
> the complex plane, and be corrected if necessary [...]. Apart from
> compactness, continuity (and reality) on the real axis might be worth
> checking and repairing too.
>
> So, if 5 to 10 people were found willing to type in and check (and
> perhaps correct or improve) 50 to 100 integrals and evaluations each,
> a digitization of this corpus could be an almost pleasant task, and
> surely quite useful. [...]
>

Although no interest has been shown in this integration test suite, I
have entered, checked, and amended all 81 integrals from chapter 1; the
integrals are appended below. Occasional multiple evaluations illustrate
alternatives worth pointing out, and integrals collected in vectors
represent examples involving sub-cases. Suggestions how to format the
integrals for easy testing of as systems as possible are welcome.

The antiderivatives hold on the entire complex plane and exhibit no
artificial discontinuities on the real axis (assuming the function
definitions of Derive). This does not apply to poles that cannot
sensibly be integrated over; thus logarithmic poles introduce imaginary
steps whose systematic removal via LN(x) <- 1/2*LN(x^2) would have been
awkward in many cases.

On these integrals, the performance of Derive 6.10 has been measured
with the integration variable limited to real values (the default mode
around which the system was built) - to declare the variable complex
should be considered unfair:

ch. ex's Der. Mpl MMA etc. etc.
6.10 ... ...
---------------------------------------
1 81 79 ?? ??
2 90 - - -
3 14 - - -
4 132 - - -
5 120 - - -
6 26 - - -
7 11 - - -
8 59 - - -
-------------------------------------
100% 97.5% ????% ????%

Derive 6.10 fails on examples 42 and 65; it automatically integrates
example 29 only with the Trigonometry simplification flag set to
Collect, which is not the default. When the integration variable is
declared complex, Derive additionally fails on integrals 44, 64, and 81.

Perhaps other systems (and/or chapters) can be added here by and by. I
am currently working on chapter 4 (132 integrals) in which I am
expecially interested, but not expecting to finish this before some
months have passed. I am not likely to enter the integrals from other
chapters too (particularly not the remaining massive ones 2, 5, and 8).

Martin.


" Timofeev (1948) Ch. 1, examples 1 - 21 (p. 25-26) ... "

INT(1/(a^2-b^2*x^2),x)=1/(a*b)*ATANH(b*x/a)

INT(1/(a^2+b^2*x^2),x)=1/(a*b)*ATAN(b*x/a)

INT(SEC(2*a*x),x)=1/(4*a)*LN((CSC(2*a*x)+1)/(CSC(2*a*x)-1))=-1/(~
2*a)*LN(TAN(pi/4-a*x))

INT(1/(4*SIN(x/3)),x)=3/8*LN((1-COS(x/3))/(1+COS(x/3)))=3/4*LN(T~
AN(x/6))

INT(1/COS(3/4*pi-2*x),x)=1/4*LN((1-SIN(3/4*pi-2*x))/(1+SIN(3/4*p~
i-2*x)))=1/2*LN(TAN(pi/8-x))

INT(SEC(x)*TAN(x),x)=SEC(x)

INT(CSC(x)*COT(x),x)=-CSC(x)

INT(TAN(x)/SIN(2*x),x)=1/2*TAN(x)

INT(1/(1+COS(x)),x)=SIN(x)/(1+COS(x))=TAN(x/2)

INT(1/(1-COS(x)),x)=SIN(x)/(COS(x)-1)=-COT(x/2)

INT(SIN(x)/(a-b*COS(x)),x)=1/b*LN(a-b*COS(x))

INT(COS(x)/(a^2+b^2*SIN(x)^2),x)=1/(a*b)*ATAN(b*SIN(x)/a)

INT(COS(x)/(a^2-b^2*SIN(x)^2),x)=1/(a*b)*ATANH(b*SIN(x)/a)

[INT(SIN(2*x)/(b^2*SIN(x)^2+a^2),x)=1/b^2*LN(a^2+b^2*SIN(x)^2),I~
NT(SIN(2*x)/(b^2*SIN(x)^2-a^2),x)=1/b^2*LN(a^2-b^2*SIN(x)^2)]

[INT(SIN(2*x)/(b^2*COS(x)^2+a^2),x)=-1/b^2*LN(a^2+b^2*COS(x)^2),~
INT(SIN(2*x)/(b^2*COS(x)^2-a^2),x)=-1/b^2*LN(a^2-b^2*COS(x)^2)]

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

INT(#e^x/(#e^(2*x)-1),x)=-ATANH(#e^x)

INT(1/(x*LN(x)),x)=LN(LN(x))

INT(1/(x*(1+LN(x)^2)),x)=ATAN(LN(x))

INT(1/(x*(1-LN(x))),x)=-LN(1-LN(x))

INT(1/(x*(1+LN(x/a))),x)=LN(1+LN(x/a))

" Timofeev (1948) Ch. 1, examples 22 - 40 (p. 27-28) ... "

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

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

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

INT((2*x-5)/(3*x^2-2),x)=1/3*LN(2-3*x^2)+5/SQRT(6)*ATANH(SQRT(6)~
*x/2)=(4-5*SQRT(6))/12*LN(SQRT(3)*x-SQRT(2))+(5*SQRT(6)+4)/12*LN~
(SQRT(3)*x+SQRT(2))

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

INT(SIN(x)*SIN(x/4),x)=2/3*SIN(3*x/4)-2/5*SIN(5*x/4)

INT(COS(3*x)*COS(4*x),x)=1/14*SIN(7*x)+1/2*SIN(x)

INT(TAN(x)*TAN(x-a),x)=1/TAN(a)*LN(1+TAN(a)*TAN(x))-x

[INT(SIN(x)^2,x)=1/2*(x-SIN(x)*COS(x)),INT(COS(x)^2,x)=1/2*(x+SI~
N(x)*COS(x))]

INT(SIN(x)*COS(x)^3,x)=-1/4*COS(x)^4

INT(COS(x)^3/SIN(x)^4,x)=1/SIN(x)-1/(3*SIN(x)^3)

INT(1/(SIN(x)^2*COS(x)^2),x)=TAN(x)-COT(x)

INT(COT(3/4*x)^2,x)=-4/3*COT(3*x/4)-x

INT((1+TAN(2*x))^2,x)=1/2*TAN(2*x)-LN(COS(2*x))

INT((TAN(x)-COT(x))^2,x)=TAN(x)-COT(x)-4*x

INT((TAN(x)-SEC(x))^2,x)=2*(TAN(x)-SEC(x))-x=2*TAN(x/2-pi/4)-x

INT(SIN(x)/(1+SIN(x)),x)=COS(x)/(1+SIN(x))+x=TAN(pi/4-x/2)+x

INT(COS(x)/(1-COS(x)),x)=SIN(x)/(COS(x)-1)-x=-COT(x/2)-x

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

" Timofeev (1948) Ch. 1, examples 41 - 65 (p. 35-37) ... "

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

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

INT((x+2)/(x^2-4*x-1),x)=1/2*LN(1+4*x-x^2)+4/SQRT(5)*ATANH((2-x)~
/SQRT(5))=1/10*((4*SQRT(5)+5)*LN(x-SQRT(5)-2)+(5-4*SQRT(5))*LN(x~
+SQRT(5)-2))

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

INT(1/((a*x+b)*SQRT(x)),x)=2/(SQRT(a)*SQRT(b))*ATAN(SQRT(a)*SQRT~
(x)/SQRT(b))

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

INT(x/SQRT(a^4-x^4),x)=1/2*ASIN(x^2/a^2)

[INT(1/(x*SQRT(x^2-a^2)),x)=1/a*ATAN(SQRT(x^2-a^2)/a),INT(1/(x*S~
QRT(a^2-x^2)),x)=-1/a*ATANH(SQRT(a^2-x^2)/a),INT(1/(x*SQRT(x^2+a~
^2)),x)=-1/a*ATANH(a/SQRT(x^2+a^2))]

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

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

INT(1/SQRT(x-x^2),x)=ASIN(2*x-1)

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

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

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

INT((2+3*SIN(x))/(SIN(x)*(1-COS(x))),x)=1/2*LN((1-COS(x))/(1+COS~
(x)))+(3*SIN(x)+1)/(COS(x)-1)

INT(1/(2+3*COS(x)^2),x)=1/SQRT(10)*(x-ATAN(3*SIN(x)*COS(x)/(SQRT~
(10)+2+3*COS(x)^2)))

INT((1-TAN(x))/SIN(2*x),x)=1/4*LN((1-COS(2*x))/(1+COS(2*x)))-1/2~
*TAN(x)=1/2*(LN(TAN(x))-TAN(x))

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

INT((a^2-4*COS(x)^2)^(3/4)*SIN(2*x),x)=1/7*(a^2-4*COS(x)^2)^(7/4)

INT(SIN(2*x)/(a^2-4*SIN(x)^2)^(1/3),x)=-3/8*(a^2-4*SIN(x)^2)^(2/~
3)

INT(1/SQRT(a^(2*x)-1),x)=1/LN(a)*ATAN(SQRT(a^(2*x)-1))=1/LN(a)*A~
SEC(SQRT(a^(2*x)))

INT(#e^(x/2)/SQRT(#e^x-1),x)=2*LN(SQRT(#e^x-1)+#e^(x/2))

INT(ATAN(x)^n/(1+x^2),x)=1/(n+1)*ATAN(x)^(n+1)

INT(ASIN(x/a)^(3/2)/SQRT(a^2-x^2),x)=2/5*(a/SQRT(a^2-x^2))*SQRT(~
1-(x/a)^2)*ASIN(x/a)^(5/2)

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

" Timofeev (1948) Ch. 1, examples 66 - 81 (p. 41-42) ... "

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

INT(LN(x)/x^5,x)=-(4*LN(x)+1)/(16*x^4)

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

INT(COS(x)^5,x)=SIN(x)/15*(3*COS(x)^4+4*COS(x)^2+8)

INT(SIN(x)^2*COS(x)^4,x)=1/6*SIN(x)^3*COS(x)^3+1/8*SIN(x)^3*COS(~
x)-1/16*SIN(x)*COS(x)+x/16

INT(1/SIN(x)^5,x)=3/16*LN((1-COS(x))/(1+COS(x)))-3*COS(x)/(8*SIN~
(x)^2)-COS(x)/(4*SIN(x)^4)

INT(SIN(x)/#e^x,x)=-(COS(x)+SIN(x))/(2*#e^x)

INT(#e^(2*x)*SIN(3*x),x)=1/13*#e^(2*x)*(2*SIN(3*x)-3*COS(3*x))

INT(a^x*COS(x),x)=a^x/(LN(a)^2+1)*(LN(a)*COS(x)+SIN(x))

INT(COS(LN(x)),x)=x/2*(COS(LN(x))+SIN(LN(x)))

INT(SEC(x)^2*LN(COS(x)),x)=TAN(x)*LN(COS(x))+TAN(x)-x

INT(x*TAN(x)^2,x)=LN(COS(x))+x*TAN(x)-1/2*x^2

INT(ASIN(x)/x^2,x)=-ASIN(x)/x+LN((1-SQRT(1-x^2))/x)

INT(ASIN(x)^2,x)=x*ASIN(x)^2+2*SQRT(1-x^2)*ASIN(x)-2*x

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

INT(ACOS(SQRT(x/(x+1))),x)=(x+1)*(ACOS(SQRT(x/(x+1)))+SQRT(1/(x+~
1))*SQRT(x/(x+1)))

" ... end of Timofeev Ch. 1 "

Nasser M. Abbasi

unread,
Apr 20, 2013, 1:08:25 PM4/20/13
to
On 4/20/2013 11:16 AM, clicl...@freenet.de wrote:
>
> clicl...@freenet.de schrieb:
>>
>> The Russian book "Integration of Functions" [...] published by A.F.
>> Timofeev [...] in 1948 provides [...] 533 integration examples [...].
...
>
> Although no interest has been shown in this integration test suite,

anyone instested, The book can be downloaded from

http://en.books4study.info/text-book3195.html

The format is .rar which can be extracted using standard free
software. (I use winRAR, which is very good free software)

It is strange that it was not translated to English.

> I
> have entered, checked, and amended all 81 integrals from chapter 1; the
> integrals are appended below.

Thanks for doing that ! That is useful. It would be actually good thing
to have "standard" set of test functions for CAS systems as a way
to compare them with each others in a quantitative way.

--Nasser


none Rouben Rostamian

unread,
Apr 20, 2013, 1:43:40 PM4/20/13
to
In article <kkui24$l9r$1...@speranza.aioe.org>,
Nasser M. Abbasi <n...@12000.org> wrote:
>On 4/20/2013 11:16 AM, clicl...@freenet.de wrote:
>>
>> clicl...@freenet.de schrieb:
>>>
>>> The Russian book "Integration of Functions" [...] published by A.F.
>>> Timofeev [...] in 1948 provides [...] 533 integration examples [...].
>...
>>
>> Although no interest has been shown in this integration test suite,
>
>anyone instested, The book can be downloaded from
>
>http://en.books4study.info/text-book3195.html
>
>The format is .rar which can be extracted using standard free
>software. (I use winRAR, which is very good free software)
>
>It is strange that it was not translated to English.

There is some sort of a screw-up in the download page that you
have given. The link refers to Timofeev's book, but what gets
downloaded is "Integral transforms and operational calculus"
by Ditkin and Prudnikov.

--
Rouben Rostamian

Axel Vogt

unread,
Apr 20, 2013, 2:05:38 PM4/20/13
to
It is not lack of interest ...

Here in Maple syntax (hopefull translated correctly, but I modified
muliple identities). Have not yet checked all (already the first is
not directly 'true' in Maple):

Int(1/(-b^2*x^2+a^2),x) =
1/a/b*arctanh(b*x/a)

Int(1/(b^2*x^2+a^2),x) =
1/a/b*arctan(b*x/a)

Int(sec(2*a*x),x) =
-1/2/a*ln(cot(1/4*Pi+a*x))

Int(1/4/sin(1/3*x),x) =
3/8*ln((1-cos(1/3*x))/(1+cos(1/3*x)))

Int(-1/cos(1/4*Pi+2*x),x) =
1/2*ln(cot(3/8*Pi+x))

Int(sec(x)*tan(x),x) =
sec(x)

Int(csc(x)*cot(x),x) =
-csc(x)

Int(tan(x)/sin(2*x),x) =
1/2*tan(x)

Int(1/(1+cos(x)),x) =
tan(1/2*x)

Int(1/(1-cos(x)),x) =
-cot(1/2*x)

Int(sin(x)/(a-b*cos(x)),x) =
1/b*ln(a-b*cos(x))

Int(cos(x)/(a^2+b^2*sin(x)^2),x) =
1/a/b*arctan(b*sin(x)/a)

Int(cos(x)/(a^2-b^2*sin(x)^2),x) =
1/a/b*arctanh(b*sin(x)/a)

Int(sin(2*x)/(a^2+b^2*sin(x)^2),x) =
1/b^2*ln(a^2+b^2*sin(x)^2)

Int(sin(2*x)/(b^2*sin(x)^2-a^2),x) =
1/b^2*ln(a^2-b^2*sin(x)^2)

Int(sin(2*x)/(cos(x)^2*b^2+a^2),x) =
-1/b^2*ln(cos(x)^2*b^2+a^2)

Int(sin(2*x)/(cos(x)^2*b^2-a^2),x) =
-1/b^2*ln(a^2-cos(x)^2*b^2)

Int(1/(4-cos(x)^2),x) =
1/6*3^(1/2)*(arctan(sin(x)*cos(x)/(2*3^(1/2)+4-cos(x)^2))+x)

Int(exp(x)/(exp(2*x)-1),x) =
-arctanh(exp(x))

Int(1/x/ln(x),x) =
ln(ln(x))

Int(1/x/(1+ln(x)^2),x) =
arctan(ln(x))

Int(1/x/(1-ln(x)),x) =
-ln(1-ln(x))

Int(1/x/(1+ln(x/a)),x) =
ln(1+ln(x/a))

Int((1-x^(1/2)+x)^2/x^2,x) =
3*ln(x)+x-4*x^(1/2)+4/x^(1/2)-1/x

Int((2-x^(2/3))*(x+x^(1/2))/x^(3/2),x) =
2*ln(x)-6/7*x^(7/6)-3/2*x^(2/3)+4*x^(1/2)

Int((2*x-1)/(2*x+3),x) =
x-2*ln(2*x+3)

Int((2*x-5)/(3*x^2-2),x) =
1/3*ln(-3*x^2+2)+5/6*6^(1/2)*arctanh(1/2*6^(1/2)*x)

Int((2*x-5)/(3*x^2+2),x) =
1/3*ln(3*x^2+2)-5/6*6^(1/2)*arctan(1/2*6^(1/2)*x)

Int(sin(x)*sin(1/4*x),x) =
2/3*sin(3/4*x)-2/5*sin(5/4*x)

Int(cos(3*x)*cos(4*x),x) =
1/14*sin(7*x)+1/2*sin(x)

Int(-tan(x)*tan(-x+a),x) =
1/tan(a)*ln(1+tan(a)*tan(x))-x

Int(sin(x)^2,x) =
1/2*x-1/2*sin(x)*cos(x)

Int(cos(x)^2,x) =
1/2*x+1/2*sin(x)*cos(x)

Int(sin(x)*cos(x)^3,x) =
-1/4*cos(x)^4

Int(cos(x)^3/sin(x)^4,x) =
1/sin(x)-1/3/sin(x)^3

Int(1/sin(x)^2/cos(x)^2,x) =
tan(x)-cot(x)

Int(cot(3/4*x)^2,x) =
-4/3*cot(3/4*x)-x

Int((1+tan(2*x))^2,x) =
1/2*tan(2*x)-ln(cos(2*x))

Int((tan(x)-cot(x))^2,x) =
tan(x)-cot(x)-4*x

Int((tan(x)-sec(x))^2,x) =
-2*cot(1/2*x+1/4*Pi)-x

Int(sin(x)/(1+sin(x)),x) =
cot(1/2*x+1/4*Pi)+x

Int(cos(x)/(1-cos(x)),x) =
-cot(1/2*x)-x

Int((exp(1/2*x)-1)^3*exp(-1/2*x),x) =
-6*exp(1/2*x)+2*exp(-1/2*x)+exp(x)+3*x

Int(1/(x^2-6*x+5),x) =
1/4*ln((x-5)/(x-1))

Int(x^2/(x^6-6*x^3+13),x) =
1/6*arctan(1/2*x^3-3/2)

Int((x+2)/(x^2-4*x-1),x) =
1/10*(4*5^(1/2)+5)*ln(x-5^(1/2)-2)+1/10*(5-4*5^(1/2))*ln(x+5^(1/2)-2)

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

Int(1/(a*x+b)/x^(1/2),x) =
2/a^(1/2)/b^(1/2)*arctan(a^(1/2)*x^(1/2)/b^(1/2))

Int(x^3*(x^2+1)^(1/2),x) =
1/15*(3*x^4+x^2-2)*(x^2+1)^(1/2)

Int(x/(a^4-x^4)^(1/2),x) =
1/2*arcsin(x^2/a^2)

Int(1/x/(-a^2+x^2)^(1/2),x) =
1/a*arctan((-a^2+x^2)^(1/2)/a)

Int(1/x/(a^2-x^2)^(1/2),x) =
-1/a*arctanh((a^2-x^2)^(1/2)/a)

Int(1/x/(a^2+x^2)^(1/2),x) =
-1/a*arctanh(a/(a^2+x^2)^(1/2))

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

Int(1/(3*x^2-4*x+5)^(1/2),x) =
1/3*3^(1/2)*ln(3^(1/2)*(3*x^2-4*x+5)^(1/2)+3*x-2)

Int(1/(-x^2+x)^(1/2),x) =
arcsin(2*x-1)

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

Int(1/x/(-x^2+x+2)^(1/2),x) =
1/2*2^(1/2)*ln((2*2^(1/2)*(-x^2+x+2)^(1/2)-x-4)/x)

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

Int((2+3*sin(x))/sin(x)/(1-cos(x)),x) =
1/2*ln((1-cos(x))/(1+cos(x)))+(3*sin(x)+1)/(cos(x)-1)

Int(1/(2+3*cos(x)^2),x) =
1/10*10^(1/2)*(x-arctan(3*sin(x)*cos(x)/(10^(1/2)+2+3*cos(x)^2)))

Int((1-tan(x))/sin(2*x),x) =
1/2*ln(tan(x))-1/2*tan(x)

Int((1+tan(x)^2)/(1-tan(x)^2),x) =
1/2*ln((tan(x)+1)/(1-tan(x)))

Int((a^2-4*cos(x)^2)^(3/4)*sin(2*x),x) =
1/7*(a^2-4*cos(x)^2)^(7/4)

Int(sin(2*x)/(a^2-4*sin(x)^2)^(1/3),x) =
-3/8*(a^2-4*sin(x)^2)^(2/3)

Int(1/(a^(2*x)-1)^(1/2),x) =
1/ln(a)*arctan((a^(2*x)-1)^(1/2))

Int(exp(1/2*x)/(exp(x)-1)^(1/2),x) =
2*ln((exp(x)-1)^(1/2)+exp(1/2*x))

Int(arctan(x)^n/(x^2+1),x) =
1/(n+1)*arctan(x)^(n+1)

Int(arcsin(x/a)^(3/2)/(a^2-x^2)^(1/2),x) =
2/5*a/(a^2-x^2)^(1/2)*(1-x^2/a^2)^(1/2)*arcsin(x/a)^(5/2)

Int(1/arccos(x)^3/(-x^2+1)^(1/2),x) =
1/2/arccos(x)^2

Int(ln(x)^2*x,x) =
1/2*x^2*(ln(x)^2-ln(x)+1/2)

Int(ln(x)/x^5,x) =
-1/16*(4*ln(x)+1)/x^4

Int(x^2*ln((x-1)/x),x) =
1/3*x^3*ln((x-1)/x)-1/3*ln(x-1)-1/6*x*(x+2)

Int(cos(x)^5,x) =
1/15*sin(x)*(3*cos(x)^4+4*cos(x)^2+8)

Int(cos(x)^4*sin(x)^2,x) =
1/6*sin(x)^3*cos(x)^3+1/8*sin(x)^3*cos(x)-1/16*sin(x)*cos(x)+1/16*x

Int(1/sin(x)^5,x) =
3/16*ln((1-cos(x))/(1+cos(x)))-3/8*cos(x)/sin(x)^2-1/4*cos(x)/sin(x)^4

Int(sin(x)*exp(-x),x) =
-1/2*(cos(x)+sin(x))*exp(-x)

Int(exp(2*x)*sin(3*x),x) =
1/13*exp(2*x)*(2*sin(3*x)-3*cos(3*x))

Int(a^x*cos(x),x) =
a^x/(ln(a)^2+1)*(ln(a)*cos(x)+sin(x))

Int(cos(ln(x)),x) =
1/2*x*(cos(ln(x))+sin(ln(x)))

Int(sec(x)^2*ln(cos(x)),x) =
tan(x)*ln(cos(x))+tan(x)-x

Int(x*tan(x)^2,x) =
ln(cos(x))+x*tan(x)-1/2*x^2

Int(arcsin(x)/x^2,x) =
-arcsin(x)/x+ln((1-(-x^2+1)^(1/2))/x)

Int(arcsin(x)^2,x) =
x*arcsin(x)^2+2*arcsin(x)*(-x^2+1)^(1/2)-2*x

Int(x^2*arctan(x)/(x^2+1),x) =
x*arctan(x)-1/2*arctan(x)^2-1/2*ln(x^2+1)

Int(arccos((x/(x+1))^(1/2)),x) =
(x+1)*(arccos((x/(x+1))^(1/2))+(1/(x+1))^(1/2)*(x/(x+1))^(1/2))


clicl...@freenet.de

unread,
Apr 20, 2013, 3:36:40 PM4/20/13
to

Axel Vogt schrieb:
>
> Here in Maple syntax (hopefull translated correctly, but I modified
> muliple identities). Have not yet checked all (already the first is
> not directly 'true' in Maple):
>
> Int(1/(-b^2*x^2+a^2),x) =
> 1/a/b*arctanh(b*x/a)
>

How can this be "not true" in Maple? Differentiation of the
antiderivative

DIF(1/(a*b)*ATANH(b*x/a), x)

1/((b*x + a)*(a - b*x))

leads back to the integrand. So the differentiated equation must
simplify to 'true'.

Martin.

clicl...@freenet.de

unread,
Apr 20, 2013, 4:01:41 PM4/20/13
to

none Rouben Rostamian schrieb:
Sorry, I had no idea there were problems. I downloaded this book long
ago; all I remember is there that was no lack of choice, and that the
first download button I clicked almost magically produced the book.

So if something is wrong with Nasser's

<http://en.books4study.info/text-book3195.html>

please try another Google hit, e.g.

<http://www.math-life.com/jdownloads/view.download/27/279.html>

where the (unmistakable) "download" button links to:

<http://www.math-life.com/jdownloads/finish/27/279.html>

Warning: I haven't checked this link! But I will supply more options if
this one is bad too!

Martin.

Axel Vogt

unread,
Apr 20, 2013, 4:07:32 PM4/20/13
to
Sorry. Yes, it does.

Richard Fateman

unread,
Apr 20, 2013, 4:37:45 PM4/20/13
to
If you visit
http://www.mathtable.com/gr/

you will see a collection of books. The table by Gradshteyn and Rhyzik,
edited by Zwillinger is quite large, and if you look
at the CD ROM, all the formulas are in digital form.

I experimented in reading the pages (via OCR) but eventually this
was overtaken by hand-entry of TeX (with macros). But nearly the whole
book can be (and has been, I think) converted to Mathematica syntax,
and I think also into something that can be read into Lisp.

The vast majority of (interesting) formulas in these tables are
not the indefinite integrals but the definite integrals.

Wolfram (for example) claims to do all the indefinite integrals in G&R.
I believe this was false when first claimed. Maybe still is.

I suspect that all the material in the earlier Russian literature was
copied/ improved by G&R and subsequent revisions of that.

I have also offered access to tables from CRC -- shorter but more
carefully checked -- in digital form.

The places where the tables show the CAS to mess up happen when the
formulas are not generic. The tables indicate when the formula needs
to be changed under some assumptions, and the CAS not. Or vice versa
perhaps.
RJF

Axel Vogt

unread,
Apr 20, 2013, 5:45:16 PM4/20/13
to
On 20.04.2013 18:16, clicl...@freenet.de wrote:
...
> INT(x/SQRT(a^4-x^4),x)=1/2*ASIN(x^2/a^2)

Is that sure? For a= exp(I*Pi/4) and after differentiating
w.r.t. x that seems false to me by a factor of -1

clicl...@freenet.de

unread,
Apr 20, 2013, 5:56:16 PM4/20/13
to

Axel Vogt schrieb:
Thanks. You are right: I forgot to declare 'a' complex when checking by
differentiation. I will repair this tomorrow.

Martin.

Waldek Hebisch

unread,
Apr 20, 2013, 8:40:56 PM4/20/13
to
clicl...@freenet.de wrote:
>
> clicl...@freenet.de schrieb:
> >
> > The Russian book "Integration of Functions" [...] published by A.F.
> > Timofeev [...] in 1948 provides [...] 533 integration examples [...].
> > I believe the whole would make a good independent integration test
> > suite because the book antedates all automated integrators and because
> > the author claims to cover the field thoroughly [...].
>
> Although no interest has been shown in this integration test suite, I
> have entered, checked, and amended all 81 integrals from chapter 1; the
> integrals are appended below. Occasional multiple evaluations illustrate
> alternatives worth pointing out, and integrals collected in vectors
> represent examples involving sub-cases. Suggestions how to format the
> integrals for easy testing of as systems as possible are welcome.

I am not sure is special treatment of subcases is good idea, because
it requires extra effort for parsing.

>
> On these integrals, the performance of Derive 6.10 has been measured
> with the integration variable limited to real values (the default mode
> around which the system was built) - to declare the variable complex
> should be considered unfair:
>
> ch. ex's Der. Mpl MMA etc. etc.
> 6.10 ... ...
> ---------------------------------------
> 1 81 79 ?? ??

> -------------------------------------
> 100% 97.5% ????% ????%
>

FYI FriCAS produces result for all integrals (after expanding
cases I got 86 integrals). Note: I did not check the results,
for quick testing I joined split lines, removed '[', ','
']' and all results. I needed to replace '#e' by '%e',
after that FriCAS could parse your examples and with few
macros understand them.

--
heb...@math.uni.wroc.pl

none Rouben Rostamian

unread,
Apr 20, 2013, 9:31:25 PM4/20/13
to
I checked. It's fine. Thanks!

--
Rouben Rostamian

Axel Vogt

unread,
Apr 21, 2013, 5:48:43 AM4/21/13
to
Ok, for this 86 given integrals (translated to Maple syntax) Maple 17 solves all,
BUT ONE, Int(exp(1/2*x)/(exp(x)-1)^(1/2),x) = 2*ln((exp(x)-1)^(1/2)+exp(1/2*x)).

That can be done manually:

Int(exp(1/2*x)/(exp(x)-1)^(1/2),x);
Change(%, exp(1/2*x) = y, y);
value(%);
subs(y = exp(1/2*x), %); # re-substitute
combine(%); # re-write, giving the asserted


For the remaining 85 solutions it can automatically prove that lhs = rhs after
differentiation w.r.t. x and it fails for no. 50, 52, 53:

#Int(x/(a^4-x^4)^(1/2),x)
1/2*arctan(x^2/(a^4-x^4)^(1/2)) =
1/2*arcsin(x^2/a^2),

#Int(1/(x*(a^2-x^2)^(1/2)),x)
-1/(a^2)^(1/2)*ln((2*a^2+2*(a^2)^(1/2)*(a^2-x^2)^(1/2))/x) =
-1/a*arctanh((a^2-x^2)^(1/2)/a),

#Int(1/(x*(a^2+x^2)^(1/2)),x)
-1/(a^2)^(1/2)*ln((2*a^2+2*(a^2)^(1/2)*(a^2+x^2)^(1/2))/x) =
-1/a*arctanh(a/(a^2+x^2)^(1/2))

Assuming a<>0 resolves the last two ones.


For the first one I think that is false for a= exp(I*Pi/4),
as already said in a previous post (20.04.2013)

G. A. Edgar

unread,
Apr 21, 2013, 8:46:59 AM4/21/13
to
>
> ch. ex's Der. Mpl MMA etc. etc.
> 6.10 ... ...
> ---------------------------------------
> 1 81 79 ?? ??
> 2 90 - - -
> 3 14 - - -
> 4 132 - - -
> 5 120 - - -
> 6 26 - - -
> 7 11 - - -
> 8 59 - - -
> -------------------------------------
> 100% 97.5% ????% ????%
>
> Derive 6.10 fails on examples 42 and 65; it automatically integrates
> example 29 only with the Trigonometry simplification flag set to
> Collect, which is not the default. When the integration variable is
> declared complex, Derive additionally fails on integrals 44, 64, and 81.
>

Maple 17 does 42 and 65 with no problem.
In 29 Maple's answer is slightly different ... but if we apply the
(possibly illegitimate?) simplification arctan(tan(x)) = x, then we get
something that agrees with the claim up to a constant addend.

--
G. A. Edgar http://www.math.ohio-state.edu/~edgar/

clicl...@freenet.de

unread,
Apr 21, 2013, 12:20:49 PM4/21/13
to

Richard Fateman schrieb:
>
> I suspect that all the material in the earlier Russian literature was
> copied/ improved by G&R and subsequent revisions of that.
>

The "examples" in Timofeev's book would probably better be called
exercises. They were obviously chosen to illustrate the application of
the integration techniques he describes. Accordingly, they not at all
generic and resemble actual integration problems rather than entries in
an integral table. Chapter 1 of the book is concerned with the
techniques of variable substitution and integration by parts.

Martin.

clicl...@freenet.de

unread,
Apr 21, 2013, 12:20:53 PM4/21/13
to

Axel Vogt schrieb:
I have repaired the evaluation of INT(x/SQRT(a^4-x^4)), x), it now
applies to complex 'a' as well. I also saw that some other evaluations
(i.e. 3, 4, 5, 55, 57, 71) could be shortened by converting from LN to
ATANH, and have made the substitutions. The full set of corrected
integrals from chapter 1 of Timofeev's book is appended below.

I am still counting integrals involving subcases as a single integral,
because splitting them into separate integrals would destroy the
correspondence with Timofeev's numbering. In order to allow easy
reference, the number would then have to be included explicitely, e.g.
as

["30a", INT(SIN(x)^2, x) = 1/2*(x - SIN(x)*COS(x))]

and vectors would still have to be parsed. I am therefore undecided on
this issue.

The following table summarizes the performance data made available so
far. I am no longer counting integral 29 (requiring a non-default
setting of a simplification flag) among the successes of Derive. I am
assuming that results produced by FriCAS never consist of error messages
or involve unresolved integrals or non-elementary functions. And I am
counting INT(EXP(x/2)/SQRT(EXP(x)-1), x) as a failure for Maple. Yes.

ch. ex's Der. Fri. Mpl MMA etc. etc.
6.10 1.20 17 ...
----------------------------------------------
1 81 78 81 80 ??
2 90 - - - -
3 14 - - - -
4 132 - - - -
5 120 - - - -
6 26 - - - -
7 11 - - - -
8 59 - - - -
--------------------------------------------
100% 96.3% 100% 98.8% ????%

The Winner so far is .............. FriCAS!

Martin.


" Timofeev (1948) Ch. 1, examples 1 - 21 (p. 25-26) ... "

INT(1/(a^2-b^2*x^2),x)=1/(a*b)*ATANH(b*x/a)

INT(1/(a^2+b^2*x^2),x)=1/(a*b)*ATAN(b*x/a)

INT(SEC(2*a*x),x)=1/(2*a)*ATANH(1/CSC(2*a*x))=-1/(2*a)*LN(TAN(pi~
/4-a*x))

INT(1/(4*SIN(x/3)),x)=-3/4*ATANH(COS(x/3))=3/4*LN(TAN(x/6))

INT(1/COS(3/4*pi-2*x),x)=-1/2*ATANH(SIN(3/4*pi-2*x))=1/2*LN(TAN(~
INT((#e^(x/2)-1)^3*#e^(-x/2),x)=-6*#e^(x/2)+2*#e^(-x/2)+#e^x+3*x~

" Timofeev (1948) Ch. 1, examples 41 - 65 (p. 35-37) ... "

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

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

INT((x+2)/(x^2-4*x-1),x)=1/2*LN(1+4*x-x^2)+4/SQRT(5)*ATANH((2-x)~
/SQRT(5))=1/10*((4*SQRT(5)+5)*LN(x-SQRT(5)-2)+(5-4*SQRT(5))*LN(x~
+SQRT(5)-2))

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

INT(1/((a*x+b)*SQRT(x)),x)=2/(SQRT(a)*SQRT(b))*ATAN(SQRT(a)*SQRT~
(x)/SQRT(b))

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

INT(x/SQRT(a^4-x^4),x)=1/2*(a^2/SQRT(a^4-x^4))*SQRT(1-(x/a)^4)*A~
SIN((x/a)^2)

[INT(1/(x*SQRT(x^2-a^2)),x)=1/a*ATAN(SQRT(x^2-a^2)/a),INT(1/(x*S~
QRT(a^2-x^2)),x)=-1/a*ATANH(SQRT(a^2-x^2)/a),INT(1/(x*SQRT(x^2+a~
^2)),x)=-1/a*ATANH(a/SQRT(x^2+a^2))]

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

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

INT(1/SQRT(x-x^2),x)=ASIN(2*x-1)

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

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

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

INT((2+3*SIN(x))/(SIN(x)*(1-COS(x))),x)=-ATANH(COS(x))+(3*SIN(x)~
+1)/(COS(x)-1)

INT(1/(2+3*COS(x)^2),x)=1/SQRT(10)*(x-ATAN(3*SIN(x)*COS(x)/(SQRT~
(10)+2+3*COS(x)^2)))

INT((1-TAN(x))/SIN(2*x),x)=-1/2*(ATANH(COS(2*x))+TAN(x))=1/2*(LN~
(TAN(x))-TAN(x))

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

INT((a^2-4*COS(x)^2)^(3/4)*SIN(2*x),x)=1/7*(a^2-4*COS(x)^2)^(7/4~
)

INT(SIN(2*x)/(a^2-4*SIN(x)^2)^(1/3),x)=-3/8*(a^2-4*SIN(x)^2)^(2/~
3)

INT(1/SQRT(a^(2*x)-1),x)=1/LN(a)*ATAN(SQRT(a^(2*x)-1))=1/LN(a)*A~
SEC(SQRT(a^(2*x)))

INT(#e^(x/2)/SQRT(#e^x-1),x)=2*LN(SQRT(#e^x-1)+#e^(x/2))

INT(ATAN(x)^n/(1+x^2),x)=1/(n+1)*ATAN(x)^(n+1)

INT(ASIN(x/a)^(3/2)/SQRT(a^2-x^2),x)=2/5*(a/SQRT(a^2-x^2))*SQRT(~
1-(x/a)^2)*ASIN(x/a)^(5/2)

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

" Timofeev (1948) Ch. 1, examples 66 - 81 (p. 41-42) ... "

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

INT(LN(x)/x^5,x)=-(4*LN(x)+1)/(16*x^4)

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

INT(COS(x)^5,x)=SIN(x)/15*(3*COS(x)^4+4*COS(x)^2+8)

INT(SIN(x)^2*COS(x)^4,x)=1/6*SIN(x)^3*COS(x)^3+1/8*SIN(x)^3*COS(~
x)-1/16*SIN(x)*COS(x)+x/16

INT(1/SIN(x)^5,x)=-3/8*ATANH(COS(x))-3*COS(x)/(8*SIN(x)^2)-COS(x~
)/(4*SIN(x)^4)

INT(SIN(x)/#e^x,x)=-(COS(x)+SIN(x))/(2*#e^x)

INT(#e^(2*x)*SIN(3*x),x)=1/13*#e^(2*x)*(2*SIN(3*x)-3*COS(3*x))

INT(a^x*COS(x),x)=a^x/(LN(a)^2+1)*(LN(a)*COS(x)+SIN(x))

INT(COS(LN(x)),x)=x/2*(COS(LN(x))+SIN(LN(x)))

INT(SEC(x)^2*LN(COS(x)),x)=TAN(x)*LN(COS(x))+TAN(x)-x

INT(x*TAN(x)^2,x)=LN(COS(x))+x*TAN(x)-1/2*x^2

INT(ASIN(x)/x^2,x)=-ASIN(x)/x+LN((1-SQRT(1-x^2))/x)

INT(ASIN(x)^2,x)=x*ASIN(x)^2+2*SQRT(1-x^2)*ASIN(x)-2*x

INT(x^2*ATAN(x)/(1+x^2),x)=x*ATAN(x)-1/2*ATAN(x)^2-1/2*LN(x^2+1)~

Waldek Hebisch

unread,
Apr 21, 2013, 9:01:27 PM4/21/13
to
clicl...@freenet.de wrote:
>
> The following table summarizes the performance data made available so
> far. I am no longer counting integral 29 (requiring a non-default
> setting of a simplification flag) among the successes of Derive. I am
> assuming that results produced by FriCAS never consist of error messages
> or involve unresolved integrals or non-elementary functions.

Yes, FriCAS produced elementary results. I have now checked them
by differentiation. FriCAS 1.2.0 produced one wrong result
for INT(1/(x*log(x/a)+x)), x). This was silly bug (fixed in
trunk) which caused extra 'a' factor in the answer. In two
cases FriCAS is unable to simplify difference between integrand
and derivative of the integral -- both cases involve potentally
different branches of square roots. One is:

+-----+
| 1
|-----
\|x + 1 1
- atan(--------) + atan(----------------)
+-----+ +-----+
| x | x +-----+
|----- |----- \|x + 1
\|x + 1 \|x + 1


The other is is similar, but bigger.


--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
Apr 22, 2013, 1:51:42 PM4/22/13
to

Waldek Hebisch schrieb:
>
> Yes, FriCAS produced elementary results. I have now checked them
> by differentiation. FriCAS 1.2.0 produced one wrong result
> for INT(1/(x*log(x/a)+x)), x). This was silly bug (fixed in
> trunk) which caused extra 'a' factor in the answer. In two
> cases FriCAS is unable to simplify difference between integrand
> and derivative of the integral -- both cases involve potentally
> different branches of square roots. One is:
>
> +-----+
> | 1
> |-----
> \|x + 1 1
> - atan(--------) + atan(----------------)
> +-----+ +-----+
> | x | x +-----+
> |----- |----- \|x + 1
> \|x + 1 \|x + 1
>
> The other is is similar, but bigger.
>

This expression differentiates to

SQRT(x/(x+1))*(SQRT(1/(x+1)) - 1/SQRT(x+1))/(2*x)

which is zero everywhere except on the negative real axis for x < -1.
(It is no delta function, however.)

-

The following table summarizes the performance data made available so
far.

ch. ex's Der. Fri. Mpl MMA etc. etc.
6.10 1.20 17 ...
----------------------------------------------
1 81 78 80 80 ??
2 90 - - - -
3 14 - - - -
4 132 - - - -
5 120 - - - -
6 26 - - - -
7 11 - - - -
8 59 - - - -
--------------------------------------------
100% 96.3% 98.8% 98.8% ????%

FriCAS has been stripped of the title! There is a tie now between FriCAS
and Maple, and no clear winner emerges.

What about the others: Is Lady Maxima on her death bed already? And Sir
Axiom? Is Sympy still nothing but a Dreikäsehoch? Has Mathematica gone
fully Coca Cola already? Any one of them has a chance to become the one
and only winner!

Martin.

Axel Vogt

unread,
Apr 22, 2013, 4:11:21 PM4/22/13
to
...
> ch. ex's Der. Fri. Mpl MMA etc. etc.
> 6.10 1.20 17 ...
> ----------------------------------------------
> 1 81 78 80 80 ??
> 2 90 - - - -
> 3 14 - - - -
> 4 132 - - - -
> 5 120 - - - -
> 6 26 - - - -
> 7 11 - - - -
> 8 59 - - - -
> --------------------------------------------
> 100% 96.3% 98.8% 98.8% ????%
...

Let's go to Chap 3, 6 and 7 ( in a new thread ) ?

clicl...@freenet.de

unread,
Apr 22, 2013, 5:15:45 PM4/22/13
to

Axel Vogt schrieb:
Yes, same thread or different thread, would make no difference to me. I
am working on Ch. 4, as I said, but in a _very_ relaxed way.

It has occured to me that Waldek should post the FriCAS results for the
two cases he could not verify by differentiation. Perhaps they are
correct, perhaps not. I doubt that results with mixed branches should be
counted as successes: numerical evaluation would fail even on FriCAS, I
suppose.

Martin.

Waldek Hebisch

unread,
Apr 23, 2013, 1:26:36 PM4/23/13
to
(1) -> integrate((asin(x/a)*asin(x/a)^(1/2))/((-1*x^2+a^2)^(1/2)), x)

+-------------------+
x 2 | x
2atan(------------) |2atan(------------)
+---------+ | +---------+
| 2 2 | | 2 2
\|- x + a \| \|- x + a
(1) ------------------------------------------
+-+
5\|2
Type: Union(Expression(Integer),...)
(2) -> integrate(acos((x/(x+1))^(1/2)), x)

+-----+
1 | x +-----+
(2) (x + 1)atan(----------------) + |----- \|x + 1
+-----+ \|x + 1
| x +-----+
|----- \|x + 1
\|x + 1
Type: Union(Expression(Integer),...)


--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
Apr 24, 2013, 12:38:20 PM4/24/13
to

Waldek Hebisch schrieb:
>
> clicl...@freenet.de wrote:
> >
These are correct antiderivatives for integrands

INT(ATAN(x/SQRT(a^2 - x^2))^(3/2)/SQRT(a^2 - x^2), x) =
2/5*ATAN(x/SQRT(a^2 - x^2))^(5/2)

INT(ATAN(1/(SQRT(x/(x+1))*SQRT(x+1))), x) =
(x+1)*ATAN(1/(SQRT(x/(x+1))*SQRT(x+1))) + SQRT(x/(x+1))*SQRT(x+1)

that differ from the original ones in the omission of piecewise constant
prefactors. I guess such a rewriting of integrands in FriCAS could take
place as a preparatory step or, perhaps more likely, implicitly during
their passage through the Risch mill.

With respect to the original integrands, the first antiderivative holds
for -pi/2 < arg(a) <= pi/2 and fails for all other parameters, while the
second one fails for real x < -1 and holds everywhere else.

ch. ex's Der. Fri. Mpl MMA etc. etc.
6.10 1.20 17 ...
----------------------------------------------
1 81 78 78 80 ??
2 90 - - - -
3 14 - - - -
4 132 - - - -
5 120 - - - -
6 26 - - - -
7 11 - - - -
8 59 - - - -
--------------------------------------------
100% 96.3% 96.3% 98.8% ????%

Accordingly, the Winner so far is .............. Maple!

Martin.

PS: I noticed that the evaluation of the original first integral may
also be written without a piecewise constant in the antiderivative:

INT(ASIN(x/a)^(3/2)/SQRT(a^2 - x^2), x) =
2/5*ASIN(x/a)^(3/2)*ATAN(x/SQRT(a^2 - x^2))

Richard Fateman

unread,
Apr 24, 2013, 2:11:25 PM4/24/13
to
I'm not sure what the relevance is of DERIVE's performance, since the
program is neither supported nor distributed at this time, but the
syntax looked almost identical to Macsyma (commercial, not supported or
distributed) so I tried to run it through Macsyma 2.4.0

textual changes ... LN -> LOG, PI -> %pi, #e-.%e, INT( -> integrate(,
removal of [ ].. downcasing of all trig functions and sqrt.

1. I found expressions in the test suite of the form

integrate(A,x) = B = C

which do not parse properly since B=C makes sense in Macsyma
if B and C are algebraic. It does not make sense in Macsyma
to ask (A=B) = C since A=B is logical not algebraic.

That is almost beside the point though. What is the test suite
supposed to be used for? Testing the simplification of B=C?
Is either answer, B or C supposed to be OK for the integration?
Is one supposed to verify the answer by differentiating B?

So I removed all the "answers" of several forms. I am optimistically
assuming that all results from integration of the forms in this chapter
will pass
some version of differentiation + simplification.

Running through the examples, Macsyma paused in a number of places
to ask (for example) is a*b pos or neg; is a nonzero; is x >0, is n+1
nonzero..

So I added assumptions such as assume(a>0, b>0, x>0 n>0) and ran the
test again.

The test went through without any burps that I noticed except for

integrate(asin(x/a)^(3/2)/sqrt(a^2-x^2),x)
which was not integrated. This appears to be the same as the first
clumsily restated expression in the original posting.

2. The results were the same with MAXIMA.




RJF


The test suite as used



integrate(1/(a^2-b^2*x^2),x);
integrate(1/(a^2+b^2*x^2),x);
integrate(sec(2*a*x),x);
integrate(1/(4*sin(x/3)),x);
integrate(1/cos(3/4*%pi-2*x),x);
integrate(sec(x)*tan(x),x);
integrate(csc(x)*cot(x),x);
integrate(tan(x)/sin(2*x),x);
integrate(1/(1+cos(x)),x);
integrate(1/(1-cos(x)),x);
integrate(sin(x)/(a-b*cos(x)),x);
integrate(cos(x)/(a^2+b^2*sin(x)^2),x);
integrate(cos(x)/(a^2-b^2*sin(x)^2),x);
integrate(sin(2*x)/(b^2*sin(x)^2+a^2),x);
integrate(sin(2*x)/(b^2*cos(x)^2+a^2),x);
integrate(sin(2*x)/(b^2*cos(x)^2-a^2),x);
integrate(1/(4-cos(x)^2),x);
integrate(%w^x/(%w^(2*x)-1),x);
integrate(1/(x*log(x)),x);
integrate(1/(x*(1+log(x)^2)),x);
integrate(1/(x*(1-log(x))),x);
integrate(1/(x*(1+log(x/a))),x);
integrate(((1-sqrt(x)+x)/x)^2,x);
integrate((2-x^(2/3))*(x+sqrt(x))/x^(3/2),x);
integrate((2*x-1)/(2*x+3),x);
integrate((2*x-5)/(3*x^2-2),x);
integrate((2*x-5)/(3*x^2+2),x);
integrate(sin(x)*sin(x/4),x);
integrate(cos(3*x)*cos(4*x),x);
integrate(tan(x)*tan(x-a),x);
integrate(sin(x)^2,x);
integrate(cos(x)^2,x);
integrate(sin(x)*cos(x)^3,x);
integrate(cos(x)^3/sin(x)^4,x);
integrate(1/(sin(x)^2*cos(x)^2),x);
integrate(cot(3/4*x)^2,x);
integrate((1+tan(2*x))^2,x);
integrate((tan(x)-cot(x))^2,x);
integrate((tan(x)-sec(x))^2,x);
integrate(sin(x)/(1+sin(x)),x);
integrate(cos(x)/(1-cos(x)),x);
integrate((%w^(x/2)-1)^3*%w^(-x/2),x);
integrate(1/(x^2-6*x+5),x);
integrate(x^2/(13-6*x^3+x^6),x);
integrate((x+2)/(x^2-4*x-1),x);
integrate(1/(1+(x+1)^(1/3)),x);
integrate(1/((a*x+b)*sqrt(x)),x);
integrate(x^3*sqrt(1+x^2),x);
integrate(x/sqrt(a^4-x^4),x);
integrate(1/(x*sqrt(x^2-a^2)),x);
integrate(1/(x*sqrt(a^2-x^2)),x);
integrate(1/(x*sqrt(x^2+a^2)),x);
integrate(1/sqrt(2+x-x^2),x);
integrate(1/sqrt(3*x^2-4*x+5),x);
integrate(1/sqrt(x-x^2),x);
integrate((2*x+1)/sqrt(2+x-x^2),x);
integrate(1/(x*sqrt(2+x-x^2)),x);
integrate(1/((x-2)*sqrt(2+x-x^2)),x);
integrate((2+3*sin(x))/(sin(x)*(1-cos(x))),x);
integrate(1/(2+3*cos(x)^2),x);
integrate((1-tan(x))/sin(2*x),x);
integrate((1+tan(x)^2)/(1-tan(x)^2),x);
integrate((a^2-4*cos(x)^2)^(3/4)*sin(2*x),x);
integrate(sin(2*x)/(a^2-4*sin(x)^2)^(1/3),x);
integrate(1/sqrt(a^(2*x)-1),x);
integrate(%w^(x/2)/sqrt(%w^x-1),x);
integrate(atan(x)^n/(1+x^2),x);
integrate(asin(x/a)^(3/2)/sqrt(a^2-x^2),x);
integrate(1/(acos(x)^3*sqrt(1-x^2)),x);
integrate(log(x)^2*x,x);
integrate(log(x)/x^5,x);
integrate(x^2*log((x-1)/x),x);
integrate(cos(x)^5,x);
integrate(sin(x)^2*cos(x)^4,x);
integrate(1/sin(x)^5,x);
integrate(sin(x)/%w^x,x);
integrate(%w^(2*x)*sin(3*x),x);
integrate(a^x*cos(x),x);
integrate(cos(log(x)),x);
integrate(sec(x)^2*log(cos(x)),x);
integrate(x*tan(x)^2,x);
integrate(asin(x)/x^2,x);
integrate(asin(x)^2,x);
integrate(x^2*atan(x)/(1+x^2),x);
integrate(acos(sqrt(x/(x+1))),x);

clicl...@freenet.de

unread,
Apr 24, 2013, 4:42:25 PM4/24/13
to

Richard Fateman schrieb:
>
> I'm not sure what the relevance is of DERIVE's performance, since the
> program is neither supported nor distributed at this time, but the
> syntax looked almost identical to Macsyma (commercial, not supported
> or distributed) so I tried to run it through Macsyma 2.4.0
>
> [...]
>
> 2. The results were the same with MAXIMA.
>
> RJF
>
> The test suite as used
>
> integrate(1/(a^2-b^2*x^2),x);
> integrate(1/(a^2+b^2*x^2),x);
> [...]

Some quick remarks on your converted suite: You have 85 entries. The
original (like Chapter 1 of the book) has 81 items where items 14 and 15
are vectors holding two integrals each, item 30 again holds two
integrals, and item 48 holds three integrals. This makes a total of 86
integrals.

Derive's #e seems to have been converted to %w (there is no %e in your
suite).

Detailed comments tomorrow (if feasible, else later).

Martin.

Peter Pein

unread,
Apr 25, 2013, 6:37:47 AM4/25/13
to
Am 22.04.2013 19:51, schrieb clicl...@freenet.de:
> The following table summarizes the performance data made available so
> far.
>
> ch. ex's Der. Fri. Mpl MMA etc. etc.
> 6.10 1.20 17 ...
> ----------------------------------------------
> 1 81 78 80 80 ??
> 2 90 - - - -
> 3 14 - - - -
> 4 132 - - - -
> 5 120 - - - -
> 6 26 - - - -
> 7 11 - - - -
> 8 59 - - - -
> --------------------------------------------
> 100% 96.3% 98.8% 98.8% ????%

Mathematica has issues with examples 50 and 55.

Integrate[x/Sqrt[a^4 - x^4], x] == ArcSin[x^2/a^2]/2

leads to

x*(-2/Sqrt[a^4 - x^4] + 2/(a^2*Sqrt[1 - x^4/a^4]))==0

which is true for real a.

And the result of #55 differs from the desired by an integration
constant Log[11]/(2*Sqrt[3]):

Integrate[1/Sqrt[5 - 4*x + 3*x^2], x]

yields

ArcSinh[(-2 + 3 x)/Sqrt[11]]/Sqrt[3]

Peter

P.S.:

entering
timofeev = ToExpression /@
Import["https://dl.dropboxusercontent.com/u/3030567/Mathematica/\
Timofeev_I_Mma.TXT", "Lines"]
into Mathematica gives you a table with all examples, which can be
evaluated via ReleaseHold.

Nasser M. Abbasi

unread,
Apr 25, 2013, 8:03:47 AM4/25/13
to
On 4/25/2013 5:37 AM, Peter Pein wrote:

> P.S.:
>
> entering
> timofeev = ToExpression /@
> Import["https://dl.dropboxusercontent.com/u/3030567/Mathematica/\
> Timofeev_I_Mma.TXT", "Lines"]
> into Mathematica gives you a table with all examples, which can be
> evaluated via ReleaseHold.
>

Nice Peter. Thanks for doing this.

After ReleaseHold, some expressions show 'True' right away, but some
do not, but remain as is. I assume one needs to try something more to
get True from these (if it is True)? Like may be Reduce or FullSimplify
or add assumptions? For example the first few show:

-------------------------------
{True},
{True},
{-(Log[Cos[a x] - Sin[a x]]/(2 a)) + Log[Cos[a x] + Sin[a x]]/(
2 a) == Log[(1 + Csc[2 a x])/(-1 + Csc[2 a x])]/(
4 a) == -(Log[Tan[\[Pi]/4 - a x]]/(2 a))
}
...
{True}
{True}
....
{Log[2 a^2 + b^2 - b^2 Cos[2 x]]/b^2 == Log[a^2 + b^2 Sin[x]^2]/b^2}
etc...
-------------------------------

--Nasser






--Nasser

Waldek Hebisch

unread,
Apr 25, 2013, 12:30:34 PM4/25/13
to
Note that as real functions asin(x/a) and atan(x/sqrt(a^2 - x^2)) are
defined on the same domain (that is for a > 0 interval [-a, a]) and
take the same values.

The same for acos((x/(x+1))^(1/2)) and atan((x/(x+1))^(1/2)*(x+1)^(1/2)).

FriCAS assumes that functions to integrate are real and ATM uniformly
performs such changes.

You of course may have your own opinion, but IME for complex
integration paths one usualy wants to choose version which
is analytic along the path (if possible). This usually
requires separate resoning.

Note that if you consider functions as defined in complex plane,
but having branch cuts, than antiderivatives are incorrect for
simple fact that discontinous functions have nontrivial
distributional part of derivative.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Richard Fateman

unread,
Apr 25, 2013, 12:33:55 PM4/25/13
to
On 4/24/2013 1:42 PM, clicl...@freenet.de wrote:
....
>> integrate(1/(a^2+b^2*x^2),x);
>> [...]
>
> Some quick remarks on your converted suite: You have 85 entries. The
> original (like Chapter 1 of the book) has 81 items where items 14 and 15
> are vectors holding two integrals each, item 30 again holds two
> integrals, and item 48 holds three integrals. This makes a total of 86
> integrals.
yes, I found that Macsyma was unhappy with vectors that looked like
[ integral(a,x)=b=c , integral(f,x) = g = h]
and so I just put
integral(a,x)
integral(f,x)
on separate lines.
>
> Derive's #e seems to have been converted to %w (there is no %e in your
> suite).
oops. the W key is right next to the E key. I re-edited. No change in
terms of integrability. Presumably a factor of log(w) was inserted
where needed.

If we replace the string "integrate" with the string "test" in the test
file

Then define something like

test(q,v):= is (SIMPLIFY( diff(integrate(q,v),v)-q) = 0);

I got 70 confirmations, 15 were not confirmed, where SIMPLIFY was
in Maxima, a selection of transformations like ratsimp, trigsimp, and
evaluation to 0.0 at x=1.234.

This does not measure whether the form of the integral was particularly
nice, or continuous, etc. Just that it has the property of being an
antiderivative. This can matter. e.g.
integrate(x^n,x) can be expressed as (x^(n+1))/ (n+1) or
as (x^(n+1) +1) / (n+1). The latter form has the nice property that
limit as n-> -1 goes to log(x). not Infinity. (uh, plus a constant..)

I have also not tested to see if a sequence of simplification operations
can do the necessary reductions, but numerical testing with a modest
tolerance seems to confirm them all.




RJF

Waldek Hebisch

unread,
Apr 25, 2013, 4:46:36 PM4/25/13
to
clicl...@freenet.de wrote:
>
> It has occured to me that Waldek should post the FriCAS results for the
> two cases he could not verify by differentiation. Perhaps they are
> correct, perhaps not. I doubt that results with mixed branches should be
> counted as successes: numerical evaluation would fail even on FriCAS, I
> suppose.
>

You can now see all FriCAS results at:

http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev

Note: this is version with bugfix, so result for
1/(x*(1+log(x/a))) is correct.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
Apr 26, 2013, 1:22:02 PM4/26/13
to

Richard Fateman schrieb:
>
> I'm not sure what the relevance is of DERIVE's performance, since the
> program is neither supported nor distributed at this time, but the
> syntax looked almost identical to Macsyma (commercial, not supported
> or distributed) so I tried to run it through Macsyma 2.4.0

Yes, this must be largely to my own satisfaction, although there should
be other Derive users around still (the situation for Macsyma may be
similar). Judging from the activity on their website, Reduce also seems
to have very few users even though it is officially supported. For the
community of Sympy users and developers, however, results from this test
suite should be of considerable interest (is anybody there listening?).
After all, a serious bug in FriCAS has already been uncovered and
repaired (for versions > 1.2.0) in this way.

>
> [...]
>
> 1. I found expressions in the test suite of the form
>
> integrate(A,x) = B = C
>
> which do not parse properly since B=C makes sense in Macsyma
> if B and C are algebraic. It does not make sense in Macsyma
> to ask (A=B) = C since A=B is logical not algebraic.
>
> That is almost beside the point though. What is the test suite
> supposed to be used for? Testing the simplification of B=C?
> Is either answer, B or C supposed to be OK for the integration?
> Is one supposed to verify the answer by differentiating B?

Derive simplifies A = B = C to A = B AND B = C (as does Mathematica, I
believe). So this notation is adequate if equality is assumed to hold
only up to (piecewise) constants - in other words, to hold only after
differentiation. Unfortunately, in Derive, an expression A = B = C
cannot be differentiated (it is not simplified beyond DIF(A = B AND B =
C, x)), although I see no reason why this should be forbidden (what
about Mathematica?).

>
> [...]
>
> Running through the examples, Macsyma paused in a number of places
> to ask (for example) is a*b pos or neg; is a nonzero; is x >0, is
> n+1 nonzero..
>
> So I added assumptions such as assume(a>0, b>0, x>0 n>0) and ran the
> test again.
>
> The test went through without any burps that I noticed except for
>
> integrate(asin(x/a)^(3/2)/sqrt(a^2-x^2),x)
> which was not integrated. This appears to be the same as the first
> clumsily restated expression in the original posting.

I suppose you are referring here to my entries for Timofeev's examples
47 and 64 (as taken from my current file):

INT(x/SQRT(a^4 - x^4), x) = 1/2*ATAN(x^2/SQRT(a^4 - x^4))
= 1/2*(a^2/SQRT(a^4 - x^4))*SQRT(1 - (x/a)^4)*ASIN((x/a)^2)

INT(ASIN(x/a)^(3/2)/SQRT(a^2 - x^2), x)
= 2/5*ASIN(x/a)^(3/2)*ATAN(x/SQRT(a^2 - x^2))
= 2/5*(a/SQRT(a^2 - x^2))*SQRT(1 - (x/a)^2)*ASIN(x/a)^(5/2)

I agree that much of this looks ugly compared to Timofeev's evaluations,
but such clumsiness often cannot be avoided if an evaluation is to pass
when the integration variable (as well as any parameters) are allowed to
be complex (assuming a framework of strictly single-valued complex
functions as implemented in Maple, Derive, and Mathematica, for
instance). Integrals in the suite have been handled as follows:

The integrands are without modification from Timofeev's book, apart from
occasional integrals whose accompanying evaluation implies a minor
misprint in the integrand, which are corrected. His evaluations, on the
other hand, are (barring oversights of mine) always modified to make
them hold on the complex domain where the original ones do not. They are
also modified if simpler forms could be found, or if the original ones
were seen to exhibit artificial discontinuities. In fact, I am trying to
establish that all antiderivatives in the book can be written such that
no unexpected discontinuities appear on the real axis (assuming real
parameters), while also remaining simple and "natural"-looking. In this,
I think, I have been successful so far. Where I saw no clear reason to
prefer one evaluation variant over another, both forms are given.

> [...]
>
> The test suite as used
>
> integrate(1/(a^2-b^2*x^2),x);
> integrate(1/(a^2+b^2*x^2),x);
> [...]

The integral you lost was not hard to hunt down: After your line 14,
which reads integrate(sin(2*x)/(b^2*sin(x)^2+a^2),x), insert
integrate(sin(2*x)/(b^2*sin(x)^2-a^2),x). Your suite will then have 86
lines, or 86 integrals.

Martin.

clicl...@freenet.de

unread,
Apr 26, 2013, 1:22:16 PM4/26/13
to

Peter Pein schrieb:
Hum, issues. :)

The problem with the integration of x/SQRT(a^4 - x^4) has been repaired
in my reposting of the chapter-1 integrals on April 21st, after it was
noticed by Axel. By now, the corresponding entry in my file reads:

INT(x/SQRT(a^4 - x^4), x) = 1/2*ATAN(x^2/SQRT(a^4 - x^4))
= 1/2*(a^2/SQRT(a^4 - x^4))*SQRT(1 - (x/a)^4)*ASIN((x/a)^2)

The first evaluation is what Derive 6.10 actually produces with x and a
declared complex. The second is in a sense closer to Timofeev's one.

The "issue" concerning the integral of 1/SQRT(5 - 4*x + 3*x^2) has been
been incorporated into my file right away:

INT(1/SQRT(3*x^2 - 4*x + 5), x) = 1/SQRT(3)*ASINH((3*x - 2)/SQRT(11))

Thanks! I had overlooked this possibility entirely!

Martin.

clicl...@freenet.de

unread,
Apr 26, 2013, 1:22:24 PM4/26/13
to

Waldek Hebisch schrieb:
>
> clicl...@freenet.de wrote:
> >
> > Waldek Hebisch schrieb:
Even when the integration variable and parameter 'a' are restricted to
the real axis, neither of these two antiderivatives can be verified by
differentiation, on FriCAS or elsewhere. But it is up to you to decide
if they are integrated 'correctly' within the framework of FriCAS, of
whose 'peculiarities' users should be made aware. They will happily be
accepted as correct if you count them as such. Nobody can deny that
FriCAS integrates them in some sense.

I think users specifying an integration path that traverses the complex
plane must be required to know what they are trying to do, making sure
that the actual branch cuts (if any) of their antiderivative are
compatible with their objective.

>
> Note that if you consider functions as defined in complex plane,
> but having branch cuts, than antiderivatives are incorrect for
> simple fact that discontinous functions have nontrivial
> distributional part of derivative.
>

I do not accept this: this is not what Maple, Derive, and Mathematica
are doing, and their approach is self-consistent as far as I can see.
All multivalued functions on the complex plane are restricted to one
Riemannian sheet by introducing branch cuts, in order to render them
single-valued. This allows for numerical evaluation consistent with a
symbolic computation. The functions also have values on the branch cuts,
which are taken to belong to one of the sheets (usually such that
counter-clockwise continuity around branch points is preserved).
Functional equations will be affected by the cuts made, and those
invalidated (like ln(z) = -ln(1/z)) cannot be used by the system.
Differentiation is done within the respective continuous sheet (the
steps introduced by the branch cuts therefore not giving rise to delta
peaks), and one stays entirely within the beautiful framework of complex
analysis. In particular, any function that differentiates back to a
given integrand is a valid antiderivative.

Martin.

Axel Vogt

unread,
Apr 26, 2013, 4:21:48 PM4/26/13
to
On 26.04.2013 19:22, clicl...@freenet.de wrote:
>
> Richard Fateman schrieb:
...
>> 1. I found expressions in the test suite of the form
>>
>> integrate(A,x) = B = C
>>
>> which do not parse properly since B=C makes sense in Macsyma
>> if B and C are algebraic. It does not make sense in Macsyma
>> to ask (A=B) = C since A=B is logical not algebraic.
>>
>> That is almost beside the point though. What is the test suite
>> supposed to be used for? Testing the simplification of B=C?
>> Is either answer, B or C supposed to be OK for the integration?
>> Is one supposed to verify the answer by differentiating B?
>
> Derive simplifies A = B = C to A = B AND B = C (as does Mathematica, I
> believe). So this notation is adequate if equality is assumed to hold
> only up to (piecewise) constants - in other words, to hold only after
> differentiation. Unfortunately, in Derive, an expression A = B = C
> cannot be differentiated (it is not simplified beyond DIF(A = B AND B =
> C, x)), although I see no reason why this should be forbidden (what
> about Mathematica?).

That does not work in Maple and to avoid coding I just picked one
(the first) and for the rest have the attitude, that is not about
integration, but simplification or similar.

Peter Pein

unread,
Apr 26, 2013, 4:46:06 PM4/26/13
to
I sent this to Nasser only by accident (clicking "Reply" instead of
"Reply Newsgroup"):
Hi Nasser,

if I tried to build a difference between Mma's result and the given one
and build the derivative w.r.t. x first, I guess #55 would not have been
'problematic'. If you're interested how I did the test:
https://dl.dropboxusercontent.com/u/3030567/Mathematica/Timofeev_I.nb
is the notebook I used. The imported textfile is the copied part from
Martin's first posting containing the examples. I'm really not proud of
the method used for conversion but it worked...

Peter


Peter Pein

unread,
Apr 26, 2013, 5:48:48 PM4/26/13
to
Am 26.04.2013 19:22, schrieb clicl...@freenet.de:
> Hum, issues. :)
>
> The problem with the integration of x/SQRT(a^4 - x^4) has been repaired
> in my reposting of the chapter-1 integrals on April 21st, after it was
> noticed by Axel. By now, the corresponding entry in my file reads:
>
> INT(x/SQRT(a^4 - x^4), x) = 1/2*ATAN(x^2/SQRT(a^4 - x^4))
> = 1/2*(a^2/SQRT(a^4 - x^4))*SQRT(1 - (x/a)^4)*ASIN((x/a)^2)
>
> The first evaluation is what Derive 6.10 actually produces with x and a
> declared complex. The second is in a sense closer to Timofeev's one.
>
> The "issue" concerning the integral of 1/SQRT(5 - 4*x + 3*x^2) has been
> been incorporated into my file right away:
>
> INT(1/SQRT(3*x^2 - 4*x + 5), x) = 1/SQRT(3)*ASINH((3*x - 2)/SQRT(11))
>
> Thanks! I had overlooked this possibility entirely!
>
> Martin.

I guess I should have put double quotes around the word issues in my
posting. Actually I think Mma should get 100% for this set of
integration tests.

Peter

P.S.: a real issue is the fact that Mma integrates
f[x_] = (1 - E)/(x - 1) + (E^((x + 1)/(x - 1)) - 1)/(x + 1);
for exactly one upper bound (z==-1) in:
intf[z_] = Integrate[f[x], {x, -Infinity, z}, Assumptions :> z < 1]
-->
ConditionalExpression[
EulerGamma + E EulerGamma + I Pi - E ExpIntegralEi[-1] -
ExpIntegralEi[1], z == -1]
Mma can do better but this is too off-topic for this thread :))

clicl...@freenet.de

unread,
Apr 26, 2013, 6:09:17 PM4/26/13
to

Peter Pein schrieb:
>
> I guess I should have put double quotes around the word issues in my
> posting. Actually I think Mma should get 100% for this set of
> integration tests.
>

I am waiting for Waldek's response, then I will update the table. I
expect that Mmma will have more trouble in Chapter IV.

Martin.

Richard Fateman

unread,
Apr 26, 2013, 6:45:18 PM4/26/13
to
It is perhaps worth noting that algorithms for antidifferentiation
which are based on differential algebra (e.g. Risch), and perhaps
much else (like typical calc books), do not deal with ANALYTIC
properties, except by coincidence.


clicl...@freenet.de

unread,
Apr 27, 2013, 1:58:00 PM4/27/13
to

Axel Vogt schrieb:
A very special sort of simplification: one that can add or subtract
piecewise constant functions in order to achieve its goal.

Martin.

clicl...@freenet.de

unread,
Apr 27, 2013, 1:58:12 PM4/27/13
to

Richard Fateman schrieb:
Even the people studying calculus books (and more so the users of Risch
integrators) would find life easier if their antiderivatives held on the
entire real line (or on the entire complex plane, as the case may be)
and could be verified by differentiation (if not in the given CAS, then
at least, in principle, on paper). No other "analytic" property is
required of them.

Martin.

Waldek Hebisch

unread,
Apr 27, 2013, 1:57:12 PM4/27/13
to
A little correction: equivalence of asin(x/a) and atan(x/sqrt(a^2 - x^2)
requires a > 0.

Concerning correctness: I consider such results as suboptimal,
but correct. Suboptimal, because normally FriCAS tries to
express result in terms of functions in the user input.
In this case FriCAS used different functions without real
need.

BTW: Core integrator normally only deals with algebraics,
exponential and logarithms, sometimes with tangent (when
the integrand is a rational function of integration variable
and a single tangent). What users see is the result of
a postprocessor. I will probably modify postprocessor
to restore asin-s and acos-es.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Richard Fateman

unread,
Apr 27, 2013, 2:27:14 PM4/27/13
to
That's pretty much analytic, in my book. Reference to the real line.

While you may prefer expressions that are continuous etc, that does not
fall out automatically from Risch algorithm etc. The problem has been
studied though, eg. by Rioboo.

The other problem, of testing for two expressions being identical
is obviously reducible to testing if their difference is zero, which
is known to be (in the general case) undecidable. A useful heuristic
is to pick random numbers(s) for x, etc. If the result is not zero,
maybe the expression is not identically zero.

For certain classes of expressions (rational functions in particular)
the problem is solvable, but introducing log, I, Pi, sqrt, may be enough
to break it. (results of Daniel Richardson).

CAS users (and sometimes texts!) casually introduce expressions
involving square root into problems without specifying WHICH
square root, or even recognizing that there is an issue.

But then then when they get some answer they insist that the
answer is written in terms of the WRONG square root. (Well, that
is an oversimplification, but you should get the idea..)

RJF


clicl...@freenet.de

unread,
Apr 28, 2013, 12:14:48 PM4/28/13
to

Waldek Hebisch schrieb:
>
> BTW: Core integrator normally only deals with algebraics,
> exponential and logarithms, sometimes with tangent (when
> the integrand is a rational function of integration variable
> and a single tangent). What users see is the result of
> a postprocessor. I will probably modify postprocessor
> to restore asin-s and acos-es.
>

I suspect this would not help in all situations: it would not convert
the FriCAS term SQRT(x/(x+1))*SQRT(x+1) in example 81 back to my (it is
not Derive's) term (x+1)*SQRT(1/(x+1))*SQRT(x/(x+1)), or would it?

Since the ASIN's in an integrand get improperly converted to (or are
improperly interpreted as) ATAN's (perhaps the rational derivative of
the latter is preferred) you might consider forestalling this branch-cut
violating act by preprocessing them like this:

ASIN(z) <- 2*ATAN(z/(1+SQRT(1-z^2)))

This is a relation from the Wolfram functions site that holds for
arbitrary complex z (assuming the MMA choices of branch cuts). It is
also valid in Derive.

Martin.

clicl...@freenet.de

unread,
Apr 28, 2013, 12:15:00 PM4/28/13
to

The following table summarizes the performance data made available so
far. To simplify the accounting, the number of examples in a chapter has
been changed from Timofeev's number of entries to the actual number of
distinct integrands, as far as they are known already.

ch. ex's Der. Fri. Mpl MMA etc. etc.
6.10 1.20 17 9.xx
----------------------------------------------
1 86 83 85 85 86
2 90 - - - -
3 12 - - - -
4 132 - - - -
5 120 - - - -
6 26 - - - -
7 11 - - - -
8 109 - - - -
9 59 - - - -
--------------------------------------------
100% 96.5% 98.8% 98.8% 100%

Accordingly, the Winner so far is .............. Mathematica!

An overlooked chapter 8 has been included here. Not knowing how to
interpret his results for only 85 of the 86 integrals in chapter 1, I am
leaving the addition of Maxima to Richard Fateman. And Sympy has to
overcome her shyness first.

Martin.

Waldek Hebisch

unread,
Apr 28, 2013, 4:51:04 PM4/28/13
to
clicl...@freenet.de wrote:
>
> Waldek Hebisch schrieb:
> >
> > BTW: Core integrator normally only deals with algebraics,
> > exponential and logarithms, sometimes with tangent (when
> > the integrand is a rational function of integration variable
> > and a single tangent). What users see is the result of
> > a postprocessor. I will probably modify postprocessor
> > to restore asin-s and acos-es.
> >
>
> I suspect this would not help in all situations: it would not convert
> the FriCAS term SQRT(x/(x+1))*SQRT(x+1) in example 81 back to my (it is
> not Derive's) term (x+1)*SQRT(1/(x+1))*SQRT(x/(x+1)), or would it?

Of course asin-s and acos-es are separate from roots. However,
'sqrt(1/(x+1))' is indirectly part of user input (as part
of derivative of 'asin') so restoring user expressions involves
using 'sqrt(1/(x+1))' too.

> Since the ASIN's in an integrand get improperly converted to (or are
> improperly interpreted as) ATAN's (perhaps the rational derivative of
> the latter is preferred) you might consider forestalling this branch-cut
> violating act by preprocessing them like this:
>
> ASIN(z) <- 2*ATAN(z/(1+SQRT(1-z^2)))
>
> This is a relation from the Wolfram functions site that holds for
> arbitrary complex z (assuming the MMA choices of branch cuts). It is
> also valid in Derive.

This formula may have advantages, thanks. However, most complex
processing happens in Risch algorithm, so I need to look at
what consequence it has for Risch. As I wrote atans get
converted to logs anyway. For logs the factor of two before
formula means that we are effectively taking log of a square
root. If that root can be obtained for free, then it is great.
But if some root which otherwise would get squared survives,
then it means much harder job for Risch. So it may be
better to restore asins and acoses from logs, than to
use different transformation to atans and restore atans.


--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
May 4, 2013, 4:11:43 PM5/4/13
to

Waldek Hebisch schrieb:
Such a restoration should be able to correct many antiderivatives, but I
also fear that it may be no more than a kludge which can be fooled. Do
you consider this a general solution to problem of branch-cut memory
loss in the FriCAS integrator?

Martin.

PS: With respect to your results at

<http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev>,

I think that (#e^(x/2))^2 in the antiderivative for Timofeev's example
62 should be automatically simplified to #e^x.

Waldek Hebisch

unread,
May 4, 2013, 10:54:16 PM5/4/13
to
If there are no dependent roots, then this is "optimal" solution:
no other method can do better. If there are dependent roots
(like 'sqrt(x)*sqrt(y) - sqrt(x*y)'), then current FriCAS code
indeed is a kludge that easily can be fooled. The reason is
that dependent roots are forbiden in Risch algorithm.
If you want to preserve all posible branchings with dependent roots
then one could use method given (IIRC) by A.D. Rich: redo
integration for all possible combinations of signs of roots
and combine results. One can get ugly but "branch correct"
result in that way. Or one can assume some branch relations
and get much simpler results. In either case some users
will complain...

> Martin.
>
> PS: With respect to your results at
>
> <http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev>,
>
> I think that (#e^(x/2))^2 in the antiderivative for Timofeev's example
> 62 should be automatically simplified to #e^x.

Well, to apply Risch FriCAS have to replace exp(x) by exp(x/2).
Namely. FriCAS integrator depends on having correct transcendence
basis for the function field build from integrand. If exp(x/2) is
part of such basis, than exp(x) is can not be.

In principle FriCAS could restore exp(x) as part of
postprocessiong, however, from algebaric point of view
current result is simpler (it contains only one
transcendental, namely 'exp(x/2)'), while what you
propose contains two transcendentals, that is
'exp(x/2)' and 'exp(x)'.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Richard Fateman

unread,
May 5, 2013, 12:19:53 PM5/5/13
to
On 5/4/2013 7:54 PM, Waldek Hebisch wrote:

>
> In principle FriCAS could restore exp(x) as part of
> postprocessiong, however, from algebaric point of view
> current result is simpler (it contains only one
> transcendental, namely 'exp(x/2)'), while what you
> propose contains two transcendentals, that is
> 'exp(x/2)' and 'exp(x)'.
>
>

There is no branch issue with exp(x) and exp(x/2), and
so it is probably preferable from a usability standpoint to
convert (exp(x/2))^2 to exp(x). (etc)

Furthermore, if ALL the exp(x/2) appear to even powers, it
is almost compulsory to convert them to powers of exp(x) in
any consistent view of simplification.

This is not the case for sqrt or log where sqrt(x)*sqrt(y) - sqrt(x*y)
is simply ambiguous. Anyone who attempts to disambiguate this
is necessarily making a choice that may or may not be the same
as the secret choice made by some user. Macsyma/Maxima's
radcan program makes a choice in a certain well-defined way, ( zero
for the example above) but that is not the only possible value.

It is probably inevitable that users will continue to come to
computer algebra systems with their own naive belief that what
they have in their mind as the right interpretation (or usually
their ONLY interpretation) of branch cuts etc must be followed
by the computer system, regardless of the mathematical ambiguities
involved in computation. One way around this is to go the route
of expressing results as "RootOf". Another is to explicitly display the
multiplicity of possible results in some other way, as you suggest.
Either has the potential to be ugly.

Fortunately, explicit display of indefinite integrals of complicated
functions occupies an almost vacant area of interest to anyone other
than pure mathematicians following the route from Liouville through
Risch to the present. Scientific computing had a passing interest
in the issue of iterated integrals in the evaluation of Feynman diagrams
and maybe that still exists in some corners of physicists' computation.
But I suspect that this discussion is mostly it is a
mathematical/computational curiosity for the likes of us.

RJF

clicl...@freenet.de

unread,
May 5, 2013, 12:29:54 PM5/5/13
to

Waldek Hebisch schrieb:
>
> clicl...@freenet.de wrote:
> >
> > Such a restoration should be able to correct many antiderivatives, but I
> > also fear that it may be no more than a kludge which can be fooled. Do
> > you consider this a general solution to problem of branch-cut memory
> > loss in the FriCAS integrator?
>
> If there are no dependent roots, then this is "optimal" solution:
> no other method can do better. If there are dependent roots
> (like 'sqrt(x)*sqrt(y) - sqrt(x*y)'), then current FriCAS code
> indeed is a kludge that easily can be fooled. The reason is
> that dependent roots are forbiden in Risch algorithm.
> If you want to preserve all posible branchings with dependent roots
> then one could use method given (IIRC) by A.D. Rich: redo
> integration for all possible combinations of signs of roots
> and combine results. One can get ugly but "branch correct"
> result in that way. Or one can assume some branch relations
> and get much simpler results. In either case some users
> will complain...
>

Very probably. Those dissatisfied should be told something like "If you
want to get the results from the book you have to tell FriCAS about the
assumptions made in the book". I am supposing here that FriCAS would
then be able to simplify the ugly-but-branch-cut-correct expressions.

In my view, unconditional correctness of results takes precedence; users
just cannot be expected to check that no integral that may have been
evaluated incorrectly has occured in the course of a long calculation
involving Megabyte-sized expressions.

> >
> > PS: With respect to your results at
> >
> > <http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev>,
> >
> > I think that (#e^(x/2))^2 in the antiderivative for Timofeev's example
> > 62 should be automatically simplified to #e^x.
>
> [...]
>
> In principle FriCAS could restore exp(x) as part of
> postprocessiong, however, from algebaric point of view
> current result is simpler (it contains only one
> transcendental, namely 'exp(x/2)'), while what you
> propose contains two transcendentals, that is
> 'exp(x/2)' and 'exp(x)'.
>

Hmm. I was assuming FriCAS results are to be read by humans ... :p

Martin.

Waldek Hebisch

unread,
May 5, 2013, 9:51:15 PM5/5/13
to
Richard Fateman <fat...@cs.berkeley.edu> wrote:
> On 5/4/2013 7:54 PM, Waldek Hebisch wrote:
>
> >
> > In principle FriCAS could restore exp(x) as part of
> > postprocessiong, however, from algebaric point of view
> > current result is simpler (it contains only one
> > transcendental, namely 'exp(x/2)'), while what you
> > propose contains two transcendentals, that is
> > 'exp(x/2)' and 'exp(x)'.
> >
> >
>
> There is no branch issue with exp(x) and exp(x/2), and
> so it is probably preferable from a usability standpoint to
> convert (exp(x/2))^2 to exp(x). (etc)
>
> Furthermore, if ALL the exp(x/2) appear to even powers, it
> is almost compulsory to convert them to powers of exp(x) in
> any consistent view of simplification.

FriCAS 'simplify' is doing that. But too eager transformations
can backfire: what if user _wants_ to have 'exp(x/2)'?
At least in FriCAS user may have good reasons for that.

--
Waldek Hebisch
heb...@math.uni.wroc.pl

Waldek Hebisch

unread,
May 5, 2013, 10:45:31 PM5/5/13
to
"unconditional correctness" when the user is the judge is impossible,
some users like you consider disregarding branches as incorrect.
Other user consider as incorrect nonzero result for traditional
equalities.
> > >
> > > PS: With respect to your results at
> > >
> > > <http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev>,
> > >
> > > I think that (#e^(x/2))^2 in the antiderivative for Timofeev's example
> > > 62 should be automatically simplified to #e^x.
> >
> > [...]
> >
> > In principle FriCAS could restore exp(x) as part of
> > postprocessiong, however, from algebaric point of view
> > current result is simpler (it contains only one
> > transcendental, namely 'exp(x/2)'), while what you
> > propose contains two transcendentals, that is
> > 'exp(x/2)' and 'exp(x)'.
> >
>
> Hmm. I was assuming FriCAS results are to be read by humans ... :p

Be consistent. You wrote about big expressions. To understand
structure of such expressions it is crucial to look at
ingredients. FriCAS tower operation allows you to
see building parts. Current FriCAS result gives:

(10) -> ii := integrate(%e^(x/2)/sqrt(%e^x-1),x)

+----------+
| x 2 x
| - -
| 2 2
(10) - 2log(\|(%e ) - 1 - %e )
Type: Union(Expression(Integer),...)
(11) -> tower(ii)

+----------+ +----------+
x | x 2 | x 2 x
- | - | - -
2 | 2 | 2 2
(11) [x,%e ,\|(%e ) - 1 ,log(\|(%e ) - 1 - %e )]
Type: List(Kernel(Expression(Integer)))

(12) -> simplify(ii)

x
+-------+ -
| x 2
(12) - 2log(\|%e - 1 - %e )
Type: Expression(Integer)
(13) -> tower(simplify(ii))

x x
- +-------+ +-------+ -
2 x | x | x 2
(13) [x,%e ,%e ,\|%e - 1 ,log(\|%e - 1 - %e )]
Type: List(Kernel(Expression(Integer)))


"simplified" result is more complicated, it contains one kernel
which is redundant.

And reading is just one use. IMHO computer algebra can help
when one needs to develop or check some nontrivial formulas.
For example, when implementing elliptic functions in FriCAS
I had to check and derive several formulas. Those were
equalities on Riemanian surfaces, where the simplest
approach was first to ignore most problems with branches
(in other words consider formulas as valid in some tiny
neighborhood of a single point). For numerical evaluation
of elliptic functions I had to check if branch cuts of
standard functions lead to correct result -- it turned
out that in one case taking wrong branch of square
root could lead to completelu wrong result, I had to
add special code to compute branch that was needed
instead of standard branch (in practice I compute
standard sqrt and flip sign it it gives wrong branch).
That gave sensible result for elliptic integrals, but
with crazy branch cut along a curve. To get more sensible
branch cut along line one had to add more code.

The point of the above is that I had to do sizable
calculations for which I would have no patience to
do by hand. Core reasoning with branches was
rather easy, but both workarounds required checking
inequalities which in turn required more calculations.
CAS is very helpful in calculations, but I do not
expect it to automatically invent (and prove!) needed
inequalities. Without such inequalities all what
CAS could do with branches would be to produce
messy results with various "piecewise constant"
factors which I would have to remove by hand.


--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
May 6, 2013, 1:14:03 PM5/6/13
to
> And reading is just one use. [...]

I don't see where I was inconsistent, but you didn't say that the test
results on your site were not optimized for human eyes, as they were not
simplified. There is simply no issue if FriCAS simplification repairs
the (#e^(x/2))^2 "defect".

Martin.

clicl...@freenet.de

unread,
Jun 30, 2013, 12:07:52 PM6/30/13
to

The following table summarizes the performance data made available for
the example integrals in Timofeev's 1948 book:

<http://www.math-life.com/jdownloads/view.download/27/279.html>

To simplify the accounting, the numbers of examples represent the actual
numbers of distinct integrands; for chapters where this has not yet been
determined, the total of Timofeev's numbered examples is given instead:

ch. ex's Der. Fri. Mpl MMA etc. etc.
6.10 1.20 17 9.xx
-----------------------------------------------
1 86 83 85 85 86
2 90 - - - -
3 12 12 ? ? ?
4 132 - - - -
5 120 - - - -
6 26 - - - -
7 11 9 ? 11 ?
8 109 - - - -
9 59 - - - -
-----------------------------------------------
100% 95.4% ? % ? % ? %

Recent results from the threads "integration test suite / Chap 3" and
"integration test suite / Chap 7" have been added here:

<http://mathforum.org/kb/thread.jspa?threadID=2449908>
<http://mathforum.org/kb/thread.jspa?threadID=2449867>

However, a Winner cannot be determined at present because of the uneven
distribution of results reflected in the "?" entries.

Rubi is of course violently invited to test its strengths on the
Timofeev integrals too.

Martin.

Axel Vogt

unread,
Jun 30, 2013, 4:17:31 PM6/30/13
to
On 30.06.2013 18:07, clicl...@freenet.de wrote:
>
> The following table summarizes the performance data made available for
> the example integrals in Timofeev's 1948 book:
>
> <http://www.math-life.com/jdownloads/view.download/27/279.html>
>
> To simplify the accounting, the numbers of examples represent the actual
> numbers of distinct integrands; for chapters where this has not yet been
> determined, the total of Timofeev's numbered examples is given instead:
>
> ch. ex's Der. Fri. Mpl MMA etc. etc.
> 6.10 1.20 17 9.xx
> -----------------------------------------------
> 1 86 83 85 85 86
> 2 90 - - - -
> 3 12 12 ? ? ?
> 4 132 - - - -
> 5 120 - - - -
> 6 26 - - - -
> 7 11 9 ? 11 ?
> 8 109 - - - -
> 9 59 - - - -
> -----------------------------------------------
> 100% 95.4% ? % ? % ? %
>
...

Would you mind to give the Derive input code for Chapter 3 again?
Sorry, I am a bit lost in the lengthy thread.

clicl...@freenet.de

unread,
Jul 1, 2013, 2:12:58 PM7/1/13
to

Axel Vogt schrieb:
Just in case, below are the Derive versions of the example integrals
from both chapter 3 and chapter 7.

Martin.


" Timofeev (1948) Ch. 3, examples 1 - 3 (p. 101) ... "

INT(1/((x-2)^3*(x+1)^2),x)=(2*x^2-5*x-1)/(18*(x+1)*(x-2)^2)+1/27~
*LN((x-2)/(x+1))

INT(1/((x+2)^3*(x+3)^4),x)=(60*x^4+630*x^3+2450*x^2+4175*x+2627)~
/(6*(x+2)^2*(x+3)^3)+10*LN((x+2)/(x+3))

INT(x^5/(3+x)^2,x)=1/4*x^4-2*x^3+27/2*x^2-108*x+243/(x+3)+405*LN~
(x+3)

" Timofeev (1948) Ch. 3, examples 4 - 9 (p. 105) ... "

[]

[]

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

INT((2*x-3)/(3+6*x+2*x^2)^3,x)=-(8*x^3+36*x^2+44*x+13)/(4*(2*x^2~
+6*x+3)^2)+1/SQRT(3)*ATANH((3+2*x)/SQRT(3))

INT((x-1)/(x^2+5*x+4)^2,x)=(7*x+13)/(9*(x^2+5*x+4))+7/27*LN((x+1~
)/(x+4))

INT(1/(x^2+3*x+2)^5,x)=(2*x+3)/(4*(x^2+3*x+2)^4)*(-1+14/3*(x^2+3~
*x+2)-70/3*(x^2+3*x+2)^2+140*(x^2+3*x+2)^3)+70*LN((x+1)/(x+2))

" Timofeev (1948) Ch. 3, examples 10 - 12 (p. 109) ... "

INT(1/(x^3*(7-6*x+2*x^2)^2),x)=-1/(98*x^2)-12/(343*x)+2*(41-9*x)~
/(1715*(7-6*x+2*x^2))+80/2401*LN(x)-40/2401*LN(7-6*x+2*x^2)+234*~
SQRT(5)/60025*ATAN((2*x-3)/SQRT(5))

INT(x^9/(x^2+3*x+2)^5,x)=-(25*x^8+35292*x^7+369950*x^6+1632276*x~
^5+3919731*x^4+5527800*x^3+4578216*x^2+2063520*x+390960)/(24*(x^~
2+3*x+2)^4)+1472*LN(x+2)-1471*LN(x+1)

INT((1+2*x)^2/(3+5*x+2*x^2)^5,x)=-(11+10*x)/(4*(2*x^2+5*x+3)^4)+~
31*(5+4*x)/(6*(2*x^2+5*x+3)^3)*(1-10*(2*x^2+5*x+3)+120*(2*x^2+5*~
x+3)^2)+2480*LN((x+1)/(2*x+3))

" Timofeev (1948) Ch. 3, examples 13 - 14 (p. 113) ... "

INT((a-b*x^2)^3/x^7,x)=-a^3/(6*x^6)+3*a^2*b/(4*x^4)-3*a*b^2/(2*x~
^2)-b^3*LN(x)

INT(x^13/(a^4+x^4)^5,x)=x^2*(15*x^12-73*a^4*x^8-55*a^8*x^4-15*a^~
12)/(768*a^4*(x^4+a^4)^4)+5/(256*a^6)*ATAN(x^2/a^2)

" ... end of Timofeev Ch. 3 "

" Timofeev (1948) Ch. 7, examples 1 - 4 (p. 334) ... "

INT(x^2*COS(x)^5,x)=1/200*x*COS(5*x)+(1/80*x^2-1/1000)*SIN(5*x)+~
5/72*x*COS(3*x)+(5/48*x^2-5/216)*SIN(3*x)+5/4*x*COS(x)+(5/8*x^2-~
5/4)*SIN(x)

INT(x^3*SIN(x)^3,x)=1/12*(x^3-2/3*x)*COS(3*x)-1/12*(x^2-2/9)*SIN~
(3*x)-3/4*(x^3-6*x)*COS(x)+9/4*(x^2-2)*SIN(x)

INT(x^2*SIN(x)^6,x)=5/48*x^3-1/192*(x^2-1/18)*SIN(6*x)-1/576*x*C~
OS(6*x)+3/64*(x^2-1/8)*SIN(4*x)+3/128*x*COS(4*x)-15/64*(x^2-1/2)~
*SIN(2*x)-15/64*x*COS(2*x)

INT(x^2*SIN(x)^2*COS(x),x)=1/3*x^2*SIN(x)^3-1/18*x*COS(3*x)+1/54~
*SIN(3*x)+1/2*x*COS(x)-1/2*SIN(x)

" Timofeev (1948) Ch. 7, examples 5 - 9 (p. 342-343) ... "

INT(x*COS(x)^4/SIN(x)^2,x)=-x*COS(x)*(1/2*SIN(x)+1/SIN(x))+1/4*S~
IN(x)^2+LN(SIN(x))-3/4*x^2

INT(x*SIN(x)^3/COS(x)^4,x)=x*(1/(3*COS(x)^3)-1/COS(x))-SIN(x)/(6~
*COS(x)^2)+5/6*ATANH(SIN(x))

INT(x*SIN(x)/COS(x)^3,x)=x/(2*COS(x)^2)-1/2*TAN(x)

INT(x*SIN(x)^3/COS(x),x)=1/4*x*COS(2*x)-1/8*SIN(2*x)+INT(x*TAN(x~
),x)

INT(x*SIN(x)^3/COS(x)^3,x)=x/(2*COS(x)^2)-1/2*TAN(x)-INT(x*TAN(x~
),x)

" Timofeev (1948) Ch. 7, examples 10 - 11 (p. 344) ... "

INT((2*x+SIN(2*x))/(x*SIN(x)+COS(x))^2,x)=-2*COS(x)/(x*SIN(x)+CO~
S(x))

INT((x/(x*COS(x)-SIN(x)))^2,x)=(x*SIN(x)+COS(x))/(x*COS(x)-SIN(x~
))

" ... end of Timofeev Ch. 7 "

Axel Vogt

unread,
Jul 1, 2013, 3:10:09 PM7/1/13
to
On 01.07.2013 20:12, clicl...@freenet.de wrote:
>
> Axel Vogt schrieb:
>>
..
>>>
>>> ch. ex's Der. Fri. Mpl MMA etc. etc.
>>> 6.10 1.20 17 9.xx
>>> -----------------------------------------------
>>> 3 12 12 ? ? ?
>>> -----------------------------------------------
...
>> Would you mind to give the Derive input code for Chapter 3 again?
>> Sorry, I am a bit lost in the lengthy thread.
>
> Just in case, below are the Derive versions of the example integrals
> from both chapter 3 and chapter 7.
>
> Martin.
...

For Chap 3 Maple 17 finds solutions for all of the 12 tasks.

I only checked correctness by differentiation (and not for
continuity or 'simplicity').

Waldek Hebisch

unread,
Jul 1, 2013, 8:34:01 PM7/1/13
to
FriCAS can do all 12 examples from chapter 3 and 9 elementary
examples from chapter 7. The two nonelementary ones (numner 8
and 9) can be done using 'complexIntegrate' or if you
complicate them a bit (for example add 'exp(x)' to the
integral), but return unevaliated as-is.

BTW1: FriCAS is now at 1.2.1

BTW2: FriCAS answers are at:

http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev37

RTW2: If you want "winner", then examples are not challenging enough
(in particular 12 rational examples).

--
Waldek Hebisch
heb...@math.uni.wroc.pl

clicl...@freenet.de

unread,
Jul 2, 2013, 6:02:45 PM7/2/13
to

Waldek Hebisch schrieb:
>
> FriCAS can do all 12 examples from chapter 3 and 9 elementary
> examples from chapter 7. The two nonelementary ones (numner 8
> and 9) can be done using 'complexIntegrate' or if you
> complicate them a bit (for example add 'exp(x)' to the
> integral), but return unevaliated as-is.
>
> BTW1: FriCAS is now at 1.2.1
>
> BTW2: FriCAS answers are at:
>
> http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev37
>
> RTW2: If you want "winner", then examples are not challenging enough
> (in particular 12 rational examples).
>

Yes, I didn't really expect FriCAS to fail for one of these rational
integrands. Still it is nice to see there are no more surprises like the
failure of version 1.2.0 on Timofeev's example 21 from Chapter 1:
INT(1/(x*LN(x/a)+x)), x). The two non-elementary problems from Chapter 7
must be counted as "done" anyway; FriCAS 1.2.1 then succeeds (neglecting
the occasional branch-cut memory loss) on all problems from Chapters 1,
3, and 7, it appears.

Similarly I do not expect the problems from Chapter 2 (rational
integrands) to cause problems for Maple and Mathematica. More
interesting should be Chapter 5 (trigonometric integrands), Chapter 8
(exponential and hyperbolic integrands), and Chapter 9 (inverse
trigonometric integrands) - not to mention Chapter 4 (algebraic
integrands), which I am in the process of typing in.

So only Mathematica's performance on the problems from Chapters 3 and 7
remains unknown now.

Martin.

clicl...@freenet.de

unread,
Jul 2, 2013, 6:04:39 PM7/2/13
to

Waldek Hebisch schrieb:
>
> FriCAS can do all 12 examples from chapter 3 and 9 elementary
> examples from chapter 7. The two nonelementary ones (numner 8
> and 9) can be done using 'complexIntegrate' or if you
> complicate them a bit (for example add 'exp(x)' to the
> integral), but return unevaliated as-is.
>
> BTW1: FriCAS is now at 1.2.1
>
> BTW2: FriCAS answers are at:
>
> http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev37
>
> RTW2: If you want "winner", then examples are not challenging enough
> (in particular 12 rational examples).
>

clicl...@freenet.de

unread,
Jul 2, 2013, 6:05:19 PM7/2/13
to

Waldek Hebisch schrieb:
>
> FriCAS can do all 12 examples from chapter 3 and 9 elementary
> examples from chapter 7. The two nonelementary ones (numner 8
> and 9) can be done using 'complexIntegrate' or if you
> complicate them a bit (for example add 'exp(x)' to the
> integral), but return unevaliated as-is.
>
> BTW1: FriCAS is now at 1.2.1
>
> BTW2: FriCAS answers are at:
>
> http://axiom-wiki.newsynthesis.org/SandboxFriCASTimofeev37
>
> RTW2: If you want "winner", then examples are not challenging enough
> (in particular 12 rational examples).
>

Nasser M. Abbasi

unread,
Jul 2, 2013, 9:08:32 PM7/2/13
to

> So only Mathematica's performance on the problems from Chapters 3 and 7
> remains unknown now.
>
> Martin.
>

This is result of M version 9.01. There is notebook, html and pdf.

I hope I copied everything and converted it to Mathematica syntax ok
from your last post.

http://12000.org/my_notes/timofeev_integrals/index.htm

6 results had difference, but these differences were all constants.

Only for one integral did Mathematica give a result which was a
function of x, here it is, it was chapter 7, example 6

--------------------------------
INT(x*SIN(x)^3/COS(x)^4,x)=x*(1/(3*COS(x)^3)-1/COS(x))-SIN(x)/(6~
*COS(x)^2)+5/6*ATANH(SIN(x))
---------------------------------

------- Mathematica -----------------
itegrand = x*Sin[x]^3/Cos[x]^4;
mma = Integrate[itegrand, x];
book = x*(1/(3*Cos[x]^3) - 1/Cos[x]) - Sin[x]/(6*Cos[x]^2) +
5/6*ArcTanh[Sin[x]];
FullSimplify[mma - book]
--------------------------------

-(5/6) (ArcTanh[Sin[x]]+Log[Cos[x/2]-Sin[x/2]]-Log[Cos[x/2]+Sin[x/2]])

--Nasser

Nasser M. Abbasi

unread,
Jul 2, 2013, 10:33:57 PM7/2/13
to
On 6/30/2013 11:07 AM, clicl...@freenet.de wrote:

> Rubi is of course violently invited to test its strengths on the
> Timofeev integrals too.
>
> Martin.

Added Rubi4 results also.
(just changed Integrate to Int after loading Rubi4 package).

5 integrals did not simplify to zero when compared
to the book result. May be Mathematica just could not analytically
simplify the difference to zero. I do not know. These were not
constant differerence but a function of x.

Two integrals were not done by Rubi (10 and 11 from chapter 7).

Results are posted here

http://12000.org/my_notes/timofeev_integrals/index.htm

--Nasser



clicl...@freenet.de

unread,
Jul 4, 2013, 12:49:18 PM7/4/13
to

"Nasser M. Abbasi" schrieb:
>
> This is result of M version 9.01. There is notebook, html and pdf.
>
> I hope I copied everything and converted it to Mathematica syntax ok
> from your last post.
>
> http://12000.org/my_notes/timofeev_integrals/index.htm
>
> 6 results had difference, but these differences were all constants.
>
> Only for one integral did Mathematica give a result which was a
> function of x, here it is, it was chapter 7, example 6
>
> --------------------------------
> INT(x*SIN(x)^3/COS(x)^4,x)=x*(1/(3*COS(x)^3)-1/COS(x))-SIN(x)/(6~
> *COS(x)^2)+5/6*ATANH(SIN(x))
> ---------------------------------
>
> ------- Mathematica -----------------
> itegrand = x*Sin[x]^3/Cos[x]^4;
> mma = Integrate[itegrand, x];
> book = x*(1/(3*Cos[x]^3) - 1/Cos[x]) - Sin[x]/(6*Cos[x]^2) +
> 5/6*ArcTanh[Sin[x]];
> FullSimplify[mma - book]
> --------------------------------
>
> -(5/6) (ArcTanh[Sin[x]]+Log[Cos[x/2]-Sin[x/2]]-Log[Cos[x/2]+Sin[x/2]])
>

This is piecewise constant, periodic along the real axis. It jumps where
the antiderivative has poles on the real axis, at x = -3/2*pi, -1/2*pi,
1/2*pi, 3/2*pi, etc. So nothing to complain about.

Martin.

clicl...@freenet.de

unread,
Jul 4, 2013, 12:49:32 PM7/4/13
to

"Nasser M. Abbasi" schrieb:
>
> Added Rubi4 results also.
> (just changed Integrate to Int after loading Rubi4 package).
>
> 5 integrals did not simplify to zero when compared
> to the book result. May be Mathematica just could not analytically
> simplify the difference to zero. I do not know. These were not
> constant differerence but a function of x.
>
> Two integrals were not done by Rubi (10 and 11 from chapter 7).
>
> Results are posted here
>
> http://12000.org/my_notes/timofeev_integrals/index.htm
>

The five integrals for which Rubi's evaluation does not simply differ
from the 'model' result by a constant (including zero) are numbers 1, 6,
9, and 12 from Chapter 3, and number 6 from Chapter 7. The differences
found in Chapter 3 are just piecewise constants that jump at poles of
the antiderivatives - this is entirely acceptable. However, it looks
like example 6 from Chapter 7 is left unevaluated by Rubi. Am I right?

I am not much surprised by Rubi's failure on numbers 10 and 11 from
Chapter 7; Derive 6.10 cannot do them either. It may be acceptable to do
nothing about this, I think.

Martin.

PS: Note that the 'model' results in my Derive files may not always be
identical (or equal or equivalent) to the results given in Timofeev's
book. In some cases, the integrands and/or results had to be corrected
for misprints or mistakes. I may also have 'continuitized' some of the
evaluations (effectively adding piecewise constants to make them
continuous on the real axis).

Nasser M. Abbasi

unread,
Jul 4, 2013, 1:16:39 PM7/4/13
to
On 7/4/2013 11:49 AM, clicl...@freenet.de wrote:

>However, it looks
> like example 6 from Chapter 7 is left unevaluated by Rubi. Am I right?
>

Good point. Yes, Rubi 4.1 did fully evaluate it, there was an "Int"
in the result, second term.

http://www.12000.org/my_notes/timofeev_integrals/rubi4/timofeev_rubi4.html

> I am not much surprised by Rubi's failure on numbers 10 and 11 from
> Chapter 7; Derive 6.10 cannot do them either. It may be acceptable to do
> nothing about this, I think.
>
> Martin.
>
> PS: Note that the 'model' results in my Derive files may not always be
> identical (or equal or equivalent) to the results given in Timofeev's
> book. In some cases, the integrands and/or results had to be corrected
> for misprints or mistakes. I may also have 'continuitized' some of the
> evaluations (effectively adding piecewise constants to make them
> continuous on the real axis).
>

Ok. What I did is just do

FullSimplify[mathematicaResult - bookResult ]

and hope to see either a zero or constant for the difference.
I assumed that a difference that still was a function of x would not
be accepted or that Mathematica could not simplify the difference.
In that case, I plot the difference to see if it is linear in x or not.

--Nasser


Nasser M. Abbasi

unread,
Jul 4, 2013, 1:32:00 PM7/4/13
to
On 7/4/2013 12:16 PM, Nasser M. Abbasi wrote:

opps, missed the "not"

>
> Good point. Yes, Rubi 4.1 did fully evaluate it, there was an "Int"
===============================NOT



clicl...@freenet.de

unread,
Jul 5, 2013, 12:42:38 PM7/5/13
to

Thanks for the Maple, FriCAS, Mathematica, and Rubi performance data.

The following table summarizes the available data for the example
integrals in Timofeev's 1948 book. To simplify the accounting, the
numbers of examples represent the actual numbers of distinct integrands;
for chapters where this has not yet been determined, the total of
Timofeev's numbered examples is given instead:

ch. ex's Der. Fri. Mpl MMA Rubi etc. etc.
6.10 1.21 17 9.xx 4.1
-------------------------------------------------------
1 86 83 86 85 86 ?
2 90 - - - - -
3 12 12 12 12 12 12
4 132 - - - - -
5 120 - - - - -
6 26 - - - - -
7 11 9 11 11 11 8
8 109 - - - - -
9 59 - - - - -
-------------------------------------------------------
100% 95.4% 100% 99.1% 100% ?

The Winners so far are FriCAS 1.21 and Mathematica 9!

Only Rubi's performance on the problems from Chapters 1 remains unknown
now. Derive versions of these problems are appended below (taken from my
current file).

Martin.


" Timofeev (1948) Ch. 1, examples 1 - 21 (p. 25-26) ... "

INT(1/(a^2-b^2*x^2),x)=1/(a*b)*ATANH(b*x/a)

INT(1/(a^2+b^2*x^2),x)=1/(a*b)*ATAN(b*x/a)

INT(SEC(2*a*x),x)=1/(4*a)*LN((CSC(2*a*x)+1)/(CSC(2*a*x)-1))=1/(2~
*a)*LN(TAN(pi/4+a*x))

INT(1/(4*SIN(x/3)),x)=-3/4*ATANH(COS(x/3))=3/4*LN(TAN(x/6))

INT(1/COS(3/4*pi-2*x),x)=-1/2*ATANH(SIN(3/4*pi-2*x))=1/2*LN(TAN(~
pi/8-x))

INT(SEC(x)*TAN(x),x)=SEC(x)

INT(CSC(x)*COT(x),x)=-CSC(x)

INT(TAN(x)/SIN(2*x),x)=1/2*TAN(x)

INT(1/(1+COS(x)),x)=SIN(x)/(1+COS(x))=TAN(x/2)

INT(1/(1-COS(x)),x)=SIN(x)/(COS(x)-1)=-COT(x/2)

INT(SIN(x)/(a-b*COS(x)),x)=1/b*LN(a-b*COS(x))

INT(COS(x)/(a^2+b^2*SIN(x)^2),x)=1/(a*b)*ATAN(b*SIN(x)/a)

INT(COS(x)/(a^2-b^2*SIN(x)^2),x)=1/(a*b)*ATANH(b*SIN(x)/a)

[INT(SIN(2*x)/(b^2*SIN(x)^2+a^2),x)=1/b^2*LN(a^2+b^2*SIN(x)^2),I~
NT(SIN(2*x)/(b^2*SIN(x)^2-a^2),x)=1/b^2*LN(a^2-b^2*SIN(x)^2)]

[INT(SIN(2*x)/(b^2*COS(x)^2+a^2),x)=-1/b^2*LN(a^2+b^2*COS(x)^2),~
INT(SIN(2*x)/(b^2*COS(x)^2-a^2),x)=-1/b^2*LN(a^2-b^2*COS(x)^2)]

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

INT(#e^x/(#e^(2*x)-1),x)=-ATANH(#e^x)

INT(1/(x*LN(x)),x)=LN(LN(x))

INT(1/(x*(1+LN(x)^2)),x)=ATAN(LN(x))

INT(1/(x*(1-LN(x))),x)=-LN(1-LN(x))

INT(1/(x*(1+LN(x/a))),x)=LN(1+LN(x/a))

" Timofeev (1948) Ch. 1, examples 22 - 40 (p. 27-28) ... "

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

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

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

INT((2*x-5)/(3*x^2-2),x)=1/3*LN(2-3*x^2)+5/SQRT(6)*ATANH(SQRT(6)~
*x/2)=(4-5*SQRT(6))/12*LN(SQRT(3)*x-SQRT(2))+(5*SQRT(6)+4)/12*LN~
(SQRT(3)*x+SQRT(2))

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

INT(SIN(x)*SIN(x/4),x)=2/3*SIN(3*x/4)-2/5*SIN(5*x/4)

INT(COS(3*x)*COS(4*x),x)=1/14*SIN(7*x)+1/2*SIN(x)

INT(TAN(x)*TAN(x-a),x)=1/TAN(a)*LN(1+TAN(a)*TAN(x))-x

[INT(SIN(x)^2,x)=1/2*(x-SIN(x)*COS(x)),INT(COS(x)^2,x)=1/2*(x+SI~
N(x)*COS(x))]

INT(SIN(x)*COS(x)^3,x)=-1/4*COS(x)^4

INT(COS(x)^3/SIN(x)^4,x)=1/SIN(x)-1/(3*SIN(x)^3)

INT(1/(SIN(x)^2*COS(x)^2),x)=TAN(x)-COT(x)

INT(COT(3/4*x)^2,x)=-4/3*COT(3/4*x)-x

INT((1+TAN(2*x))^2,x)=1/2*TAN(2*x)-LN(COS(2*x))

INT((TAN(x)-COT(x))^2,x)=TAN(x)-COT(x)-4*x

INT((TAN(x)-SEC(x))^2,x)=2*(TAN(x)-SEC(x))-x=2*TAN(x/2-pi/4)-x

INT(SIN(x)/(1+SIN(x)),x)=COS(x)/(1+SIN(x))+x=TAN(pi/4-x/2)+x

INT(COS(x)/(1-COS(x)),x)=SIN(x)/(COS(x)-1)-x=-COT(x/2)-x

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

" Timofeev (1948) Ch. 1, examples 41 - 65 (p. 35-37) ... "

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

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

INT((x+2)/(x^2-4*x-1),x)=1/2*LN(1+4*x-x^2)+4/SQRT(5)*ATANH((2-x)~
/SQRT(5))=1/10*((4*SQRT(5)+5)*LN(x-SQRT(5)-2)+(5-4*SQRT(5))*LN(x~
+SQRT(5)-2))

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

INT(1/((a*x+b)*SQRT(x)),x)=2/(SQRT(a)*SQRT(b))*ATAN(SQRT(a)*SQRT~
(x)/SQRT(b))

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

INT(x/SQRT(a^4-x^4),x)=1/2*ATAN(x^2/SQRT(a^4-x^4))=1/2*(a^2/SQRT~
(a^4-x^4))*SQRT(1-(x/a)^4)*ASIN((x/a)^2)

[INT(1/(x*SQRT(x^2-a^2)),x)=1/a*ATAN(SQRT(x^2-a^2)/a),INT(1/(x*S~
QRT(a^2-x^2)),x)=-1/a*ATANH(SQRT(a^2-x^2)/a),INT(1/(x*SQRT(x^2+a~
^2)),x)=-1/a*ATANH(a/SQRT(x^2+a^2))]

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

INT(1/SQRT(3*x^2-4*x+5),x)=1/SQRT(3)*ASINH((3*x-2)/SQRT(11))

INT(1/SQRT(x-x^2),x)=ASIN(2*x-1)

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

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

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

INT((2+3*SIN(x))/(SIN(x)*(1-COS(x))),x)=-ATANH(COS(x))+(3*SIN(x)~
+1)/(COS(x)-1)

INT(1/(2+3*COS(x)^2),x)=1/SQRT(10)*(x-ATAN(3*SIN(x)*COS(x)/(SQRT~
(10)+2+3*COS(x)^2)))

INT((1-TAN(x))/SIN(2*x),x)=-1/2*(ATANH(COS(2*x))+TAN(x))=1/2*(LN~
(TAN(x))-TAN(x))

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

INT((a^2-4*COS(x)^2)^(3/4)*SIN(2*x),x)=1/7*(a^2-4*COS(x)^2)^(7/4)

INT(SIN(2*x)/(a^2-4*SIN(x)^2)^(1/3),x)=-3/8*(a^2-4*SIN(x)^2)^(2/~
3)

INT(1/SQRT(a^(2*x)-1),x)=1/LN(a)*ATAN(SQRT(a^(2*x)-1))=1/LN(a)*A~
SEC(SQRT(a^(2*x)))

INT(#e^(x/2)/SQRT(#e^x-1),x)=2*LN(SQRT(#e^x-1)+#e^(x/2))

INT(ATAN(x)^n/(1+x^2),x)=1/(n+1)*ATAN(x)^(n+1)

INT(ASIN(x/a)^(3/2)/SQRT(a^2-x^2),x)=2/5*ASIN(x/a)^(3/2)*ATAN(x/~
SQRT(a^2-x^2))=2/5*(a/SQRT(a^2-x^2))*SQRT(1-(x/a)^2)*ASIN(x/a)^(~
5/2)

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

" Timofeev (1948) Ch. 1, examples 66 - 81 (p. 41-42) ... "

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

INT(LN(x)/x^5,x)=-(4*LN(x)+1)/(16*x^4)

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

INT(COS(x)^5,x)=SIN(x)/15*(3*COS(x)^4+4*COS(x)^2+8)

INT(SIN(x)^2*COS(x)^4,x)=1/6*SIN(x)^3*COS(x)^3+1/8*SIN(x)^3*COS(~
x)-1/16*SIN(x)*COS(x)+x/16

INT(1/SIN(x)^5,x)=-3/8*ATANH(COS(x))-3*COS(x)/(8*SIN(x)^2)-COS(x~
)/(4*SIN(x)^4)

INT(SIN(x)/#e^x,x)=-(COS(x)+SIN(x))/(2*#e^x)

INT(#e^(2*x)*SIN(3*x),x)=1/13*#e^(2*x)*(2*SIN(3*x)-3*COS(3*x))

INT(a^x*COS(x),x)=a^x/(LN(a)^2+1)*(LN(a)*COS(x)+SIN(x))

INT(COS(LN(x)),x)=x/2*(COS(LN(x))+SIN(LN(x)))

INT(SEC(x)^2*LN(COS(x)),x)=TAN(x)*LN(COS(x))+TAN(x)-x

INT(x*TAN(x)^2,x)=LN(COS(x))+x*TAN(x)-1/2*x^2

INT(ASIN(x)/x^2,x)=-ASIN(x)/x+LN((1-SQRT(1-x^2))/x)

INT(ASIN(x)^2,x)=x*ASIN(x)^2+2*SQRT(1-x^2)*ASIN(x)-2*x

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

INT(ACOS(SQRT(x/(x+1))),x)=(x+1)*(ACOS(SQRT(x/(x+1)))+SQRT(1/(x+~
1))*SQRT(x/(x+1)))

" ... end of Timofeev Ch. 1 "

Nasser M. Abbasi

unread,
Jul 5, 2013, 4:40:35 PM7/5/13
to
Just copied and edited for Mathematica's syntax the 86 integrals
for chapter 1 you posted.

They are in the same Rubi's Mathematica notebook so any one
can run them.

http://www.12000.org/my_notes/timofeev_integrals/index.htm

I put ?? next to the ones that require extra look. But a quick
obvservations shows this:

1. Chapter 1, ex. 29 and ex 64. not evaluated.
2. Chapter 1, ex. 43 Results does not match book?
3. Chapter 1, ex. 57 Results does not match book?
4. Chapter 1, ex. 48.3, 53, 62, 68, only Real part of Rubi's result matches
book's result. Is this OK?

regards
--Nasser

clicl...@freenet.de

unread,
Jul 9, 2013, 12:49:40 PM7/9/13
to

"Nasser M. Abbasi" schrieb:
Thanks for the data. I have verified that Rubi 4.1 fails on problems 29
and 64 only, otherwise the Rubi antiderivatives differ the model results
in my Derive file at most by piecewise constants, and therefore are ok.
In the light of the Rubi results, I have converted the evaluations of
examples 53 and 78 in my file from LN to ATANH:

INT(1/(x*SQRT(2+x-x^2)),x)=-1/SQRT(2)*ATANH((4+x)/(2*SQRT(2)*SQR~
T(2+x-x^2)))

INT(ASIN(x)/x^2,x)=-ASIN(x)/x-ATANH(SQRT(1-x^2))

The following table summarizes the data made available for the example
integrals in Timofeev's 1948 book. To simplify the accounting, the
numbers of examples represent the actual numbers of distinct integrands;
for chapters where this has not yet been determined, the total of
Timofeev's numbered examples is given instead:

ch. ex's Der. Fri. Mpl MMA Rubi etc. etc.
6.10 1.21 17 9 4.1
-------------------------------------------------------
1 86 83 86 85 86 84
2 90 - - - - -
3 12 12 12 12 12 12
4 132 - - - - -
5 120 - - - - -
6 26 - - - - -
7 11 9 11 11 11 8
8 109 - - - - -
9 59 - - - - -
-------------------------------------------------------
100% 95.4% 100% 99.1% 100% 95.4%

The Winners so far are FriCAS 1.21 and Mathematica 9!

It should be noted that some FriCAS results do not hold for all values
of the integration variable (and/or parameters in the integrand).

I will let matters rest at this point until new chapters or revised data
become available. Timofeev's book is available at:

<http://www.math-life.com/jdownloads/view.download/27/279.html>

Martin.

Nasser M. Abbasi

unread,
Jul 10, 2013, 12:50:10 AM7/10/13
to
Speaking of independent integration test suite. I have an old
dover book with over 2,000 indefinite integrals and their
solutions. Book is called

"A new table of indefinite integrals computer processed"
by Melvin Klerer and Fred Grossman ISBN 0-486-62714-4 1971

I scanned one page of the book (with the covers) here as
an example:

http://12000.org/tmp/070913/sample.pdf

According to the book, these are all verified and correct.

These were collected by the authors from many sources. Table
1 in the book shows the sources. Here are the sources: (used OCR to grab
this from the scanned page, so some typos might be there)

(I) Gradshteyn, I. S. and Ryzhik, I. M., Table of Integrals, Series and
Products, 4th Ed., Academic Press, 1965;

(2) Peirce, B. O. and Foster, R. M., A Short Table of Integrals, 4th Ed.,
Ginn & Co., 1956;

(3) Dwight, H. B., Tables of Integrals and Other Mathematical Data, 4th Ed., Macmillan Co., 1966;

(4) Abramowitz, M. and Stegun, I. A., eds., Handbook of Mathematical Functions,
NBS Applied Math Series-55, 1964;

(5) Petit Bois, G., Tables of Indefinite Integrals, Dover Publications, Inc., 1961;

(6) Grobner, W. and Hofreiter, N., I ntegraltafel, unbestimmte Integrale, Teil I, Springer-Verlag, 1965;

(7) Selby, S. M. and Girling, B., eds., Standard Mathematical Tables, 14th Ed., Chemical Rubb'er Co.,
1965;

(8) Meyer zur Capellen, W., Integraltafeln, Sammlung unbestimmer Integrale elementarer
Functionen, Springer-Verlag, 1950.

--Nasser

Richard Fateman

unread,
Jul 10, 2013, 10:35:01 AM7/10/13
to
On 7/9/2013 9:50 PM, Nasser M. Abbasi wrote:
> Speaking of independent integration test suite. I have an old
> dover book with over 2,000 indefinite integrals and their
> solutions. Book is called
>
> "A new table of indefinite integrals computer processed"
> by Melvin Klerer and Fred Grossman ISBN 0-486-62714-4 1971
>
> I scanned one page of the book (with the covers) here as
> an example:
>
> http://12000.org/tmp/070913/sample.pdf
>
> According to the book, these are all verified and correct.
>

You might read more carefully what they mean by verified.
(And report back here).
As I recall, all they did was some random numerical evaluation,
hardly the kind of checking that would confirm behavior at
singularities etc.

Also, the text is available free online for
Gradshteyn and Ryzhik, which
I believe contains many more integrals. Perhaps Klerer could
not confirm them or thought they were not so useful?

I suggest that the G&R compact disk be used as a test suite. However,
tricks like change of variables are presumed, so that a skilled human
can make use of G&R where a less-skilled computer will fail to notice
that a problem is tabulated.

There is an even larger multi-volume table, in Russian, of many obscure
integrals, generally so poorly printed that formulas might easily be
misread. I am under the impression that
these generally fall out of algorithms involving Meijer G functions,
which was how they were generated (by hand). [I have vols 1-3) See...

A.P. Prudnikov, Yu.A. Brychkov, O.I. Marichev. Integrals and Series.
First edition (Russian), volumes 1–5, Nauka, 1981−1986. First edition
(English, translated from the Russian by N.M. Queen), volumes 1–5,
Gordon & Breach Science Publishers/CRC Press, 1988–1992, ISBN
2-88124-097-6. Second revised edition (Russian), volumes 1–3,
Fiziko-Matematicheskaya Literatura, 2003.

Note that O.I. Marichev was hired by Wolfram in 1992, and the algorithms
used to generate these formulas may now be found in one or more computer
algebra systems.

clicl...@freenet.de

unread,
Jul 10, 2013, 2:41:24 PM7/10/13
to

"Nasser M. Abbasi" schrieb:
I expect you would run into copyright problems with Klerer-Grossman
(1971) or with any of their references if you want to make a substantial
fraction of such a book publicly accessible in form of a symbolic
integration test suite. On the other hand, there should be no problems
with Soviet era Russian books like Timofeev's, which seem to be in the
public domain anyway, and which would also not simply be copied in toto.

I also think that collections of example problems or exercises, which
are meant to probe a human integrator's range of capabilities, provide
more realistic testing than integral tables, whose purpose is quite
different. Thus I suggest you look into Giunter and Kuz'min's famous
"Collection of problems in higher mathematics" comprising three volumes.
I would expect a rich collection of indefinite integrals (along with
their solutions) among the problems - perhaps somebody can tell us in
which volume? Download links to vols. I (two versions), II, and III are
given below.

Martin.


[line breaks must be removed before use]

<http://www.enlightenmebook.com/%D0%B3%D1%8E%D0%BD%D1%82%D0%B5%D1
%80-%D0%BD%D0%BC-%D0%BA%D1%83%D0%B7%D1%8C%D0%BC%D0%B8%D0%BD-%D1%80
%D0%BE-%D1%81%D0%B1%D0%BE%D1%80%D0%BD%D0%B8%D0%BA-%D0%B7%D0%B0%D0
%B4%D0%B0%D1%87-%D0%BF%D0%BE-%D0%B2%D1%8B%D1%81%D1%88%D0%B5%D0%B9
-%D0%BC%D0%B0%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B5-%D1
%82%D0%BE%D0%BC-1_45b65093793.html>

<http://www.enlightenmebook.com/%D0%B3%D1%8E%D0%BD%D1%82%D0%B5%D1
%80-%D0%BD%D0%BC-%D0%BA%D1%83%D0%B7%D1%8C%D0%BC%D0%B8%D0%BD-%D1%80
%D0%BE-%D1%81%D0%B1%D0%BE%D1%80%D0%BD%D0%B8%D0%BA-%D0%B7%D0%B0%D0
%B4%D0%B0%D1%87-%D0%BF%D0%BE-%D0%B2%D1%8B%D1%81%D1%88%D0%B5%D0%B9
-%D0%BC%D0%B0%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B5-%D1
%82%D0%BE%D0%BC-1_a28478bbe4c.html>

<http://www.enlightenmebook.com/%D0%B3%D1%8E%D0%BD%D1%82%D0%B5%D1
%80-%D0%BD%D0%BC-%D0%BA%D1%83%D0%B7%D1%8C%D0%BC%D0%B8%D0%BD-%D1%80
%D0%BE-%D1%81%D0%B1%D0%BE%D1%80%D0%BD%D0%B8%D0%BA-%D0%B7%D0%B0%D0
%B4%D0%B0%D1%87-%D0%BF%D0%BE-%D0%B2%D1%8B%D1%81%D1%88%D0%B5%D0%B9
-%D0%BC%D0%B0%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B5-%D1
%82%D0%BE%D0%BC-2_27f21ac6601.html>

<http://www.enlightenmebook.com/%D0%B3%D1%8E%D0%BD%D1%82%D0%B5%D1
%80-%D0%BD%D0%BC-%D0%BA%D1%83%D0%B7%D1%8C%D0%BC%D0%B8%D0%BD-%D1%80
%D0%BE-%D1%81%D0%B1%D0%BE%D1%80%D0%BD%D0%B8%D0%BA-%D0%B7%D0%B0%D0
%B4%D0%B0%D1%87-%D0%BF%D0%BE-%D0%B2%D1%8B%D1%81%D1%88%D0%B5%D0%B9
-%D0%BC%D0%B0%D1%82%D0%B5%D0%BC%D0%B0%D1%82%D0%B8%D0%BA%D0%B5-%D1
%82%D0%BE%D0%BC-3_d25ce590b72.html>

Nasser M. Abbasi

unread,
Jul 10, 2013, 2:47:10 PM7/10/13
to
On 7/10/2013 9:35 AM, Richard Fateman wrote:
> On 7/9/2013 9:50 PM, Nasser M. Abbasi wrote:


>> I scanned one page of the book (with the covers) here as
>> an example:
>>
>> http://12000.org/tmp/070913/sample.pdf
>>
>> According to the book, these are all verified and correct.
>>

>
> You might read more carefully what they mean by verified.
> (And report back here).
> As I recall, all they did was some random numerical evaluation,
> hardly the kind of checking that would confirm behavior at
> singularities etc.
>


I added the 2 pages from introduction that describes what they did to
the above pdf sample. Here is some snippet:

....
"
(b) The automatically linearized form of each integral was then
processed by a program that numerically differentiated the integral
at various values for the variable of integration and at various
values for the parameters of the integrand. These derivatives were
compared to the respective integrand evaluated at the same points. The
truncation errors of the differentiation approximation and the
computational rounding error were first estimated for the various
evaluation points.

These values were used to adjust the parameters of
the differentiation so that the truncation error and the rounding error
would be approximately equal. The integral was accepted if the absolute
value of the difference between the integrand and the numerical derivative
the numerical derivative of the integral (the absolute error) was less than
or equal to the estimated total error at aLL points of evaluation.

For situations where the estimated total error could be considered to
be negligible, an alternate criterion was to restrict the allowed
relative error, that is, the absolute error stated above divided by the
value of the integfand.

The program monitored itself to avotd undue loss of precision due to subtraction
errors in computing derivatives, and for this purpose made appropriate
adjustments in the differentiation parameters. The strictness of the
numerical criteria was a function of the word size of the computer (in this
case, thirty binary bits for a floating-point mantissa) and of the empirical
monitoring of results to minimize the probability of an incorrect integral
slipping through the process. These programs were written in the K-M
language and compiled by the K-M system.
(c) Simultaneously, the results, which included the precision of validation
or range of errors for each datum, were recorded via high-speed printer
listing. Corrolary data were output via the computer typewriter terminal."
......

--Nasser

da...@axiom-developer.org

unread,
Jul 14, 2013, 12:22:18 AM7/14/13
to
On Sunday, February 24, 2013 10:11:47 AM UTC-5, clicl...@freenet.de wrote:
> The Russian book "Integration of Functions"
>
> (Интегрирование функций) published by A.F. Timofeev
>
> (А.Ф. Тимофеев) in 1948 provides many integration Examples
>
> (Примеры) of the following general kind:
>
>
>
> INT(LN(x)^2*x, x) = x^2/2*(LN(x)^2 - LN(x) + 1/2)
>
>
>
> INT(LN(x)/x^5, x) = - (4*LN(x) + 1)/(16*x^4)
>
>
>
> INT(x^2*LN((x - 1)/x), x) = x^3/3*LN((x - 1)/x) - LN(x - 1)/3 - x*(x +
>
> 2)/6
>
>
>
> INT(COS(x)^5, x) = SIN(x)/15*(3*COS(x)^4 + 4*COS(x)^2 + 8)
>
>
>
> INT(SIN(x)^2*COS(x)^4, x) = 1/6*SIN(x)^3*COS(x)^3 + 1/8*SIN(x)^3*COS(x)
>
> - 1/16*SIN(x)*COS(x) + x/16
>
>
>
> INT(1/SIN(x)^5, x) = 3/8*LN(TAN(x/2)) - 3*COS(x)/(8*SIN(x)^2) -
>
> COS(x)/(4*SIN(x)^4)
>
>
>
> INT(SIN(x)/#e^x, x) = - (COS(x) + SIN(x))/(2*#e^x)
>
>
>
> INT(#e^(2*x)*SIN(3*x), x) = 1/13*#e^(2*x)*(2*SIN(3*x) - 3*COS(3*x))
>
>
>
> INT(a^x*COS(x), x) = a^x/(LN(a)^2 + 1)*(LN(a)*COS(x) + SIN(x))
>
>
>
> INT(COS(LN(x)), x) = x/2*(COS(LN(x)) + SIN(LN(x)))
>
>
>
> INT(SEC(x)^2*LN(COS(x)), x) = TAN(x)*LN(COS(x)) + TAN(x) - x
>
>
>
> INT(x*TAN(x)^2, x) = LN(COS(x)) + x*TAN(x) - 1/2*x^2
>
>
>
> INT(ASIN(x)/x^2, x) = - ASIN(x)/x + LN((1 - SQRT(1 - x^2))/x)
>
>
>
> INT(ASIN(x)^2, x) = x*ASIN(x)^2 + 2*SQRT(1 - x^2)*ASIN(x) - 2*x
>
>
>
> INT(x^2*ATAN(x)/(1 + x^2), x) = x*ATAN(x) - 1/2*ATAN(x)^2 - 1/2*LN(x^2 +
>
> 1)
>
>
>
> INT(ACOS(SQRT(x/(x + 1))), x) = (x + 1)*(ACOS(SQRT(x/(x + 1))) +
>
> SQRT(1/(x + 1))*SQRT(x/(x + 1)))
>
>
>
> There are 8 chapters in the book containing 81+90+14+132+120+26+11+59 =
>
> 533 integration examples; the above are numbers 76 to 81 from chapter 1.
>
> I believe the whole would make a good independent integration test suite
>
> because the book antedates all automated integrators and because the
>
> author claims to cover the field thoroughly (with respect to integrals
>
> expressible by elementary functions and by elliptic integrals). In the
>
> Foreword (Предисловие), he writes (as translated by Google):
>
>
>
> "In most of the guides on higher mathematics the question of integration
>
> of functions of one independent variable has a fairly complete coverage,
>
> so that very often students do not get a clear idea of ??what functions
>
> are integrated in closed form, for which this integration is impossible,
>
> and what techniques are useful in a particular case for various kinds of
>
> functions. With this in mind, the author of this book sought to explain
>
> the issue to a possible full, paying particular attention to the
>
> practice of integration, thus introducing a large number of examples.
>
> Thus, this book can serve as a first, a reference book for those wanting
>
> to get a quick response with respect to a quadrature, and secondly, aid
>
> for students who wish to supplement and deepen their knowledge in this
>
> matter."
>
>
>
> Some may prefer the original:
>
>
>
> "В большей части руководств по высшей м
>
> атематике вопрос об интегрировании
>
> функций одного независимого переменно
>
> го не имеет достаточно полного
>
> освещения, вследствие чего очень часто
>
> учащиеся не получают ясного
>
> представления о том, какие функции инте
>
> грируются в конечном виде, для
>
> каких это интегрирование невозможно и
>
> какие приёмы целесообразно
>
> применять в том или ином случае для раз
>
> личных видов функций. Имея это в
>
> виду, автор в настоящей книге стремился
>
> изложить вопрос с возможной
>
> полнотой, обратив особое внимание на пр
>
> актику интегрирования, введя при
>
> этом большое количество примеров. Таки
>
> м образом, книга эта может
>
> служить, во-первых, справочником для ли
>
> ц, желающих получить скорый ответ
>
> относительно той или иной квадратуры, а
>
> во-вторых, пособием для
>
> учащихся, желающих пополнить и углубит
>
> ь свои знания в этом вопросе."
>
>
>
> A djvu file of the book (6 Megabyte) can be downloaded freely from
>
> various websites - just google the Russian title. The full name of the
>
> author apparently was Aleksandr Fedotovich Timofeev (Александр
>
> Федотович Тимофеев), but I couldn't locate any
>
> information on him beyond this. A Russian review of the book is
>
> available at:
>
>
>
> <http://www.mathnet.ru/links/5566c95518efdede979ffdc8a2278b01/rm8600.pdf>
>
>
>
> There are the usual misprints in the book, but with both the integrand
>
> and antiderivative available, the original meaning can be reconstructed
>
> for all (or almost all) examples I think. Timofeev's antiderivatives are
>
> usually close to the most compact form possible (an exception is his
>
> consistent use of logarithms for inverse hyperbolic functions), but they
>
> have to be checked for validity over the complex plane, and be corrected
>
> if necessary (this seems rare, but was needed for the last example
>
> above). Apart from compactness, continuity (and reality) on the real
>
> axis might be worth checking and repairing too.
>
>
>
> So, if 5 to 10 people were found willing to type in and check (and
>
> perhaps correct or improve) 50 to 100 integrals and evaluations each, a
>
> digitization of this corpus could be an almost pleasant task, and surely
>
> quite useful. What do you think?
>
>
>
> Martin.

Axiom has published a Computer Algebra Test Suite at
http://axiom-developer.org/axiom-website/CATS/index.html

It includes Schaums integrals and Kamke's Ordinary Differential Equations.
It also includes Albert Rich's integration set.
In all there are several thousand examples.

The source file format is latex, the output file format is pdf.
The axiom.sty package is at
http://axiom-developer.org/axiom-website/CATS/axiom.sty

Each problem includes the source input.
Axiom's output is prefixed with --R which is an Axiom comment.

da...@axiom-developer.org

unread,
Jul 14, 2013, 1:25:49 AM7/14/13
to
The file format is in groups of 5 expressions:
tnnn:= the input expression
rnnn:= the expected, published result
annn:= integration of tnnn (Axiom's result)
mnnn:= difference of annn and rnnn (should be constant, hopefully 0)
dnnn:= derivative of mnnn (to see if the difference is constant)

There are, as usual, a LOT of mathematical and symbolic issues
such as branch cuts and simplification. If I remember correctly,
Axiom and Mathematics share one set of cuts, Maple and Maxima
share a different set.

The schaums suite has attempts to overcome the simplification
issues by using various Axiom routines. Often a special routine
can discover that a result is actually correct but different by
a constant. It is also a useful way to discover errors in the
original published source.

I have not yet done this with the Rich test suite due to the
size of the problem and the lack of time.

I will look at the Charlwood test suite.

It has been a long-standing Axiom project goal to develop CATS,
a Computer Algebra Test Suite.

I'm open to suggestion about other sources.

I believe we need a system-independent source of algorithms
that will perform these integrations. I'd like to see NIST
or some other standard organization support such an effort.
It is not enough to just publish the equations with answers.
We need to have excellent "standard" algorithms.

It would also be useful to standardize on a system-independent
machine-readable notation that had published conversion routines
so we could all use the same input for equations and results.
It took a while to hand-write the several thousand equations.

We moved past tables of logarithms a few years ago.
It is time to move past tables of equations.
This is, after all, mathematics not art.


Nasser M. Abbasi

unread,
Jul 14, 2013, 3:19:20 AM7/14/13
to
On 7/13/2013 11:22 PM, da...@axiom-developer.org wrote:

>
> Axiom has published a Computer Algebra Test Suite at
> http://axiom-developer.org/axiom-website/CATS/index.html
>
> It includes Schaums integrals and Kamke's Ordinary Differential Equations.

I am working on Kamke, and have all the ode's and have the book also which
I check with.

The problem is writing the document itself to show the result of Maple
and Mathematica next to each other is what is taking long time,
since it involves lots of manual work.

The problem is with Maple it is not possible to export each result
on its own to a .png file so I can include that in my Latex report.

Exporting each ODE's result to Latex does not work for long results
since sometimes the latex needs manual breaking of the generated
equation. (if there is long expression between \left(... and \right)

So I have to do each one by one and use .png files to capture
the result.

Currently there are about 150 or so done

http://12000.org/my_notes/kamek/kamke_differential_equations.htm

again, to make a document, in Latex, which includes many CAS's
results, the CAS itself must help in terms of making it easy
to export things. Mathematica is very good in this area, so one can
automate all this in code and run over the hundreds of the ODE's and do
everything in code. But to integrate results of other CAS'es into
one document, this process breaks down.

--Nasser

da...@axiom-developer.org

unread,
Jul 14, 2013, 5:46:07 AM7/14/13
to
I will be interested in seeing your results.
The whole point of this exercise, at least for Axiom,
is to have a validated test suite. I found a few errors
in the reference books while testing. I will compare your
results to the posted results for Axiom.

I agree that creating these test suites by hand is a
huge task. It took me a couple months to create the
CATS test suite so far. That's why I'd like to see the
DLMF completely machine-readable.

Tim

Nasser M. Abbasi

unread,
Jul 14, 2013, 6:58:04 AM7/14/13
to
On 7/14/2013 4:46 AM, da...@axiom-developer.org wrote:

> I will be interested in seeing your results.
> The whole point of this exercise, at least for Axiom,
> is to have a validated test suite. I found a few errors
> in the reference books while testing. I will compare your
> results to the posted results for Axiom.
>
> I agree that creating these test suites by hand is a
> huge task. It took me a couple months to create the
> CATS test suite so far. That's why I'd like to see the
> DLMF completely machine-readable.
>
> Tim
>

I think the way to do this is by automation. The way I was
doing it so far is not practical. It should instead by
done by writing a script to run through all the test cases
automatically, otherwise it will take me another 2 years to
finish. But the problem comes when one wants to combine
results of many CAS'es in one document.

I looked at your site for axiom, but could not see the raw
text file which just lists the ode's in plain .txt files?

Having them inside latex makes it little hard to use them from
other CAS systems since then one have to be extract them one by
one from latex.

btw, with Kamke's suite from the original E.S. Cheb-Terrab, I was
only able to understand the first 576 ode'e. Syntax changed starting
at 577. So I am only doing the first 576 for now.

I collected them all in one plain text file, one for Mathematica and
one for Maple. The text files are there to download in
the download section

http://12000.org/my_notes/kamek/kamke_differential_equations.htm

Thanks to E.S. Cheb-Terrab for making the original files. I only
found one problem with one ODE so far. It helps to have the book
to check against.

May be you can have plain text file(s) also for all the ODE's
you have on your site? Even if it is in axiom syntax. This way it will
easy to use that and convert them to other CAS syntax and run them.

regards,
--Nasser

Richard Fateman

unread,
Jul 14, 2013, 11:44:38 AM7/14/13
to
On 7/14/2013 2:46 AM, da...@axiom-developer.org wrote:
...

. That's why I'd like to see the
> DLMF completely machine-readable.
>
> Tim
>

The DLMF offers (click on the "i" on the right side) each
formula in TeX and png and pMML. The last of these looks like
XML.

If having the DLMF delivered piecemeal to your browser is not
machine-readable enough for your application, maybe you can ask
the people at NIST for some kind of data dump.

In some respects the DLMF is a disappointment because it fails
to make the connection to computer algebra systems (or even
computer numeric systems -- there are no programs at all).
In other respects it is a plus. The old A&S was firmly rooted
in the "printed tables of logarithms" era -- 1940s. The
DLMF has moved the technology to perhaps the mid 1980s with
a dusting of newer web-display tech.


da...@axiom-developer.org

unread,
Jul 14, 2013, 2:17:20 PM7/14/13
to
I updated the page
http://axiom-developer.org/axiom-website/CATS/index.html
with new files for the kamke test suite.

If you click on the txt links you can get the expressions
used by Axiom without any other information. Note that the
underscore character is a line-continuation character for
the Axiom reader. Since the pamphlet files are latex I need
to limit the input to page-width.

Hope this helps.

Tim

da...@axiom-developer.org

unread,
Jul 14, 2013, 2:21:15 PM7/14/13
to
Richard,

This is news to me. I looked at the DLMF site and could only find
pages which reference other publications. Can you give me a link
to a page that contains the equations for an integration problem?

Tim

Albert Rich

unread,
Jul 14, 2013, 2:58:26 PM7/14/13
to
On Saturday, July 13, 2013 7:25:49 PM UTC-10, da...@axiom-developer.org wrote:

> [...]
> I have not yet done this with the Rich test suite due to the
> size of the problem and the lack of time.
>
> I will look at the Charlwood test suite.
>
> It has been a long-standing Axiom project goal to develop CATS,
> a Computer Algebra Test Suite.
>
> I'm open to suggestion about other sources.
>
> I believe we need a system-independent source of algorithms
> that will perform these integrations. I'd like to see NIST
> or some other standard organization support such an effort.
> It is not enough to just publish the equations with answers.
> We need to have excellent "standard" algorithms.
>
> It would also be useful to standardize on a system-independent
> machine-readable notation that had published conversion routines
> so we could all use the same input for equations and results.
> It took a while to hand-write the several thousand equations.
>
> We moved past tables of logarithms a few years ago.
> It is time to move past tables of equations.
> This is, after all, mathematics not art.

I applaud the Axiom community's efforts to build a Computer Algebra Test Suite to objectively rate the performance of the various systems on a wide range of problems. To help in that cause, available now at http://www.apmaths.uwo.ca/~arich/ are translations of the 43,000+ integration problems in the Rubi test-suite expressed in Axiom/FriCAS and Maxima syntax, as well as the previously existing translations in Maple and Mathematica syntax. Developers are free to include all or some of these problems in CATS or other CAS test-suites being built.

Please let me know if you encounter errors in the translations, especially in the definitions of special and hypergeometric functions, so I can remedy them.

Albert

da...@axiom-developer.org

unread,
Jul 14, 2013, 3:16:27 PM7/14/13
to
Albert,

I visited that page. I don't see any reference to Axiom or equations
in Axiom syntax. Can you provide a more specific link? (It is obviously
not my day for finding links)

Tim

Albert Rich

unread,
Jul 14, 2013, 3:31:08 PM7/14/13
to
On Sunday, July 14, 2013 9:16:27 AM UTC-10, da...@axiom-developer.org wrote:

> I visited that page. I don't see any reference to Axiom or equations
> in Axiom syntax. Can you provide a more specific link? (It is obviously
> not my day for finding links)
>
> Tim

Since I just changed the webpage, perhaps the old page was still cached in your computer, and needs to be flushed by refreshing the page. In any event, here is the link to the files in Axiom syntax:

http://www.apmaths.uwo.ca/~arich/IntegrationProblems/AxiomSyntaxFiles/AxiomSyntaxFiles.html

Albert

Nasser M. Abbasi

unread,
Jul 14, 2013, 5:53:12 PM7/14/13
to
On 7/14/2013 1:21 PM, da...@axiom-developer.org wrote:

> Richard,
>
> This is news to me. I looked at the DLMF site and could only find
> pages which reference other publications. Can you give me a link
> to a page that contains the equations for an integration problem?
>
> Tim

As an example:

http://dlmf.nist.gov/7.14

Pointing the mouse on the "i" on the right edge should
bring up a small window. Here is a screen shot from Firefox:

http://12000.org/tmp/071413/DLMF.jpg

In addition, putting the mouse over the equation itself,
and a right-click, a menu with options saying
"view mathml source" will come up. screen shot

http://12000.org/tmp/071413/DLMF2.jpg

Selecting this option opens a new window with the
mathml code for the equation. Then FILE->SAVE PAGE AS...
will save the mathml page.

One can then try a mathml to latex translator such as
http://www.w3.org/Math/Software/desc/desc_Itranslator_from_mathml_to_tex_latex.html
to convert it to Latex if needed.

--Nasser


Nasser M. Abbasi

unread,
Jul 14, 2013, 6:25:27 PM7/14/13
to
On 7/14/2013 4:53 PM, Nasser M. Abbasi wrote:

> One can then try a mathml to latex translator such as
> http://www.w3.org/Math/Software/desc/desc_Itranslator_from_mathml_to_tex_latex.html
> to convert it to Latex if needed.
>

This won't be needed actually, since tex encoding of the equation is there
already when clicking on the "i" on the right.

--Nasser

da...@axiom-developer.org

unread,
Jul 14, 2013, 11:49:27 PM7/14/13
to
Unfortunately latex is ambiguous.

Tim

Albert Rich

unread,
Jul 15, 2013, 3:07:38 AM7/15/13
to
On Sunday, July 14, 2013 12:58:04 AM UTC-10, Nasser M. Abbasi wrote:

> I think the way to do this is by automation. The way I was
> doing it so far is not practical. It should instead by
> done by writing a script to run through all the test cases
> automatically, otherwise it will take me another 2 years to
> finish. But the problem comes when one wants to combine
> results of many CAS'es in one document.

I agree completely that automating the testing of systems AND grading their results is essential for any test-suite of significant size. However, I do not think it necessary or practical to combine the raw test results of multiple systems into a single document.

Instead a system's test-suite program should compare its solution for each problem with the optimal solution in the test-suite, and assign it a numerical grade. Then the grades of all the systems for each of the problems, rather than the raw results, should be combined into a single table.

This was how I compiled the table of Charlwood Fifty test results for 7 systems that was posted in another sci.math.symbolic thread. Although the grading system used was relatively coarse (2 for an optimal antiderivative, 1 for a nonoptimal antiderivative, and 0 if unable to integrate), the table's bottom-line made it easy to compare the relative performance of the systems on this small test-suite. Obviously, it would be even more useful on a large test-suite with all the major systems tested...

Albert

da...@axiom-developer.org

unread,
Jul 15, 2013, 3:36:04 PM7/15/13
to
As mentioned, the antiderivative given is of the form
1
--
99
----
99
x

whereas Axiom gets the equivalent result of

1
-----
99
99x

Axiom builds a "type tower" for expressions. Fractions are of typ
FRACTION(INTEGER). If a polynomial has fractional coefficients you get
POLYNOMIAL(FRACTION(INTEGER)). This is the type of the Axiom expression
above. However, the suggested antiderivative is the ratio of two
polynomials with fractional coefficients leading to a type of
FRACTION(POLYNOMIAL(FRACTION(INTEGER))) which is rather more complicated.

In order to ensure that the answers of the integration differ by no
more than a constant I've been differencing the expected answer from
the Axiom answer and then taking the derivative.

One curious pattern is that your answers differ from Axiom's answers
by non-zero constants. I found that the same thing happens with Maple
and Axiom. It appears that we're using different branch cuts caused
by different trig rewrite formulas. Axiom and Mathematica tend to agree
if memory serves me. I can't check because the Mathematica version I
bought won't run due to system changes.

Perhaps there has to be a wider discussion of the choice of these
simplification formulas. Is there some reason to choose one over
the other?

Tim

da...@axiom-developer.org

unread,
Jul 15, 2013, 4:16:42 PM7/15/13
to
On Monday, July 15, 2013 3:07:38 AM UTC-4, Albert Rich wrote:
For some of the integration problems Axiom finds more than one result.
For instance,
t1:=sqrt(a+b*x)/x

+-------+
\|b x + a
(1) ----------
x
Type: Expression(Integer)
(2) -> integrate(t1,x)

(2)
+-+ +-------+
+-+ - 2\|a \|b x + a + b x + 2a +-------+
[\|a log(----------------------------) + 2\|b x + a ,
x
+-------+
+---+ \|b x + a +-------+
- 2\|- a atan(----------) + 2\|b x + a ]
+---+
\|- a
Type: Union(List(Expression(Integer)),...)

The posted suite only shows one answer.
How should a test suite handle this?

Tim

Albert Rich

unread,
Jul 15, 2013, 11:09:47 PM7/15/13
to
On Monday, July 15, 2013 10:16:42 AM UTC-10, da...@axiom-developer.org wrote:

> For some of the integration problems Axiom finds more than one result.
> For instance,
>
> t1:=sqrt(a+b*x)/x
>
>
> +-------+
> \|b x + a
> (1) ----------
> x
>
> Type: Expression(Integer)
>
> (2) -> integrate(t1,x)
>
>
> (2)
>
> +-+ +-------+
> +-+ - 2\|a \|b x + a + b x + 2a +-------+
> [\|a log(----------------------------) + 2\|b x + a ,
> x
>
> +-------+
> +---+ \|b x + a +-------+
> - 2\|- a atan(----------) + 2\|b x + a ]
> +---+
> \|- a
>
> Type: Union(List(Expression(Integer)),...)
>
> The posted suite only shows one answer.
> How should a test suite handle this?

Providing users a choice is always good, so I would compare both results with the optimal antiderivative in the test-suite and take the highest grade. However, if either result is invalid (i.e. fails to differentiate to the original integrand), give a negative grade.

Albert

Albert Rich

unread,
Jul 16, 2013, 2:19:26 AM7/16/13
to
On Monday, July 15, 2013 9:36:04 AM UTC-10, da...@axiom-developer.org wrote:

> In order to ensure that the answers of the integration differ by no
> more than a constant I've been differencing the expected answer from
> the Axiom answer and then taking the derivative.
>
> One curious pattern is that your answers differ from Axiom's answers
> by non-zero constants. [...]

The first sentence above correctly asserts that it is ok for antiderivatives to differ by a constant. Yet, the second sentence finds it surprising that they do differ. So what is the problem?

Albert

da...@axiom-developer.org

unread,
Jul 16, 2013, 4:00:13 AM7/16/13
to
suppose
t0:= expression
r0:= expected result
a0:= integrate(t0,x)
m0:= a0 - r0
d0:= differentiate(m0,x)

m0 is the difference between Axiom's result and the expected result.
d0 is the derivative of m0, usually with a value of 0.

m0 often shows that Axiom's result and the expected result differ
and the derivative result of 0 shows that this is just a constant.

When I look at the reason for the constant difference it seems to be
related to the trig identities we chose. What system did you use to
create the expected results?

da...@axiom-developer.org

unread,
Jul 16, 2013, 4:05:37 AM7/16/13
to
That last was just a dumb question... you used Rubi, no doubt.
What I wanted to ask was what trig substitutions you use.
Is there somewhere in the Rubi sources I should look?

Nasser M. Abbasi

unread,
Jul 16, 2013, 4:22:21 AM7/16/13
to
On 7/16/2013 3:05 AM, da...@axiom-developer.org wrote:

> What I wanted to ask was what trig substitutions you use.
> Is there somewhere in the Rubi sources I should look?

Hello;

The rubi integration rules are written in different files. One
of them is called "Trig Function Rules.m"

>ls

Algebraic Binomial Function Rules.m
Algebraic Function Rules.m
Algebraic Trinomial Function Rules.m
Derivative Integration Rules.m
Exponential Function Rules.m
Generic Integration Rules.m
Hyperbolic Function Rules.m
Integration Utility Functions.m
Inverse Hyperbolic Function Rules.m
Inverse Trig Function Rules.m
Miscellaneous Integration Rules.m
Piecewise Linear Function Rules.m
ShowStep Routines.m
Special Function Rules.m
Trig Function Rules.m

The files are in plain text format in Mathematica code. The
rubi 4.1 zip file is here

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

regards
--Nasser

It is loading more messages.
0 new messages