I'm trying to take absolute value squared of certain objects. Say I have
y=alpha
and I know that |alpha|^2 = alpha*Conjugate[alpha].
How do I take Abs[y]^2 without assigning a numerical value to alpha in mathematica?
I'm trying to take absolute value squared of certain objects. Say I have
y=alpha
and I know that |alpha|^2 = alpha*Conjugate[alpha].
How do I take Abs[y]^2 without assigning a numerical value to alpha in mathematica?
y[alpha_] := Abs[alpha]^2
ComplexExpand[y[a - I*b]]
a^2 + b^2
Clear[alpha]; Abs[alpha]^2 // ComplexExpand[#, {alpha}] &
orAbs[alpha]^2 // ComplexExpand[#, {alpha}, TargetFunctions -> Conjugate] &
$\endgroup$ – Bob Hanlon Apr 8 at 23:15