MATLAB: Simplify symbolic expression with complex, square, sqrt. & Assume commutation in Matlab

assumesymbolic

Hi team
I find some symbolic expression can't be simplified by the simplified by matlab function.
Like this, the long symbolic expression (A ^2)^{1/2} is actually A squared then sqrt. When sqrt operates on the outside, it should return A.
But it didn't simplify this part.
Is it because of A*B \=B*A? Should we assume commutation between symbols?
How could we assume the commutation? Any example would help a lot! Thanks in advance.
Screen Shot 2019-05-13 at 10.47.35 PM.png

Best Answer

(A ^2)^{1/2} Should not return A.
For real values it could return abs(A)
For complex values, A^2 might be a different branch. For example -2i squared is -4 and square root of that is 2i.