2
$\begingroup$

How can I get a simplify expression of following when all a,b, .., f are real numbers?

FullSimplify[Abs[(a+I b)+(c+I d)(e+I f)]^2]
$\endgroup$
3
  • 2
    $\begingroup$ Use ComplexExpand. $\endgroup$ Commented Jan 18, 2018 at 22:28
  • $\begingroup$ Thanks @HenrikSchumacher $\endgroup$
    – Frey
    Commented Jan 18, 2018 at 22:32
  • $\begingroup$ You're welcome! $\endgroup$ Commented Jan 18, 2018 at 22:53

2 Answers 2

1
$\begingroup$

PowerExpand also works in this case:

FullSimplify[PowerExpand[Abs[(a + I b) + (c + I d) (e + I f)]^2], 
  Assumptions -> Element[{a, b, c, d, e, f}, Reals]]

$(b+d e+c f)^2+(a+c e-d f)^2$

$\endgroup$
0
$\begingroup$
FullSimplify@Assuming[{a, b, c, d, e, f} \[Element] Reals,
  ComplexExpand[Abs[(a + I b) + (c + I d) (e + I f)]^2]]

$a^2+2 a (c e-d f)+b^2+2 b (c f+d e)+\left(c^2+d^2\right) \left(e^2+f^2\right)$

$\endgroup$
1
  • $\begingroup$ By default, ComplexExpand will assume that all variables are real. Consequently, the simpler FullSimplify@ComplexExpand[Abs[(a + I b) + (c + I d) (e + I f)]^2] is equivalent to your proposed solution. Further, you will get the same result with Simplify in the place of FullSimplify $\endgroup$
    – Bob Hanlon
    Commented Jan 19, 2018 at 5:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.