#8731: update/upgrade maxima to latest upstream (5.21.1)
---------------------------+------------------------------------------------
   Reporter:  jason        |       Owner:  tbd       
       Type:  enhancement  |      Status:  needs_work
   Priority:  major        |   Milestone:  sage-4.4.3
  Component:  packages     |    Keywords:            
     Author:               |    Upstream:  N/A       
   Reviewer:               |      Merged:            
Work_issues:               |  
---------------------------+------------------------------------------------

Comment(by kcrisman):

 Regarding the other errors:

 Replying to [comment:22 jason]:
 > The doctests that still fail after the patch is applied (under
 ptestlong) are listed below:
 >
 >
 >
 > I couldn't find a way to double-check that the new answer is correct in
 the following output mismatch
 >
 {{{

 sage -t -long "4.4.1/devel/sage/sage/symbolic/integration/integral.py"
 **********************************************************************
 File
 "/home/grout/sage-4.4.1/devel/sage/sage/symbolic/integration/integral.py",
 line 464:
     sage: integrate(sin(x)*cos(10*x)*log(x), x)
 Expected:
     1/18*log(x)*cos(9*x) - 1/22*log(x)*cos(11*x) -
 1/18*integrate(cos(9*x)/x, x) + 1/22*integrate(cos(11*x)/x, x)
 Got:
     1/198*(11*cos(9*x) - 9*cos(11*x))*log(x) + 1/44*Ei(-11*I*x) -
 1/36*Ei(-9*I*x) - 1/36*Ei(9*I*x) + 1/44*Ei(11*I*x)
 **********************************************************************
 }}}
 This is true if the cosine integral ci(x) (Ci in Mma) is
 1/2*(Ei(I*x)+Ei(-I*x).  Several online references imply it, and also
 noting that cos(x) is 1/2*(exp(i*x)+exp(-i*x)) (by Taylor series or
 whatever you like) suffices.


 > Here is a maxima session (5.21.1) showing the problem.  When keepfloat
 is false, an integral comes right back
 >
 > {{{
 > % sage -maxima
 > ;;; Loading #P"/home/grout/sage/local/lib/ecl/sb-bsd-sockets.fas"
 > ;;; Loading #P"/home/grout/sage/local/lib/ecl/sockets.fas"
 > ;;; Loading #P"/home/grout/sage/local/lib/ecl/defsystem.fas"
 > ;;; Loading #P"/home/grout/sage/local/lib/ecl/cmp.fas"
 > ;;; Loading #P"/home/grout/sage/local/lib/ecl/sysfun.lsp"
 > Maxima 5.21.1 http://maxima.sourceforge.net
 > using Lisp ECL 10.4.1
 > Distributed under the GNU Public License. See the file COPYING.
 > Dedicated to the memory of William Schelter.
 > The function bug_report() provides bug reporting information.
 > (%i1) assume(y^2>1);
 >                                      2
 > (%o1)                              [y  > 1]
 > (%i2) keepfloat: true;
 > (%o2)                                true
 > (%i3) integrate(log(x^2+y^2),x,0,1);
 >                                2               1
 >                         2 log(y  + 1) + 4 atan(-) y - 4
 >                                                y
 > (%o3)                   -------------------------------
 >                                        2
 > (%i4) integrate(log(x^2+y^2),x,0.0001414,1);
 > Is  (y - 1) (y + 1)  positive, negative, or zero?
 > }}}
 >

 I'm not sure what to do with this.  keepfloat is so annoying.

 >
 > There is some output mismatch in transform.pyx.  This occurs in an
 explanatory section of the docs, and just consists of simplifying a
 horrendous matrix.  The matrix just simplifies differently now (we get
 explicit imaginary values now, for some reason).  Does anyone want to
 check that the simplifications are actually correct now?
 >
 > {{{
 > sage -t -long "4.4.1/devel/sage/sage/plot/plot3d/transform.pyx"
 > **********************************************************************
 > File "/home/grout/sage-4.4.1/devel/sage/sage/plot/plot3d/transform.pyx",
 line 217:
 >     sage: m
 > Expected:
 >     [                                             -(cos(theta) - 1)*x^2
 + cos(theta)                 -(cos(theta) - 1)*sqrt(-x^2 - z^2 + 1)*x -
 sqrt(z^2)*sin(theta)         -((cos(theta) - 1)*x*z^2 - sqrt(-x^2 - z^2 +
 1)*sqrt(z^2)*sin(theta))/z]
 >     [                -(cos(theta) - 1)*sqrt(-x^2 - z^2 + 1)*x +
 sqrt(z^2)*sin(theta)                                 (cos(theta) - 1)*x^2
 + (cos(theta) - 1)*z^2 + 1 -((cos(theta) - 1)*sqrt(-x^2 - z^2 +
 1)*sqrt(z^2)*z + x*z*sin(theta))/sqrt(z^2)]
 >     [        -((cos(theta) - 1)*x*z^2 + sqrt(-x^2 - z^2 +
 1)*sqrt(z^2)*sin(theta))/z -((cos(theta) - 1)*sqrt(-x^2 - z^2 +
 1)*sqrt(z^2)*z - x*z*sin(theta))/sqrt(z^2)
 -(cos(theta) - 1)*z^2 + cos(theta)]
 > Got:
 >     [
 -(cos(theta) - 1)*x^2 + cos(theta)                 -((cos(theta) -
 1)*sqrt(-x^2 + 1)*sqrt(-x^2 - z^2 + 1)*x*sqrt(z^(-2)) - I*sqrt(x^2 -
 1)*sin(theta))*sqrt(z^2)/sqrt(-x^2 + 1)         -((cos(theta) -
 1)*sqrt(-x^2 + 1)*x*z^2*sqrt(z^(-2)) + I*sqrt(x^2 - 1)*sqrt(-x^2 - z^2 +
 1)*sin(theta))*sqrt(z^2)/(sqrt(-x^2 + 1)*z)]
 >     [                -((cos(theta) - 1)*sqrt(-x^2 + 1)*sqrt(-x^2 - z^2 +
 1)*x*sqrt(z^(-2)) + I*sqrt(x^2 - 1)*sin(theta))*sqrt(z^2)/sqrt(-x^2 + 1)
 (cos(theta) - 1)*x^2 + (cos(theta) - 1)*z^2 + 1  (sqrt(-x^2 + 1)*sqrt(x^2
 - 1)*x*z*sqrt(z^(-2))*sin(theta) - sqrt(-x^2 - z^2 + 1)*((I*cos(theta) -
 I)*x^2 - I*cos(theta) + I)*z)/(I*x^2 - I)]
 >     [        -((cos(theta) - 1)*sqrt(-x^2 + 1)*x*z^2*sqrt(z^(-2)) -
 I*sqrt(x^2 - 1)*sqrt(-x^2 - z^2 + 1)*sin(theta))*sqrt(z^2)/(sqrt(-x^2 +
 1)*z) -(sqrt(-x^2 + 1)*sqrt(x^2 - 1)*x*z*sqrt(z^(-2))*sin(theta) +
 sqrt(-x^2 - z^2 + 1)*((I*cos(theta) - I)*x^2 - I*cos(theta) + I)*z)/(I*x^2
 - I)
 -(cos(theta) - 1)*z^2 + cos(theta)]
 > **********************************************************************
 > }}}
 >

 I believe this is all related to a change made in how sqrt behaves with
 respect to factors (sqrt(ab) and sqrt(a), sqrt(b)) and whether an I gets
 factored out or not. They all come down to the same essential things:
 {{{
 -(cos(theta) - 1)*sqrt(-x^2 - z^2 + 1)*x
 -((cos(theta) - 1)*sqrt(-x^2 + 1)*sqrt(-x^2 - z^2 + 1)*x*sqrt(z^(-2))
 }}}
 {{{
 - sqrt(z^2)*sin(theta)
 - I*sqrt(x^2 - 1)*sin(theta))*sqrt(z^2)/sqrt(-x^2 + 1)
 }}}
 The latter seems ok immediately (or at least no worse than other decision
 made for us about which root of -1 to choose), but even given that
 $x^2+y^2+z^2=1$, which is asserted earlier in the file, I can't quite make
 out the former. I'll look into this a little more.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8731#comment:29>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to