So I declare a complex function r[w] and I want to create another function U[w] which is defined by the real part of r[w]. So I try to use the embedded Re[] function but it returns a weird expression.
r[w]=200/(I*w*(10*I*w + 1))
If I do ComplexExpand[r[w]] I get -(2000/(1 + 100 w^2)) - (200 I)/(w (1 + 100 w^2)).
So I know that U[w] should be -(2000/(1 + 100 w^2)).
But the Re[r[w]] function returns 200 Im[1/((1 + 10 I w) w)]. Simplifying this expression by using Simplify[] and FullSimplify[] wouldn’t help (even assuming that w is Real).
So how do I get the real and the imaginary part of my complex function r[w]?
P.S. You may want your original definition to use a “patterned” variable on the left-hand side — either
r[w_] := 200/(I w(10I w + 1))
or
r[w_] = 200/(I w(10I w + 1))
Note also that there is utterly no need for those distracting * symbols between items of a product; just a space between symbols in a product is enough, and when the first of two items in the product is an actual number, you don’t even need a space there. Almost like in printed or handwritten math! The * symbol to denote multiplication is a relic from Fortran and other programming languages as well as from early, dumb “computer-assisted algebra” systems.