In the following code I wonder how I can force Mathematica to do the squareroots:
In[190]:= ClearAll["`*"] In[191]:= kappaW = (W^2 - M^2)/(2 W); kappaWR = (WR^2 - M^2)/(2 WR); fpiN = Sqrt[1/(2 Pi )* kappaW/q * M/WR* GammapiN/Gammatot^2]; fgammaN = kappaW/kappaWR; Gammagamma = (M/W)^2 Eg^2/Pi M/WR AHel^2; Ampl = A0quer fgammaN * (Gammatot*WR)/(WR^2 - W^2 - I*WR*Gammatot)* fpiN*CpiN; In[197]:= Ampl2 = ComplexExpand[Abs[Ampl]]^2 Out[197]= (A0quer^2 CpiN^2 Sqrt[GammapiN^2] Sqrt[M^2] ((-M^2 + W^2)^2)^(3/2) WR^4)/(4 \[Pi] Sqrt[q^2] (W^2)^( 3/2) Sqrt[WR^2] (-M^2 + WR^2)^2 (Gammatot^2 WR^2 + (-W^2 + WR^2)^2)) I am wondering why in the last statement terms such as Sqrt[M^2] appear? Why does it not evaluate the square root to give M instead? After all, ComplexExpand assumes that all variables are real. Does it have something to do with the sign of the Sqrt ? If so, how can I force it to always use the positive root?
Assuming[M > 0, Simplify@Sqrt[M^2]]. $\endgroup$M, ask for counter-examples, e.g.,FindInstance[Sqrt[M^2] != M, M, Integers, 3]which should lead you to conclude thatSqrt[M^2] == Abs[M]. Or evaluateReduce[{M \[Element] Reals, Sqrt[M^2] == M}]to see thatMmust be nonnegative. $\endgroup$