The question is to prove "If $z+\frac{1}{z}$ is real either Im(z)=0 or |z|=1"
While solving using rectangular form, I get the imaginary part as $y(x^2+y^2)-y$ which is zero $\implies$ either y=0 or $x^2+y^2=1$.
But while solving using Polar form :
$z + \frac{1}{z} = |z| \cos \theta + i|z| \sin \theta + |z| \cos \theta - i|z| \sin \theta $ which is equal to $2 \cos \theta$.
So the imaginary part being $0$ irrespective of $z$ such that $z \neq 0$. Am I doing something wrong, if yes where? if no why do I get different answers?
Let $Z = r[\cos\theta + i\sin\theta]$
then $1/Z = [\cos\theta - i\sin\theta]/r$
Hence $Z + 1/Z = r[\cos\theta + i\sin\theta] + [\cos\theta - i\sin\theta]/r$
This is $[r^2\cos\theta + ir^2\sin\theta + \cos\theta - i\sin\theta]/r$
This is real when $[ir^2\sin\theta - i\sin\theta] = 0$
That is : Either $\sin \theta = 0$ Or $r^2-1=0$
That is : Either $\theta = 0$ (Positive real number) Or $\theta = \pi$ (Negative real number) $\implies$ [ Zero Imaginary Part ]
Or $r=1$ $\implies$ [ Unit Number with Modulus 1 ]
DONE
You had wrong Polar reciprocal , which gave the wrong Conclusion.