#11934: Symbolic simplification error
-------------------------+--------------------------------------------------
   Reporter:  mjo        |          Owner:  burcin    
       Type:  defect     |         Status:  new       
   Priority:  major      |      Milestone:  sage-4.7.3
  Component:  symbolics  |       Keywords:            
Work_issues:             |       Upstream:  N/A       
   Reviewer:             |         Author:            
     Merged:             |   Dependencies:            
-------------------------+--------------------------------------------------

Old description:

> I ran into this today with a real function. Sorry I don't have a shorter
> test case. The attached file should show a simplification which, as far
> as I can tell, is invalid.

New description:

 I ran into this today with a real function. Sorry I don't have a shorter
 test case. The attached file should show a simplification which, as far as
 I can tell, is invalid.

 {{{
 sage: f = QQ(0.25)*(sqrt(2) - 2)*(x + 1)*x**3 - QQ(3)/QQ(8)*(sqrt(2) -
 2)*(x + 1)*x**2 - QQ(0.25)*(sqrt(2) - 2)*(2*(3*sqrt(2) - 2)*x**2 -
 2*(sqrt(2) - 1)*x + sqrt(-8*(4*sqrt(2) - 7)*x**4 + 16*(3*sqrt(2) - 5)*x**3
 - 8*(2*sqrt(2) - 3)*x - 4*x**2 + 4) - 4*sqrt(2) + 2)*x**3/(sqrt(2)*x**2 +
 sqrt(2)*x - 2*sqrt(2)) - 1/24*(x + 1)**3*(x**3 - 3*x + 2) +
 QQ(3)/QQ(8)*(sqrt(2) - 2)*(2*(3*sqrt(2) - 2)*x**2 - 2*(sqrt(2) - 1)*x +
 sqrt(-8*(4*sqrt(2) - 7)*x**4 + 16*(3*sqrt(2) - 5)*x**3 - 8*(2*sqrt(2) -
 3)*x - 4*x**2 + 4) - 4*sqrt(2) + 2)*x**2/(sqrt(2)*x**2 + sqrt(2)*x -
 2*sqrt(2)) - QQ(1)/QQ(16)*(x + 1)**2*(2*(sqrt(2) - 3)*x**3 - (3*sqrt(2) -
 8)*x**2 + 2*x + sqrt(2) - 4) + QQ(1)/QQ(8)*(x + 1)*sqrt(2) +
 QQ(1)/QQ(96)*(x**3 - 3*x + 2)*(2*(3*sqrt(2) - 2)*x**2 - 2*(sqrt(2) - 1)*x
 + sqrt(-8*(4*sqrt(2) - 7)*x**4 + 16*(3*sqrt(2) - 5)*x**3 - 8*(2*sqrt(2) -
 3)*x - 4*x**2 + 4) - 4*sqrt(2) + 2)**3/(sqrt(2)*x**2 + sqrt(2)*x -
 2*sqrt(2))**3 + 1/32*(2*(3*sqrt(2) - 2)*x**2 - 2*(sqrt(2) - 1)*x +
 sqrt(-8*(4*sqrt(2) - 7)*x**4 + 16*(3*sqrt(2) - 5)*x**3 - 8*(2*sqrt(2) -
 3)*x - 4*x**2 + 4) - 4*sqrt(2) + 2)**2*(2*(sqrt(2) - 3)*x**3 - (3*sqrt(2)
 - 8)*x**2 + 2*x + sqrt(2) - 4)/(sqrt(2)*x**2 + sqrt(2)*x - 2*sqrt(2))**2 -
 QQ(0.25)*x - QQ(1)/QQ(8)*(2*(3*sqrt(2) - 2)*x**2 - 2*(sqrt(2) - 1)*x +
 sqrt(-8*(4*sqrt(2) - 7)*x**4 + 16*(3*sqrt(2) - 5)*x**3 - 8*(2*sqrt(2) -
 3)*x - 4*x**2 + 4) - 4*sqrt(2) + 2)*sqrt(2)/(sqrt(2)*x**2 + sqrt(2)*x -
 2*sqrt(2)) + QQ(0.25)*(2*(3*sqrt(2) - 2)*x**2 - 2*(sqrt(2) - 1)*x +
 sqrt(-8*(4*sqrt(2) - 7)*x**4 + 16*(3*sqrt(2) - 5)*x**3 - 8*(2*sqrt(2) -
 3)*x - 4*x**2 + 4) - 4*sqrt(2) + 2)/(sqrt(2)*x**2 + sqrt(2)*x - 2*sqrt(2))
 - QQ(0.25)
 sage: f.full_simplify()
 -1/24*(sqrt(2)*x^8 - 2*(sqrt(2) - 3)*x^7 - (14*sqrt(2) - 15)*x^6 +
 10*(9*sqrt(2) - 13)*x^5 - (93*sqrt(2) - 128)*x^4 - 4*(9*sqrt(2) - 14)*x^3
 + (58*sqrt(2) - 77)*x^2 + 4*(sqrt(2) - 2)*x - sqrt(2*(4*sqrt(2) - 7)*x^2 +
 4*(sqrt(2) - 2)*x - 1)*((16*I*sqrt(2) - 28*I)*x^4 + (-24*I*sqrt(2) +
 40*I)*x^3 + (8*I*sqrt(2) - 12*I)*x + 2*I*x^2 - 2*I) - 8*sqrt(2) +
 10)/(sqrt(2)*x^2 + 4*sqrt(2)*x + 4*sqrt(2))
 }}}

--

Comment(by kcrisman):

 Can you be more specific about the invalidity?    I think the plot errors
 are because of the imaginary pieces.  Remember, these simplifications are
 not supposed to be 100 percent valid at all times; especially with roots
 there are branch issues, unfortunately.  The `f` in question is pretty
 long - any sense as to where it might simplify in an unusual way?

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11934#comment:1>
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