0
$\begingroup$

I have a question regarding the Simplify command in mathematica.

I am working with a 4 x 4 table called Eqs, filled with symbolic expressions. I then do

Together[Eqs - Simplify[Eqs]]

and the output is

{{0.,0,0,0},{0,0.,0,0},{0,0,-((8. (1. (q4^\[Prime])[x]^2-5. x^2 (q4^\[Prime])[x]^2+10.25 x^4 (q4^\[Prime])[x]^2-11. x^6 (q4^\[Prime])[x]^2+6.25 x^8 (q4^\[Prime])[x]^2+1. x^9 (q4^\[Prime])[x]^2-3.5 x^10 (q4^\[Prime])[x]^2+1. x^11 (q4^\[Prime])[x]^2))/((-2.+x^2)^2 (-1.+x^2)^2)),0},{0,0,0,0.}}

Simplify seems not to be working as I thought it should. Why is that?

Edit: Eqs contains the Einstein equations for a certain metric. I used coordinates

{\[Tau], \[Rho], x, \[Phi]}

and as assumptions

$Assumptions =And[\[Tau] \[Element] Reals, \[Phi] > 0, \[Phi] < 2*\[Pi],\[Rho] > 
0, x > 0, x < 1, L > 0] ;

Edit2: Let me post Simplify[Eqs]

{{1/(x (-1.+x^2)^2 q1[x] q2[x] q3[x]) \[Rho]^2 (x q1[x]^2 ((1. -2. x^2+1. x^4) q3[x]+q2[x] (1. +q3[x] (-3.+(-2.+4. x^2-2. x^4) q4[x]^2)))+x q3[x] (q1^\[Prime])[x] ((1. x-1.5 x^3+0.5 x^5) q2[x]+(-0.25+0.625 x^2-0.5 x^4+0.125 x^6) (q1^\[Prime])[x])+q1[x] (q2[x] ((1. x+2. x^3-1. x^5) q3[x]+(0.25 -0.25 x^2) (q1^\[Prime])[x])+x q3[x] ((-0.625 x+1. x^3-0.375 x^5) (q1^\[Prime])[x]+(0.25 -0.625 x^2+0.5 x^4-0.125 x^6) (q1^\[Prime]\[Prime])[x]))),0.,0.,0.},{0.,1/(x (-1.+x^2)^2 \[Rho]^2 q1[x] q2[x] q3[x]) (x q1[x]^2 ((-1.+2. x^2-1. x^4) q3[x]+q2[x] (-1.+q3[x] (3. +(2. -4. x^2+2. x^4) q4[x]^2)))+x q3[x] (q1^\[Prime])[x] ((-1. x+1.5 x^3-0.5 x^5) q2[x]+(0.25 -0.625 x^2+0.5 x^4-0.125 x^6) (q1^\[Prime])[x])+q1[x] (q2[x] ((-1. x-2. x^3+1. x^5) q3[x]+(-0.25+0.25 x^2) (q1^\[Prime])[x])+x q3[x] ((0.625 x-1. x^3+0.375 x^5) (q1^\[Prime])[x]+(-0.25+0.625 x^2-0.5 x^4+0.125 x^6) (q1^\[Prime]\[Prime])[x]))),0.,0.},{0.,0.,-((2. (x^2 q2[x]^2 q3[x]^2 (q1^\[Prime])[x] ((-8. x+16. x^3-10. x^5+2. x^7) q2[x]+(1-3. x^2+3.25 x^4-1.5 x^6+0.25 x^8) (q1^\[Prime])[x])+x^2 q1[x] q2[x]^2 q3[x]^2 ((8. -20. x^2+16. x^4-4. x^6) q2[x]+(8. x-16. x^3+10. x^5-2. x^7) (q1^\[Prime])[x]+x (4. -8. x^2+5. x^4-1. x^6) (q2^\[Prime])[x])+q1[x]^2 (x^2 (-1.5+4.5 x^2-4.875 x^4+2.25 x^6-0.375 x^8) q3[x]^2 (q2^\[Prime])[x]^2+q2[x]^3 ((-2.+4. x^2-2. x^4) q3[x]+x^2 q3[x]^2 (-12.+6. x^2+(-8.+20. x^2-16. x^4+4. x^6) q4[x]^2)+x (-2.+3. x^2-1. x^4) (q3^\[Prime])[x])+q2[x]^2 (x^2 (0.5 -1.5 x^2+1.625 x^4-0.75 x^6+0.125 x^8) (q3^\[Prime])[x]^2+x q3[x] ((1-1.5 x^2+0.5 x^4) (q2^\[Prime])[x]+(2. -3. x^2+x^4) (q3^\[Prime])[x])+q3[x]^2 (2. +16. x^4-16. x^6+4. x^8+x^4 (16. -48. x^2+52. x^4-24. x^6+4. x^8) q4[x]^2+x^3 (-16.+64. x^2-100. x^4+76. x^6-28. x^8+4. x^10) q4[x] (q4^\[Prime])[x]+1. (1. -1. x)^4 x^10 (q4^\[Prime])[x]^2))+x^2 q2[x] q3[x]^2 ((-2.5 x+5.25 x^3-3.5 x^5+0.75 x^7) (q2^\[Prime])[x]+(1-3. x^2+3.25 x^4-1.5 x^6+0.25 x^8) (q2^\[Prime]\[Prime])[x]))))/(x^2 (-2.+x^2)^2 (-1.+x^2)^2 q1[x]^2 q2[x]^2 q3[x]^2)),0.},{0.,0.,0.,1/((-1.+x^2)^2 q1[x] q2[x] q3[x]) (x^2 q2[x] q3[x] ((-4.+2. x^2) q3[x]+x (-2.+4. x^2-2.5 x^4+0.5 x^6) (q3^\[Prime])[x])+q1[x] ((1. -2. x^2+1. x^4) q3[x]^2+x^2 (0.5 -1.5 x^2+1.625 x^4-0.75 x^6+0.125 x^8) (q3^\[Prime])[x]^2+q2[x] (-1. q3[x]+x^2 q3[x]^2 (6. -3. x^2+(4. -10. x^2+8. x^4-2. x^6) q4[x]^2)+x (-0.5+0.75 x^2-0.25 x^4) (q3^\[Prime])[x])+x^2 q3[x] ((1.25 x-2.625 x^3+1.75 x^5-0.375 x^7) (q3^\[Prime])[x]+(-0.5+1.5 x^2-1.625 x^4+0.75 x^6-0.125 x^8) (q3^\[Prime]\[Prime])[x])))}}

