From: Roland S. <sal...@gm...> - 2017-07-19 22:11:05
|
> -----Original Message----- > From: Raymond Toy [mailto:toy...@gm...] > Sent: Tuesday, July 18, 2017 9:21 PM > > Here is one way. Take Barton's result: > > c: (sqrt(sqrt(5)+5)*(3*sqrt(2)*sqrt(5)-5*sqrt(2))*%i)/20 > c^2; > ratsimp(sqrt(expand(%))),algebraic; > > => sqrt(5-2*sqrt(5))*%i/sqrt(5) > > The c^2 and expand is a hack to get maxima to multiply the contents of the sqrt together. This really only works > because the imagpart is positive. Otherwise, we probably would have gotten the wrong sign. > True. Unfortunately, my problem consists of 4 such expressions, and two of them are negative imaginary numbers. Take for example the expression -c. The sign is lost. Is there another hack to simplify the general case? Or would I have to write my own routine that memorizes the sign and adjusts it at the end accordingly? PS: Stavros' general algorithm I did not dare to ask about this new situation yet ... Best regards, Roland |