(e + I y - 3 (f + I z) + 3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 +
Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f +
I (1 + z))^2] + I (e + f +
I (y + z))^2 + (4 (-1 + 3 I e - I f + (e + I y)^2 -
3 y + (e + I y) (f + I z) - (f + I z)^2 + z)^2)/(e + I y -
3 (f + I z) + 3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 +
Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f +
I (1 + z))^2] + I (e + f + I (y + z))^2))/(2 (-1 + 3 I e -
I f + (e + I y)^2 - 3 y + (e + I y) (f + I z) - (f + I z)^2 + z))
I know it is real (I proved that), but using Simplify or FullSimplify there are still imaginary units. Using ComplexExpand, too. What is commend which I should use to reduct imaginary units? I am not well-experienced, so I don’t know how do this.
However, for at least one set of values, the expression is complex:
In[1]:= expr = (e + I y - 3 (f + I z) +
3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 +
Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f +
I (1 + z))^2] +
I (e + f +
I (y + z))^2 + (4 (-1 + 3 I e - I f + (e + I y)^2 -
3 y + (e + I y) (f + I z) - (f + I z)^2 + z)^2)/(e + I y -
3 (f + I z) +
3 (e + I y)^2 (f + I z) - (e + I y) (f + I z)^2 +
Sqrt[5] Sqrt[(e + I (1 + y))^2 (e - f + I (y - z))^2 (f +
I (1 + z))^2] + I (e + f + I (y + z))^2))/(2 (-1 +
3 I e - I f + (e + I y)^2 -
3 y + (e + I y) (f + I z) - (f + I z)^2 + z));
In[2]:= expr /. {e -> 1, f -> 1, y -> 1, z -> 1}
Out[2]= 3/2 + I/2
You’re right! Now I understand why it doesn’t work.
y = Sqrt[1-e^2]
z = Sqrt[1-f^2]
In addition e, f are elements of (-1,1).
Now it should work, I’ve forgot that I made all formulas for this assumptions (and I didn’t know how implement them in Mathematica)
Thanks, Jofre Espigule and David Keth