I was reading a solution and there they have used a thing related to continuity which I don't understand and I quote here - this shows that either f(x)=1 or f(x)=-1 for each x..but continuity of f shows that f(x) is either identically equal to 1 or -1 ( here f is continuous)
WHY
I think this is enough details to clarify my doubts ..but if someone need more details then pls ask ..
Kindly pls someone help me... Thankyou very much
If $f$ is continuous and its domain $D$ is an interval, then, if there is a $x\in D$ such that $f(x)=1$ and if there is a $y\in D$ such that $f(y)=-1$ them by the intermediate value theorem, for each $c\in[-1,1]$, there is some $z\in D$ such that $f(z)=c$. So, since $f$ only take the values $\pm1$, $f$ must always take the value $1$ or only take the value $-1$.