Prove that if $f^2=g^2$ and $f(x)$ not zero then $f(x)=g(x)$ or $f(x)=-g(x)$ Suppose that $f$ and $g$ are continuous function on $R$ such that $f^2=g^2$ and $f(x)$ not zero. Show that it's either $f(x)=g(x)$ or $f(x)=-g(x)$
I tried to apply the definition of continuous function to $f$ and $g$, but I don't know how to show $f(x)=g(x)$ or $f(x)=-g(x)$ from $f^2=g^2$. I can't just take square root on both sides. 
 A: HINT: The only problem is going from plus to minus.
OK a bit more info.
I fear that you, and, moreover the question, are mixing up $f(x)$ the function with $f(x)$ the real number.
To answer it properly we will rephrase the questions slightly differently.

Suppose that $f$ and $g$ are continuous functions such that $f^2=g^2$,
  $f(x)\neq 0$ for any $x\in\mathbb{R}$. Then show that $g=f$ or $g=-f$.

First we show that continuity is necessary for the result to hold.
Consider $f$ defined by
$$f(x):=\left\{\begin{array}{cc}1&\text{ if }x\geq 0\\ -1&\text{ if }x<0\end{array}\right.$$
Now consider $g$ defined by $g(x)=1$. Now $g^2=f^2$ because $g(x)^2=f(x)^2$ for all $x\in\mathbb{R}$ but the function $g$ is neither equal to the function $+f$ nor $-f$; although for every $x$, $g(x)=\pm f(x)$.
Now this is where continuity comes in. Suppose that $f$ is positive and negative at say $x_+$ and $x_-$. By the Intermediate Value Theorem, $f$ has a root between $x_+$ and $x_-$. But by assumption $f(x)\neq 0$. Therefore $f$, and similarly $g$, are always positive or always negative.
We know that $f^2=g^2$ so there is some point $x_0$ where $f(x_0)=+g(x_0)$ or $f(x_0)=-g(x_0)$. In the first case $f$ and $g$ have the same sign while in the second they differ...
Can you finish it off?
A: Two functions are equal iff they have the same domain, codomain and the same value at each point of the domain. So if $f^2=g^2$ it means that $f^2-g^2=0$ (the zero function).