Edit3: Eqs is

{{-((3 \[Rho]^2 q1[x])/(1 - x^2)^2) - 2. \[Rho]^2 q1[x] q4[x]^2 - (1/(
16 x (-1 + x^2)^2 q1[x] q2[x]^2 q3[
x]))\[Rho]^2 (-4 x q1[x] + (-1 + x^2) Derivative[1][q1][
x]) (-2 x (-2 + x^2) q2[x] q3[
x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
  q1[x] (4 q2[x]^2 + 
     x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
     q2[x] (4 (-1 - 4 x^2 + 2 x^4) q3[x] - 
        x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) - (1/(
16 x (-1 + x^2)^2 q2[x]^2 q3[
 x]))\[Rho]^2 (-4 x q1[
    x] (-x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
     q2[x] ((8 + 8 x^2 - 4 x^4) q3[x] + 
        x (2 - 3 x^2 + x^4) Derivative[1][q3][x])) + (-1 + 
     x^2) (-16 x (-1 + x^2) q2[x]^2 q3[x] - 
     x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q1][x] Derivative[1][
       q2][x] + 
     q2[x] (x (2 - 3 x^2 + x^4) Derivative[1][q1][x] Derivative[
          1][q3][x] + 
        2 q3[x] ((2 + 11 x^2 - 5 x^4) Derivative[1][q1][x] + 
           x (2 - 3 x^2 + x^4) (q1^\[Prime]\[Prime])[x])))), 0., 
0., 0.}, {0., (3 q1[x])/((1 - x^2)^2 \[Rho]^2) + (
2. q1[x] q4[x]^2)/\[Rho]^2 - (1/(
16 x (-1 + x^2)^2 \[Rho]^2 q1[x] q2[x]^2 q3[
 x]))(-4 x q1[x] + (-1 + x^2) Derivative[1][q1][
    x]) (2 x (-2 + x^2) q2[x] q3[
    x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
  q1[x] (-4 q2[x]^2 - 
     x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
     q2[x] ((4 + 16 x^2 - 8 x^4) q3[x] + 
        x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) + (1/(
 16 x (-1 + x^2)^2 \[Rho]^2 q2[x]^2 q3[
 x]))(-4 x q1[
   x] (-x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
    q2[x] ((8 + 8 x^2 - 4 x^4) q3[x] + 
       x (2 - 3 x^2 + x^4) Derivative[1][q3][x])) + (-1 + 
    x^2) (-16 x (-1 + x^2) q2[x]^2 q3[x] - 
    x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q1][x] Derivative[1][
      q2][x] + 
    q2[x] (x (2 - 3 x^2 + x^4) Derivative[1][q1][x] Derivative[1][
         q3][x] + 
       2 q3[x] ((2 + 11 x^2 - 5 x^4) Derivative[1][q1][x] + 
          x (2 - 3 x^2 + x^4) (q1^\[Prime]\[Prime])[x])))), 0., 
0.}, {0., 
0., (12 q2[x])/((1 - x^2)^2 (2 - x^2)) + (8. q2[x] q4[x]^2)/(
 2 - x^2) - 
2 (2 x q4[x] + (-1 + x^2) Derivative[1][q4][
    x])^2 + (2 x (-2 + x^2) (-1 + x^2)^2 q2[x] q3[x]^2 Derivative[
    1][q1][x]^2 - 
  2 x (-1 + x^2) q1[x] q3[
    x]^2 (-(2 - 3 x^2 + x^4) Derivative[1][q1][x] Derivative[1][
       q2][x] + 
     2 q2[x] (-x (-3 + x^2) Derivative[1][q1][
          x] + (2 - 3 x^2 + x^4) (q1^\[Prime]\[Prime])[x])) + 
  q1[x]^2 ((-1 + x^2) q3[x] Derivative[1][q2][
       x] ((4 + 16 x^2 - 8 x^4) q3[x] + 
        x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
     q2[x] (48 x q3[x]^2 + 
        x (-2 + x^2) (-1 + x^2)^2 Derivative[1][q3][x]^2 - 
        2 (-1 + x^2) q3[
          x] ((4 - 5 x^2 + 3 x^4) Derivative[1][q3][x] + 
           x (2 - 3 x^2 + x^4) (q3^\[Prime]\[Prime])[
             x]))))/(4 x (-2 + x^2) (-1 + x^2)^2 q1[x]^2 q2[x] q3[
   x]^2) - (-x q1[x] q3[
    x] ((10 x - 6 x^3) q2[x] + (2 - 3 x^2 + x^4) Derivative[1][
       q2][x]) (-2 x (-2 + x^2) q2[x] q3[
       x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
     q1[x] (4 q2[x]^2 + 
        x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 

        q2[x] (4 (-1 - 4 x^2 + 2 x^4) q3[x] - 
           x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) + 
  2 (2 x^2 (-2 + x^2)^2 (-1 + x^2) q2[x]^2 q3[x]^2 Derivative[1][
       q1][x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) - 
     2 x^2 (-2 + x^2)^2 q1[x] q2[x]^2 q3[
       x]^2 (-4 (1 + x^2) q2[
          x] + (-1 + 
           x^2) (4 x Derivative[1][q2][x] + (-1 + x^2) (
             q1^\[Prime]\[Prime])[x])) + 
     q1[x]^2 (-x^2 (2 - 3 x^2 + x^4)^2 q3[x]^2 Derivative[1][q2][
          x]^2 - 4 q2[
          x]^3 ((2 - 9 x^2 + 5 x^4) q3[x] + 
           x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
        x^2 (2 - 3 x^2 + x^4)^2 q2[x] q3[x]^2 (
          q2^\[Prime]\[Prime])[x] + 
        q2[x]^2 ((8 - 68 x^2 + 20 x^4 + 24 x^6 - 8 x^8) q3[x]^2 + 
           x^2 (2 - 3 x^2 + x^4)^2 Derivative[1][q3][x]^2 + 
           x (2 - 3 x^2 + x^4) q3[
             x] (4 Derivative[1][q2][x] - 
              x (2 - 3 x^2 + x^4) (q3^\[Prime]\[Prime])[
                x])))))/(4 x^2 (-2 + x^2)^2 (-1 + x^2)^2 q1[
   x]^2 q2[x]^2 q3[x]^2), 0.}, {0., 0., 
 0., (3 x^2 (2 - x^2) q3[x])/(1 - x^2)^2 + 
 2. x^2 (2 - x^2) q3[x] q4[x]^2 - (1/(
 16 (-1 + x^2)^2 q1[x] q2[x]^2 q3[
 x]))(4 q3[x] + 
  x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) (-2 x (-2 + x^2) q2[
    x] q3[x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
  q1[x] (4 q2[x]^2 + 
     x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
     q2[x] (4 (-1 - 4 x^2 + 2 x^4) q3[x] - 
        x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) - (1/(
 16 (-1 + x^2)^2 q1[x] q2[x]^2 q3[x]))
 x (-2 + x^2) (2 (-1 + x^2) q2[x] q3[x] Derivative[1][q1][
    x] (4 q3[x] + x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
  q1[x] (-(-1 + x^2) q3[x] Derivative[1][q2][
       x] (4 q3[x] + x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
     q2[x] (-48 x q3[x]^2 - 
        x (-2 + x^2) (-1 + x^2)^2 Derivative[1][q3][x]^2 + 
        2 (-1 + x^2) q3[
          x] ((4 + 3 x^2 - x^4) Derivative[1][q3][x] + 
           x (2 - 3 x^2 + x^4) (q3^\[Prime]\[Prime])[x]))))}}

Sorry for the mess.

$\endgroup$
17
  • 3
    $\begingroup$ It's impossible to say what's going on if you don't post what Eqs originally was. But one guess is that you have set $Assumptions somewhere and that can make Simplify produce different results. So in other words, please post the least squre matrix Eqs that reproduces the problem... $\endgroup$
    – Jens
    Commented Mar 26, 2015 at 18:35
  • $\begingroup$ Thank you, I changed the question accordingly. $\endgroup$ Commented Mar 26, 2015 at 19:13
  • $\begingroup$ So does this mean that your question is answered? Otherwise, more information is needed. $\endgroup$
    – Jens
    Commented Mar 26, 2015 at 19:35
  • $\begingroup$ Hi, my question isn't answered, of course. But since I'm a novice to mathematica it isn't easy for me to understand exactly how much information is needed. Thanks for your interest, though. $\endgroup$ Commented Mar 26, 2015 at 19:43
  • 1
    $\begingroup$ You still need to to post the original Eqs rather than Simplify[Eqs] so that we can determine what the actual issue is. $\endgroup$
    – Bob Hanlon
    Commented Mar 27, 2015 at 0:09

1 Answer 1

1
$\begingroup$

The issue arises due to numerical rounding differences between the expression and its simplified form. If you Rationalize the original expression you will get the expected results.

Eqs = {{-((3 \[Rho]^2 q1[x])/(1 - x^2)^2) - 
      2. \[Rho]^2 q1[
        x] q4[x]^2 - (1/(16 x (-1 + x^2)^2 q1[x] q2[x]^2 q3[
            x])) \[Rho]^2 (-4 x q1[x] + (-1 + x^2) Derivative[1][q1][
           x]) (-2 x (-2 + x^2) q2[x] q3[
           x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
         q1[x] (4 q2[x]^2 + x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
            q2[x] (4 (-1 - 4 x^2 + 2 x^4) q3[x] - 
               x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) - (1/(16 x (-1 + 
              x^2)^2 q2[x]^2 q3[x])) \[Rho]^2 (-4 x q1[
           x] (-x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
            q2[x] ((8 + 8 x^2 - 4 x^4) q3[x] + 
               x (2 - 3 x^2 + x^4) Derivative[1][q3][x])) + (-1 + 
            x^2) (-16 x (-1 + x^2) q2[x]^2 q3[x] - 
            x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q1][x] Derivative[1][q2][
              x] + q2[x] (x (2 - 3 x^2 + x^4) Derivative[1][q1][
                 x] Derivative[1][q3][x] + 
               2 q3[x] ((2 + 11 x^2 - 5 x^4) Derivative[1][q1][x] + 
                  x (2 - 3 x^2 + x^4) q1''[x])))), 0., 0., 
     0.}, {0., (3 q1[x])/((1 - x^2)^2 \[Rho]^2) + (2. q1[
          x] q4[
           x]^2)/\[Rho]^2 - (1/(16 x (-1 + x^2)^2 \[Rho]^2 q1[x] q2[x]^2 q3[
            x])) (-4 x q1[x] + (-1 + x^2) Derivative[1][q1][
           x]) (2 x (-2 + x^2) q2[x] q3[
           x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
         q1[x] (-4 q2[x]^2 - x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
            q2[x] ((4 + 16 x^2 - 8 x^4) q3[x] + 
               x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) + (1/(16 x (-1 + 
              x^2)^2 \[Rho]^2 q2[x]^2 q3[x])) (-4 x q1[
           x] (-x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
            q2[x] ((8 + 8 x^2 - 4 x^4) q3[x] + 
               x (2 - 3 x^2 + x^4) Derivative[1][q3][x])) + (-1 + 
            x^2) (-16 x (-1 + x^2) q2[x]^2 q3[x] - 
            x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q1][x] Derivative[1][q2][
              x] + q2[x] (x (2 - 3 x^2 + x^4) Derivative[1][q1][
                 x] Derivative[1][q3][x] + 
               2 q3[x] ((2 + 11 x^2 - 5 x^4) Derivative[1][q1][x] + 
                  x (2 - 3 x^2 + x^4) q1''[x])))), 0., 0.}, {0., 
     0., (12 q2[x])/((1 - x^2)^2 (2 - x^2)) + (8. q2[x] q4[x]^2)/(2 - x^2) - 
      2 (2 x q4[x] + (-1 + x^2) Derivative[1][q4][x])^2 + (2 x (-2 + 
            x^2) (-1 + x^2)^2 q2[x] q3[x]^2 Derivative[1][q1][x]^2 - 
         2 x (-1 + x^2) q1[
           x] q3[x]^2 (-(2 - 3 x^2 + x^4) Derivative[1][q1][
              x] Derivative[1][q2][x] + 
            2 q2[x] (-x (-3 + x^2) Derivative[1][q1][
                 x] + (2 - 3 x^2 + x^4) q1''[x])) + 
         q1[x]^2 ((-1 + x^2) q3[x] Derivative[1][q2][
              x] ((4 + 16 x^2 - 8 x^4) q3[x] + 
               x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
            q2[x] (48 x q3[x]^2 + 
               x (-2 + x^2) (-1 + x^2)^2 Derivative[1][q3][x]^2 - 
               2 (-1 + x^2) q3[
                 x] ((4 - 5 x^2 + 3 x^4) Derivative[1][q3][x] + 
                  x (2 - 3 x^2 + x^4) q3''[x]))))/(4 x (-2 + 
           x^2) (-1 + x^2)^2 q1[x]^2 q2[
          x] q3[x]^2) - (-x q1[x] q3[
           x] ((10 x - 6 x^3) q2[x] + (2 - 3 x^2 + x^4) Derivative[1][q2][
              x]) (-2 x (-2 + x^2) q2[x] q3[
              x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
            q1[x] (4 q2[x]^2 + 
               x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
               q2[x] (4 (-1 - 4 x^2 + 2 x^4) q3[x] - 
                  x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) + 
         2 (2 x^2 (-2 + x^2)^2 (-1 + x^2) q2[x]^2 q3[x]^2 Derivative[1][q1][
              x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) - 
            2 x^2 (-2 + x^2)^2 q1[
              x] q2[x]^2 q3[
               x]^2 (-4 (1 + x^2) q2[
                 x] + (-1 + 
                  x^2) (4 x Derivative[1][q2][x] + (-1 + x^2) q1''[x])) + 
            q1[x]^2 (-x^2 (2 - 3 x^2 + x^4)^2 q3[x]^2 Derivative[1][q2][
                  x]^2 - 4 q2[x]^3 ((2 - 9 x^2 + 5 x^4) q3[x] + 
                  x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
               x^2 (2 - 3 x^2 + x^4)^2 q2[x] q3[x]^2 q2''[x] + 
               q2[x]^2 ((8 - 68 x^2 + 20 x^4 + 24 x^6 - 8 x^8) q3[x]^2 + 
                  x^2 (2 - 3 x^2 + x^4)^2 Derivative[1][q3][x]^2 + 
                  x (2 - 3 x^2 + x^4) q3[
                    x] (4 Derivative[1][q2][x] - 
                    x (2 - 3 x^2 + x^4) q3''[x])))))/(4 x^2 (-2 + x^2)^2 (-1 +
             x^2)^2 q1[x]^2 q2[x]^2 q3[x]^2), 0.}, {0., 0., 
     0., (3 x^2 (2 - x^2) q3[x])/(1 - x^2)^2 + 
      2. x^2 (2 - x^2) q3[
        x] q4[x]^2 - (1/(16 (-1 + x^2)^2 q1[x] q2[x]^2 q3[x])) (4 q3[x] + 
         x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) (-2 x (-2 + x^2) q2[x] q3[
           x] (4 x q2[x] + (-1 + x^2) Derivative[1][q1][x]) + 
         q1[x] (4 q2[x]^2 + x (2 - 3 x^2 + x^4) q3[x] Derivative[1][q2][x] + 
            q2[x] (4 (-1 - 4 x^2 + 2 x^4) q3[x] - 
               x (2 - 3 x^2 + x^4) Derivative[1][q3][x]))) - (1/(16 (-1 + 
              x^2)^2 q1[x] q2[x]^2 q3[x])) x (-2 + 
         x^2) (2 (-1 + x^2) q2[x] q3[x] Derivative[1][q1][
           x] (4 q3[x] + x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
         q1[x] (-(-1 + x^2) q3[x] Derivative[1][q2][
              x] (4 q3[x] + x (2 - 3 x^2 + x^4) Derivative[1][q3][x]) + 
            q2[x] (-48 x q3[x]^2 - 
               x (-2 + x^2) (-1 + x^2)^2 Derivative[1][q3][x]^2 + 
               2 (-1 + x^2) q3[
                 x] ((4 + 3 x^2 - x^4) Derivative[1][q3][x] + 
                  x (2 - 3 x^2 + x^4) q3''[x]))))}} // Rationalize;

With the rationalized form:

Together[Eqs - Simplify[Eqs]]

{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}

Simplify[Eqs - Simplify[Eqs]]

{{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}

$\endgroup$
1
  • $\begingroup$ Yeah I suspected a floating-point issue as well but haven't nailed it down yet. +1! The cause of all this is 8. in Eqs[[3, 3]]. Rather than Rationalize @LeastSquare could just change this to 8. $\endgroup$
    – Taiki
    Commented Mar 27, 2015 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.