Sqrt[a^2 b^2]
- To: mathgroup@smc.vnet.net
- Subject: [mg11342] Sqrt[a^2 b^2]
- From: "Klaus B\vcker" <kboecker@physik.tu-muemchen.de>
- Date: Fri, 6 Mar 1998 00:41:01 -0500
- Organization: [posted via] Leibniz-Rechenzentrum, Muenchen (Germany)
Hallo, in many physical calculations you have positive and real valued variabels e.g. a and b. On the other hand there are more general variables, i.g c and d, which can be positive and negative, but also real valued. Now imagine the result of of a calculation, done within Mathematica, is of the form Sqrt[a^2 b^2 c^2 d^2]. How can I force Mathematica to write it in way every mathematician would do it, i.e. a b Sqrt[c^2 d^2] ? The same problem in disguise, is the result Sqrt[(a + b +1)^2], that can be simplified to a + b +1, because a+b+1 is always positive, assumed a and b are so. The function PowerExpand is no solution, because it expands all powers, also if the variable may be negative. Klaus Boecker e-mail: kboecker@physik.tu-muenchen.de