I was wondering whether this following is a good proof:
Question:
Suppose that $f$ and $g$ are continuous functions and that for all $x$ we have $f(x)^2 = g(x)^2$. Suppose also that $f(x) \ne 0$ for all $x$. Prove that either $f(x) = g(x)$ or $f(x) = -g(x)$ for all $x$.
Proof:
Suppose that we have $f(x)^2 = g(x)^2$, $f(x) \ne g(x)$ and $f(x) \ne -g(x)$. Then we see that
$ f(x) \ne g(x) \wedge f(x) \ne -g(x) $ so (remembering that $f(x) \ne 0$ for all $x$) $ f(x)^2 = f(x)f(x) \ne g(x) g(x) = (-g(x))(-g(x)) = g(x)^2$
This is a contradiction, which proves the assertion.