First time here? Check out the FAQ!
answered 2022-09-14 12:11:36 +0100
You could try canonicalize_radical:
sage: a = (sqrt(x)/(x+1))^n * (x+1)^n sage: a.canonicalize_radical() x^(1/2*n)