Question: how I do to obtain the Real part and the Imaginary part of a complex function?

I have this function:

Z := (cos((1/2)*x)-I*sin((1/2)*x))*A0/r^(1/2)+(cos((1/2)*x)+I*sin((1/2)*x))*r^(1/2)*A1+(cos(3*x*(1/2))+I*sin(3*x*(1/2)))*r^(3/2)*A2;

I wanna to obtain another function Y which equal to

Y:=f1*(Re(Z)+Re(Z'))+f2*(Im(Z)+Im(Z'));

where: f1 and f2 are constant 

thanks :)

Please Wait...