I am trying to simplify this expression
expr = -2 π Im[(a b (b - l) o)/(k l (b^2 + 4 o^2 π^2))] +
a b (b l + 4 o^2 π^2) Re[1/(b^2 k l + 4 k l o^2 π^2)]
Simplify[Re[expr], Assumptions -> {Element[{o, a, b, k, l}, Reals]}]
which returns
$$a b \left(b l+4 \pi ^2 o^2\right) \Re\left(\frac{1}{b^2 k l+4 \pi ^2 k l o^2}\right)-2 \pi \Im\left(\frac{a b o (b-l)}{k l \left(b^2+4 \pi ^2 o^2\right)}\right).$$
Why is the imaginary part not set to zero, although I have stated that all parameter are real? What am I missing?
ComplexExpand
? $\endgroup$Im
). Since the arguments ofIm
andRe
in your expression are not numeric quantities,Im[a1]
andRe[a2]
do not evaluate to0
anda2
.ComplexExpand
expands expr assuming that all variables are real. (and, it seems, it forces evaluation ofIm[...]
andRe[...]
) $\endgroup$