Ask Your Question
1

how to check algebraic equations?

asked 2017-04-25 12:36:30 +0100

screened00 gravatar image

updated 2017-04-28 11:01:41 +0100

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} $

$ \left\{y : -\frac{f}{3 \, {\left(-\frac{1}{2} \, g + \frac{1}{6} \, \sqrt{\frac{4}{3} \, f^{3} + 9 \, g^{2}}\right)}^{\frac{1}{3}}} + {\left(-\frac{1}{2} \, g + \frac{1}{6} \, \sqrt{\frac{4}{3} \, f^{3} + 9 \, g^{2}}\right)}^{\frac{1}{3}}\right\} $

So I want to check the algebraic equivalence of these two equations step by step, and how I can convert the first equation into the second, as they are both the same.

This is like checking algebra formulas like $(a+b)^2=a^2+b^2+2ab$ If nothing else, i want to just check True or False, just like with numbers, but equations instead.

edit retag flag offensive close merge delete

Comments

latex rendering is not working properly here, but on sagemath software in the text-rich cell the same code works fine, so please understand.

screened00 gravatar imagescreened00 ( 2017-04-25 12:37:36 +0100 )edit

sometimes this is because the backslash is used as escape character: try adding some double backslashes, as in \\left\{ or similar

mforets gravatar imagemforets ( 2017-04-25 12:42:37 +0100 )edit

@mforets I did render it right this time.

screened00 gravatar imagescreened00 ( 2017-04-25 13:28:41 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2017-04-25 20:14:30 +0100

dan_fulea gravatar image

First of all, let us move the fraction $1/6$ from the second formula inside the square root. As $1/36$. Then we get inside $\sqrt[3]{\ \dots\ }$ the following expression. $$ -\frac g2 +\sqrt{\left(\frac g2\right)^2 +\left(\frac f3\right)^3}\ . $$ This is the way i would write the formula.

The second formula is correct.

The first one cannot work.

If the question is how to write sage code that checks that two symbolic algebraic expressions involving radicals inside radicals are, or are not equal - a purely programatic question, then this post is not an answer. If the way the formulas arise is the target, and if the check is / should be combined with the mathematic knowledge, then the following is what i would prefer. (There is also a detail in the choice of the third root in the two terms appearing in the formulas. They have to be correlated. This correlation cannot be explained in a trivial manner to the sage compiler by simply using a code fragment of the shape ( ... )^(1/3) + ( ... )^(1/3) , except we tacitly understand that the product of the cubic roots chosen ( ... )^(1/3)( ... )^(1/3) is fixed. And this is the reason why some textbooks prefer to put the second cubic root in a cumbersome expression.)

First of all, let $\epsilon$ be a primitive third root of unity. We can then factor the expression $$ X^3 + A^3 + B^3 - 3XAB $$ as follows (over $\mathbb Q[A,B;X]$)

var( 'X,A,B' );
factor( X^3 + A^3 + B^3 - 3*A*B*X )

getting

(A^2 - A*B + B^2 - A*X - B*X + X^2)*(A + B + X)

-- and this is enough for our strict purposes, the factor $(X+A+B)$ is enough for the following -- but we can even ``force'' three linear factors after extending the coefficients from $\mathbb Q$ to $\mathbb Q[\epsilon]=\mathbb Q[\sqrt{-3}]$ . The corresponding code is:

F.<e> = CyclotomicField( 3 )
R.<A,B,X> = PolynomialRing( F )
factor( X^3 + A^3 + B^3 - 3*A*B*X )

And the factors are coming with the expected Galois symmetry:

(A + B + X) * (A + (e)*B + (-e - 1)*X) * (A + (-e - 1)*B + (e)*X)

Humanly written: $$ X^3 + A^3 + B^3 - 3XAB = (X+A+B)(X^2+A^2 +B^2-XA-XB-AB) \ .$$ Even better: $$ X^3 + A^3 + B^3 - 3XAB= (X+A+B)(X+\epsilon A+\epsilon^2 B)(X+\epsilon^2 A+\epsilon B)\ . $$ Now we plug in the following symbolic values for $A$ and $B$. Since i hate an excessive use of denominators (in $\LaTeX$), let $G=g/2$ and $F=f/3$. Let $A,B$ be the two values $$ A ,B = -\left(\ - G\pm \sqrt{F^3+G^2}\ \right)^{1/3}\ .$$ Tacit convention: The two cubic roots are taken such that $AB$, constrained to be $$ AB = \left(- G+\sqrt{F^3+G^2}\right)^{1/3}\left(- G-\sqrt{F^3+G^2}\right)^{1/3}$$ $$\qquad = \left(G^2 -(F^3+G^2)\right)^{1/3} = -(F^3)^{1/3}\in{F,\epsilon F,\epsilon^2 F}\ , $$ is de facto exactly $AB=-F$. Then $$ X^3 + A^3 + B^3 - 3XAB = X^3 -\left(- G+\sqrt{F^3+G^2}\right)-\left(- G-\sqrt{F^3+G^2}\right) -3X(-F)=\dots $$ This is $X^3 +3XF+2G = X^3+fX+g$.

The factor $(X+A+B)$ of $X^3+A^3+B^3-3ABX$ exposes the root $-(A+B)$ as in the second posted formula, the correct one. Let us give in sage a particular example:

sage: ( x^3 + 6*x + 2 ).roots( multiplicities=0 )

[1/2*2^(2/3)*(-I*sqrt(3) + 1) - 1/2*2^(1/3)*(I*sqrt(3) + 1),
 1/2*2^(2/3)*(I*sqrt(3) + 1) - 1/2*2^(1/3)*(-I*sqrt(3) + 1),
 -2^(2/3) + 2^(1/3)]

Here, $f=6$, $F=f/3=2$, $g=2$, $G=g/2=1$, then $\sqrt{F^3+G^2}=\sqrt{2^3+1^2}=3$, and we build $-1\pm 3$ and so on.

edit flag offensive delete link more

Comments

@dan_fulea Hi, thx, but I corrected the equation of cubic now. Are they not equal. Also I'd want to check the algebraic equivalence of identities, and other equations using sage, how can I do that?

screened00 gravatar imagescreened00 ( 2017-04-28 11:03:11 +0100 )edit

This is not always simple to check. In the following sense. It sage gets a True for a to-be-equality-relation, than it can prove it and it is true. If not, than it can not. And very often there is a detail that makes the equality false, or interpretable (which is the definition of sqrt for instance?), or not provable with the today knowledge of sage. For instance:

sage: var( 'f,g' );
sage: bool( sqrt( g^2/4 + f^3/27 ) == 1/6 * sqrt( 4/3*f^3 + 9*g^2 ) )
False
sage: bool( sqrt( g^2/4 + f^3/27 )^2 == ( 1/6 * sqrt( 4/3*f^3 + 9*g^2 ) )^2 )
True

The two square roots are in the first boolean eval not equal for sage. Using a pocket calculator, sqrt delivers always Error or a number $\ge 0$. For sage, and for our purposes not. Just plug in ...(more)

dan_fulea gravatar imagedan_fulea ( 2017-04-28 20:47:38 +0100 )edit

@dan_fulea eq1=-1/3f/(-1/2g + 1/6sqrt(4/3f^3 + 9g^2))^(1/3) eq2=-g-sqrt(g2/4+f3/27)(1/3) bool( eq12==eq2*2) I tried with ^6 too and ^3 too, it all returns False, so how do I check it? Any other tricks

screened00 gravatar imagescreened00 ( 2017-04-30 10:18:43 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2017-04-25 12:36:30 +0100

Seen: 826 times

Last updated: Apr 28 '17