This is from Question 7 Chapter 7 in Spivak:
How many continuous functions $f$ are there which satisfy $(f(x))^2 = x^2$ for all $x$?
It is clear that
$f(x) = x$
$f(x) = -x$
$f(x) = |x|$
$f(x) = -|x|$
satisfy the conditions but how would you justify that these are the only ones?
Thanks.