Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

This is a bug. Furthermore, it is not a maxima bug, as it is often the case. Here, Sage truly screws things up itself :

  • Maxima doesn't give a false answer :

    sage: maxima.integrate(sqrt(1+cos(x)^2),x).sage()

    integrate(sqrt(cos(x)^2 + 1), x)

  • When one tries to "ease" the problem,

    • maxima doesn't recognize the "obvious", but does not give a false answer :

      sage: maxima.integrate(sqrt(1-m*sin(x)^2),x).sage()

      integrate(sqrt(-m*sin(x)^2 + 1), x)

    • Sage does :

      sage: integrate(sqrt(1-msin(x)^2),x) 1/4mx - 1/8msin(2x)

BTW : what is expected :

sage: elliptic_e(x,1/2).diff(x)
sqrt(-1/2*sin(x)^2 + 1)

One can easily check that sympy, giac and fricas all fail to integrate, but that none of them gives misleading "answers".

This one does not seem to be related to existing indefinite integral bugs, and is an original, genuine, Sage-specific one. Reported as Trac#26563

This is a bug. Furthermore, it is not a maxima bug, as it is often the case. case. Here, Sage truly screws things up itself :itself:

  • Maxima doesn't give a false answer :

    sage: maxima.integrate(sqrt(1+cos(x)^2),x).sage()

    answer:

    sage: maxima.integrate(sqrt(1+cos(x)^2),x).sage()
    integrate(sqrt(cos(x)^2 + 1), x)

    x)
  • When one tries to "ease" the problem,

    • maxima doesn't recognize the "obvious", but does not give a false answer :

      sage: maxima.integrate(sqrt(1-m*sin(x)^2),x).sage()

      answer:

      sage: maxima.integrate(sqrt(1-m*sin(x)^2),x).sage()
      integrate(sqrt(-m*sin(x)^2 + 1), x)

      x)
    • Sage does :

      sage: integrate(sqrt(1-msin(x)^2),x) 1/4mx does:

      sage: integrate(sqrt(1-m*sin(x)^2),x)
      1/4*m*x - 1/8msin(2x)

      1/8*m*sin(2*x)

BTW : BTW: what is expected :expected:

sage: elliptic_e(x,1/2).diff(x)
sqrt(-1/2*sin(x)^2 + 1)

One can easily check that sympy, giac and fricas all fail to integrate, integrate, but that none of them gives misleading "answers".

This one does not seem to be related to existing indefinite integral bugs, bugs, and is an original, genuine, Sage-specific one. Reported as Trac#as 26563Trac #26563

.