# Simplifying a simple rational expression with indeterminate exponent

((sqrt(x)/(x+1))^n * (x+1)^n).simplify_full () returns the given expression as-is, but evidently it should be simplified to sqrt(x)^n. Sage indeed does this if the x+1 is replaced by x or n by a concrete number like 10 (illustrating that sage isn't worried about division by zero, but it's something else). Is there a way to have sage simplify this?

edit retag close merge delete

1

Try canonicalize_radical:

sage: a = (sqrt(x)/(x+1))^n * (x+1)^n
x^(1/2*n)


@Juanjo : you should make an answer of your comment, for the benefit of future ask.sagemath.org perusers.

Sort by » oldest newest most voted You could try canonicalize_radical:

sage: a = (sqrt(x)/(x+1))^n * (x+1)^n
x^(1/2*n)

more

That solves it! Thanks. Makes me wonder why simplify_"full" wouldn't do it for me, though.

Because simplify_full applies, in order, the methods simplify_factorial, simplify_rectform, simplify_trig, simplify_rational and expand_sum, neither of which produces the desired effect on the symbolic expression.

What I'm saying is that I wish something like canonicalize_radical was among that list. I'm sure there are good reasons for its exclusion, but still, having to know specialized simplifiers for such an elementary rewrite is a bit frustrating.