1
$\begingroup$

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.

  • 0
    The domain of $f$ and $g$ should be stated. Presumably both are defined and continuous on the entire real line? Connectedness of the domain suffices.2012-12-04

1 Answers 1

2

You should be immediately suspicious of your argument, because it doesn’t use the continuity of $f$ and $g$. What if $f(x)=1$ for all $x\in\Bbb R$, and $g(x)=\begin{cases}-1,&\text{if }x<0\\1,&\text{if }x\ge 0\;?\end{cases}$

Then $f^2=g^2$, but $f$ is neither $g$ nor $-g$. Of course it’s also true that $g$ is not continuous, but you didn’t use continuity in your argument, so if your argument were correct, this example couldn’t exist.

The real point of the exercise is to show that if $f$ and $g$ are continuous, you can’t have an example like this in which $f(x)=g(x)$ at some points $x$ and $f(x)=-g(x)$ at other points $x$.

HINT: If $f$ is continuous and never $0$, then by the intermediate value theorem either $f$ is strictly positive, or $f$ is strictly negative.

  • 0
    @providence: You’re welcome.2012-12-04