# How can I eliminate the imaginary part?

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]]]



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]]


FreeQ[%, I]


ComplexExpand[ReIm[expr], TargetFunctions -> {Re, Im}][[2]] //
FullSimplify // N // Chop


returns

0