Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

[ Not really an answer, but a complement to Serge's answer, in order too pinpoint the answer ]

A quick check:

f(x)=log(sqrt(x)+1)/sqrt(x)

def tst1(alg="maxima"):
    ad=f(x).integrate(x, algorithm=alg)
    check_ad=bool(ad.diff(x)==f(x))
    ub=ad.limit(x=4)
    lb=ad.limit(x=1)
    di=(ub-lb).simplify()
    did=f(x).integrate(x,1,4, algorithm=alg)
    check_di=bool(di==did)
    ndi=di.n()
    # return [ad, check_ad, lb, ub, di, did, check_di, ndi]
    return [alg, check_ad, di, did, check_di]

T=table(rows=[tst1(alg=u) for u in ["maxima", "sympy", "giac", "fricas"]],
        header_row=["Algorithm", " AD checks", "Def. int. through AD",
                    "Def. int. directly", "Def. int. checks"])

shows that the antiderivative (aka primitive, AD) is correct (i.e. derivates back to f(x)) in all cases (and that its limits are correctly evaluated at each bound), but that the direct computation of the definite integral is wrong in Maxima :

 Algorithm    AD checks   Def. int. through AD      Def. int. directly          Def. int. checks
+-----------+------------+-------------------------+---------------------------+------------------+
  maxima      True         6*log(3) - 4*log(2) - 2   4*log(3) + 2*log(4/3) - 2   False
  sympy       True         6*log(3) - 4*log(2) - 2   6*log(3) - 4*log(2) - 2     True
  giac        True         6*log(3) - 4*log(2) - 2   6*log(3) - 4*log(2) - 2     True
  fricas      True         6*log(3) - 4*log(2) - 2   6*log(3) - 4*log(2) - 2     True

This problem has been encountered more than once, is known to upstream, but does not seem to have been formally reported per se.