How to make Maple simplify expression like
sqrt( x^(2*a+2) )
to x^(a+1), where x is assumed positive?
The Maple's simplify works only if the constant 'a' is already assigned to a number, otherwise it refuses to simplify it, even if I tell it assume(x>0).
more assumptions
Try this:
simplify(sqrt( x^(2*a+2))) assuming x::positive,a::real;
Or without assumpiton with the symbolic keyword:
simplify(sqrt( x^(2*a+2) ),symbolic);
example
What happens if 0<x<1 and a is nonreal?
For example, when x=0.1 and a=I ?
acer
Complex powers
By definition, x^p = exp(p ln(x)), where Maple uses the principal branch of ln.
So (x^(2*b))^(1/2) = exp(1/2*ln(x^(2*b))) = exp(1/2*ln(exp(2*b*ln(x))))
Now ln(exp(z)) = z + 2*Pi*I*n where n is an integer such that
-Pi < Im(z) + 2*Pi*n <= Pi
i.e. n = floor((1 - Im(z/Pi))/2)
resulting in exp(1/2*ln(exp(z))) = z if n is even, -z if n is odd.
In your case,, with z = 2*b*ln(x) = 2*(a+1)*ln(x), 0 < x < 1,, we get n=0 iff
-Pi/(2*ln(x)) > Im(a) >= Pi/(2*ln(x)). For example, Pi/(2*ln(0.1)) is approximately -.6821881772.
nice
A nice clear analysis, thank you. I kept it short just to illustrate that the expected simplification originally posted need not always hold. (Ie, evaluate both, at the named point.) But giving a result like -Pi/(2*ln(x)) > Im(a) >= Pi/(2*ln(x)) is better.
acer
Thanks, both suggestions
Thanks, both suggestions work.
Real vs. Complex
It seems as if a lot of problems with understanding Maple results (especially for Calculus students) are caused by initial assumption that all variables are complex. A better design (at least in Student versions) probably, would be assuming initially that all the variables are real, and use assumptions if they are complex.
Alec