# Show $(\forall x\in I)\quad f(x)=1 \quad \mbox{or} \quad (\forall x\in I)\quad f(x)=-1$ [closed]

Let $I$ be an interval of $\mathbb{R}$ and $f$ a continuous function defined from I to $\mathbb{R}$ such that: $$(\forall x\in I)\quad (f(x))^{2}=1$$

Show that : $(\forall x\in I)\quad f(x)=1 \quad \mbox{or} \quad (\forall x\in I)\quad f(x)=-1$

## closed as off-topic by Martin R, TheSimpliFire, Mostafa Ayaz, A. Goodier, Ove AhlmanMar 1 '18 at 11:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please improve the question by providing additional context, which ideally includes your thoughts on the problem and any attempts you have made to solve it. This information helps others identify where you have difficulties and helps them write answers appropriate to your experience level." – Martin R, TheSimpliFire, Mostafa Ayaz, A. Goodier, Ove Ahlman
If this question can be reworded to fit the rules in the help center, please edit the question.

• Hint: Proof by contradiction and use Intermediate value theorem to find a root of $f$ in $I$, contradicting the condition $f^2(x) = 1$. – GNUSupporter 8964民主女神 地下教會 Feb 28 '18 at 12:43
• So your $f^2(x)$ is the iterated application $f(f(x))$, not $f(x)$ squared? – In that case the statement would be wrong. – Martin R Feb 28 '18 at 12:44

I think that $f^2(x)$ means $(f(x))^2$ and not $f(f(x))$.
Suppose to the contrary, that there are $u,v \in I$ such that $f(u)=-1$ and $f(v)=1$. The intermediate value theorem gives now a point $w \in I$ with $f(w)=0$, hence
$$0 =f^2(w)=1,$$