Hi,
In my recent calculations for theoretical physics homework I have to do some bigger matrix multiplications. It would be nice if Mathematica could recognize for example Sqrt[b1^2+b2^2+b3^2] as the norm of my vector B or some other name I gave it an advance.
I tried working with Assumptions and (Full-)Simplify but it didn’t help in any way.
Thank you for some help!
Nicolai
Here are some ideas:
myNorm[x_] := \[LeftDoubleBracketingBar]x\[RightDoubleBracketingBar];
sqrtToNorm =
{Sqrt[b1^2 + b2^2 + b3^2] -> myNorm[B],
Sqrt[c1^2 + c2^2 + c3^2] -> myNorm[C]};
normToSqrt = Map[Reverse, sqrtToNorm];
Sqrt[b1^2 + b2^2 + b3^2] +
Sqrt[c1^2 + c2^2 + c3^2] /. sqrtToNorm
% /. normToSqrt
Norm[{b1, b2, b3}] /. Abs -> Identity /.
sqrtToNorm
Sqrt[a^2 + b^2 + c^2] /.
Sqrt[x_^2 + y_^2 + z_^2] :> myNorm[{x, y, z}]