Hello. Thanks for the information about *simplify_full()*.
For the use of matrix instead of complexes, I can't do that with my students because they don't know matrices. *Christophe BAL* *Enseignant de mathématiques en Lycée **et développeur Python amateur* *---* *French math teacher in a "Lycée" **and **Python **amateur developer* 2015-01-30 0:28 GMT+01:00 Michael Orlitzky <[email protected]>: > On 01/29/2015 06:14 PM, Christophe Bal wrote: > > Hello. > > > > Indeed, I just want to define complex number via the algebraic form > z=a+i*b. > > > > expr.simplify_real() will be a great tool. I will be patient... > > > > > > It's actually already there, but at moment all you'll get out of it is > abs(x) == sqrt(x^2). It's also safe to call simplify_full() on a real > symbolic variable -- simplify_real() will contain only those > simplifications that *aren't* safe for complex numbers. > > I've tried to do something similar before with multiple real > coefficients; something like z = a + i*b + j*c + ... + k*m. It got ugly > real quick, and depending on the operations I was doing, sage wasn't > always able to group the results by i,j,k, etc. Since you only need two > dimensions, you might try using symbolic matrices containing real > variables instead: > > a + b*i ~ [a, -b] > [b, a] > > You can do complex arithmetic using matrix operations, but you'll always > know that the entries of the matrices are real so you can call > simplify_real/full() on them. > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sage-support. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support. For more options, visit https://groups.google.com/d/optout.
