I am a Mathematica user trying to make the switch to Maple, so first of all I apologise if I am making a stupid mistake here. The complete script is attached below.
I have the following line in my script:
b := Trace(map(diff, HermitianTranspose(W), coords) . map(diff, W, coords))
W is a matrix defined earlier in the script. I can provide the context if it would help but I'm not sure if it's relevant to the issue I'm having. The problem is that
simplify(b) assuming real, r>0
gives a vastly different result to
simplify(Trace(map(diff, HermitianTranspose(W), coords) . map(diff, W, coords))) assuming real, r>0
How can this be? What can I do to make Maple simplify the expression correctly?