# Assuming x real, simplifying or refining Im[1/(x+i)] doesn't yield anything

I think it is straightforward from the title,

Simplify[Im[1/(x+I)], x > 0]


spits out,

Im[1/(x+I)]


while I would have liked,

- 1/(x^2+1)


Isn't there any easy way to get this result? I think there should be something simpler than dividing by the complex conjugate of the denominator, simplifying, then multiplying by the conjugate of the denominator and finally simplifying again.

Use ComplexExpand to simplify, assuming variables are real
ComplexExpand[Im[1/(x + I)]]

• Nice, that seems to work well, but that's a shame Simplify or Refine don't do it. – Olivier Massicot Sep 10 '19 at 0:20
• @OlivierMassicot - Evaluate Greater @@ (LeafCount /@ {ComplexExpand[Im[1/(x + I)]], Simplify[Im[1/(x + I)], x > 0]}) and you will see why. ComplexExpand gives you easier control over the form of complex expressions, particularly if you use the option TargetFunctions. – Bob Hanlon Sep 10 '19 at 5:30