ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 05 May 2017 16:59:28 +0200How to check equations/identities?https://ask.sagemath.org/question/37517/how-to-check-equationsidentities/So, i got a different cubic formula for the depressed equation than that was there in the standard formula from a book.
$y^3+fy+g=0 $ has the solution
$ ({-g+\sqrt {g^2/4+f^3/27} })^{1/3} + ({-g-\sqrt {g^2/4+f^3/27} })^{1/3} $
$ -\frac{f}{3 (-\frac{1}{2}g + \frac{1}{6} \sqrt{\frac{4}{3}f^3+9g^2}) ^{1/3} } == ({-g+\sqrt {g^2/4+f^3/27} })^{1/3} $
How do I check. I want to use sage,not math. In particular the bool() function.Fri, 05 May 2017 12:47:32 +0200https://ask.sagemath.org/question/37517/how-to-check-equationsidentities/Answer by dan_fulea for <p>So, i got a different cubic formula for the depressed equation than that was there in the standard formula from a book.
$y^3+fy+g=0 $ has the solution</p>
<p>$ ({-g+\sqrt {g^2/4+f^3/27} })^{1/3} + ({-g-\sqrt {g^2/4+f^3/27} })^{1/3} $ </p>
<p>$ -\frac{f}{3 (-\frac{1}{2}g + \frac{1}{6} \sqrt{\frac{4}{3}f^3+9g^2}) ^{1/3} } == ({-g+\sqrt {g^2/4+f^3/27} })^{1/3} $</p>
<p>How do I check. I want to use sage,not math. In particular the bool() function.</p>
https://ask.sagemath.org/question/37517/how-to-check-equationsidentities/?answer=37520#post-id-37520Code:
sage: var( 'f,g' );
sage: LHS = - f/3/ ( -g/2 + 1/6*sqrt( 4/3*f^3 + 9*g^2) )^(1/3)
sage: RHS = ( -g/2 - 1/6*sqrt( 4/3*f^3 + 9*g^2) )^(1/3)
sage: bool( LHS == RHS )
False
sage: bool( LHS^3 == RHS^3 )
True
Comments:
If a bool on a to be equality is answered by sage with `False`, this means that the equality is mathematically either false (for instance if we mistype a `g/2` as `g` or a plus as a minus in the formulas for LHS or RHS above), or true, but sage could not prove it in the latter case. In case sage gives us the `True`, then it is really true in mathematics. In our case, sage is giving us the True only after passing to the third power. (And i would do the same mathematically, since without doing this it depends on the implicit choice of the third root for the two places to make the choice. If one correlates the roots, this is ok. But where should sage or i know this?)Fri, 05 May 2017 16:59:28 +0200https://ask.sagemath.org/question/37517/how-to-check-equationsidentities/?answer=37520#post-id-37520