1
$\begingroup$

How can I eliminate the imaginary part? It is zero, but Mathematica does not seem to simplify it.

expr = (1/
     10020) E^(-(250000/47) (t + 
        3 I Sqrt[167] t)) (5010 E^(250000/47 (t + 3 I Sqrt[167] t)) + 
     10 (501 - I Sqrt[167]) m + 
     I (2505 I + 799 Sqrt[167] + 400 Sqrt[167] n - 400 Sqrt[167] p) + 
     E^(1500000/47 I Sqrt[167] t) (-2505 - 799 I Sqrt[167] + 5010 m + 
        10 I Sqrt[167] m - 400 I Sqrt[167] n + 400 I Sqrt[167] p));
Assuming[{t \[Element] Reals, m \[Element] Reals, n \[Element] Reals, 
  p \[Element] Reals, t > 0, m > 0, n > 0, p > 0}, 
 FullSimplify[ComplexExpand[expr]]]
 
$\endgroup$
0

2 Answers 2

3
$\begingroup$

Another option is to run ComplexExpand after expanding it on each part

expr = (1/
     10020) E^(-(250000/47) (t + 
        3 I Sqrt[167] t)) (5010 E^(250000/47 (t + 3 I Sqrt[167] t)) + 
     10 (501 - I Sqrt[167]) m + 
     I (2505 I + 799 Sqrt[167] + 400 Sqrt[167] n - 400 Sqrt[167] p) + 
     E^(1500000/47 I Sqrt[167] t) (-2505 - 799 I Sqrt[167] + 5010 m + 
        10 I Sqrt[167] m - 400 I Sqrt[167] n + 400 I Sqrt[167] p));
Simplify[ComplexExpand[#] & /@ Expand[expr]]

Mathematica graphics

FreeQ[%, I]

Mathematica graphics

$\endgroup$
1
$\begingroup$
ComplexExpand[ReIm[expr], TargetFunctions -> {Re, Im}][[2]] // 
   FullSimplify // N // Chop

returns

0

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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