# Revision history [back]

Here is how you can force sage to simplify roots

x_1=var('x_1')
x_2=var('x_2')
x_3=var('x_3')
t=(sqrt(-x_3 + sqrt(x_1^2 + x_2^2 + x_3^2))*sqrt(x_3 + sqrt(x_1^2 + x_2^2 +
x_3^2))/sqrt(x_2^2/x_1^2 + 1)).maxima_methods().rootscontract().simplify()
view(t)


Here is how you can force sage to simplify roots

x_1=var('x_1')
x_2=var('x_2')
x_3=var('x_3')
t=(sqrt(-x_3 + sqrt(x_1^2 + x_2^2 + x_3^2))*sqrt(x_3 + sqrt(x_1^2 + x_2^2 +
x_3^2))/sqrt(x_2^2/x_1^2 + 1)).maxima_methods().rootscontract().simplify()
view(t)


Here is how you can force sage to simplify roots

x_1=var('x_1')
x_2=var('x_2')
x_3=var('x_3')
var('x_1 x_2 x_3')
t=(sqrt(-x_3 + sqrt(x_1^2 + x_2^2 + x_3^2))*sqrt(x_3 + sqrt(x_1^2 + x_2^2 +
x_3^2))/sqrt(x_2^2/x_1^2 + 1)).maxima_methods().rootscontract().simplify()
view(t)


Here is how you can force sage to simplify roots

var('x_1 x_2 x_3')
t=(sqrt(-x_3 + sqrt(x_1^2 + x_2^2 + x_3^2))*sqrt(x_3 + sqrt(x_1^2 + x_2^2 +
x_3^2))/sqrt(x_2^2/x_1^2 + 1)).maxima_methods().rootscontract().simplify()
view(t)


Edit: If you want to get rid of the last square root use the following code

var('x_1 x_2 x_3')
assume(x_1>0)
t=(sqrt(-x_3 + sqrt(x_1^2 + x_2^2 + x_3^2))*sqrt(x_3 + sqrt(x_1^2 + x_2^2 +
x_3^2))/sqrt(x_2^2/x_1^2 + 1)).maxima_methods().rootscontract().simplify()
view(t)