Ask Your Question

Revision history [back]

The docstring for rootscontract indicates that there are optional arguments affecting the behavior of the function (radexpand and rootsconmode). These seem not to be available in the Sage wrapper, but may be related to telling Maxima that certain functions are multiplicative and therefore can be "contracted". None of them relate to the conjugate function anyway though.

Maybe Maxima is unwilling to recognize conjugation as multiplicative (e.g. for speed/memory reasons). Since you do know that conjugation is multiplicative, can you apply it after you contract the roots? For example:

x=var('x')
assume(x,'real')
a = (sqrt(-x+1)*sqrt(x+1))
(sqrt(-x+1)*sqrt(x+1))._maxima_().rootscontract()._sage_().conjugate()

conjugate(sqrt(-x^2 + 1))