Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Your first equation is an approximate solution (the coefficient of x8 is indistinguishable from 1) .

It turns out that your two equations are not equivalent :

sage: var("x8")
x8
sage: Sys=[1.00000000000000*x8 == 0.923879532511287,0.414213562373096*x8 == 0.382683432365089]
sage: Sys[1].solve(x8)[0].rhs()-Sys[0].solve(x8)[0].rhs()
-9631419/1809844328933473637045
sage: (Sys[1].solve(x8)[0].rhs()-Sys[0].solve(x8)[0].rhs()).n()
-5.32168366418327e-15

And Sage is right in telling you that your system has no solution.

Workarounds :

  • Obtain exact values for your systems' coefficients ;

  • solve for one equation, use the second to estimate the error, and decide if you want to accept this as an approximation.

Note, by default, Sage (9.3.beta2) converts your equations' coefficients to rational approximations :

sage: Sys[0].solve(x8)[0].rhs()
15965419/17280845
sage: Sys[1].solve(x8)[0].rhs()
96759049255592/104731240221961

You can obtain floating-point solutions :

sage: (Sys[0].lhs()-Sys[0].rhs()).roots(ring=RR, multiplicities=False)
[0.923879532511287]
sage: (Sys[1].lhs()-Sys[1].rhs()).roots(ring=RR, multiplicities=False)
[0.923879532511283]

And it turns out that, even in the inexact ring RR, your equations are not equivalent.

Your first equation is an approximate solution (the coefficient of x8 is indistinguishable from 1) .

It turns out that your two equations are not equivalent :

sage: var("x8")
x8
sage: Sys=[1.00000000000000*x8 == 0.923879532511287,0.414213562373096*x8 == 0.382683432365089]
sage: Sys[1].solve(x8)[0].rhs()-Sys[0].solve(x8)[0].rhs()
-9631419/1809844328933473637045
sage: (Sys[1].solve(x8)[0].rhs()-Sys[0].solve(x8)[0].rhs()).n()
-5.32168366418327e-15

And Sage is right in telling you that your system has no solution.

Workarounds :

  • Obtain exact values for your systems' coefficients ;

  • solve for one equation, use the second to estimate the error, and decide if you want to accept this as an approximation.approximation. ;

  • treat your system as a system of redundant equations and search for the least-squares solution (left as an exercise for the reader...).

Note, by default, Sage (9.3.beta2) converts your equations' coefficients to rational approximations :

sage: Sys[0].solve(x8)[0].rhs()
15965419/17280845
sage: Sys[1].solve(x8)[0].rhs()
96759049255592/104731240221961

You can obtain floating-point solutions :

sage: (Sys[0].lhs()-Sys[0].rhs()).roots(ring=RR, multiplicities=False)
[0.923879532511287]
sage: (Sys[1].lhs()-Sys[1].rhs()).roots(ring=RR, multiplicities=False)
[0.923879532511283]

And it turns out that, even in the inexact ring RR, your equations are not equivalent.