0
$\begingroup$

My question is how do you determine if two functions are indeed equal. I know $f$ and $g$ will be equal if $f(x) = g(x)$, but how do you determine that for all $x$ values? One could graph to get a good idea, but that still that may only mean they are equal for the $x$ values for the portion of the graph seen and not for all $x$ values.

So for functions like the ones below, it's particularly easy to determine if they are equal just by looking at them, but how do you PROVE they are equal?

$$f: \Bbb Z \rightarrow \Bbb Z, \text{ where } f(x) = x^2$$

$$g: \Bbb Z \rightarrow \Bbb Z, \text{ where } f(x) = \left |x \right |^2$$

Or, for instance, here is another example:

$$f: \Bbb R \times \Bbb R \rightarrow \Bbb R, \text{ where } f(x,y) = \left | x+y \right |$$

$$g: \Bbb R \times \Bbb R \rightarrow \Bbb R, \text{ where } g(x,y) = \left | x \right | +\left | y \right |$$

Again, how do you prove they are equal?

Any advice would be helpful. Thank you so much!

$\endgroup$
  • 1
    $\begingroup$ The second case is false. $f(1,-1)=0\neq 2=g(1,-1)$. $\endgroup$ – lulu Feb 10 '20 at 20:11
  • $\begingroup$ The first one is true because you can prove that $x^2=|x|^2$ for all integers $x$. Sometimes it is also enough to look just at the domains. So $f\colon \Bbb N\rightarrow \Bbb N$ with $f(x)=x^2$ is different from $g\colon \Bbb Z\rightarrow \Bbb N$ with $g(x)=x^2$. $\endgroup$ – Dietrich Burde Feb 10 '20 at 20:11
  • $\begingroup$ For the first case, handle the positive and negative integers separately, and remark that $x^2=(-x)^2$. $\endgroup$ – lulu Feb 10 '20 at 20:12
  • $\begingroup$ As for general strategies, which seems to be what you are asking for, if they happen to be equal, then show that whatever specific $x$ you take that you can show that $f(x)=g(x)$. This might be easier to do by breaking into cases (like your example by looking at negative $x$ separately than non-negative $x$). For proving that they are not equal, you find an example of an $x$ such that $f(x)\neq g(x)$. This will sometimes be spotted by inspection or intuition, but otherwise you might get a clue as to what might work by having tried to prove that they were equal and hitting a wall. $\endgroup$ – JMoravitz Feb 10 '20 at 20:14
  • $\begingroup$ Wouldn't it be possible to prove that by induction? $\endgroup$ – Noctilucente Feb 10 '20 at 20:15
0
$\begingroup$

Going on what lulu has said - For the first case, use proof by contradiction and assume that $\exists k \in \mathbb{Z}$ such that $f(k) \neq g(k)$. Using the definitions of $f$ and $g$:

$$k^2 \neq |k|^2$$

If the two terms are not equal, then the difference between the two is nonzero, or $k^2 - |k|^2 \neq 0$. The expression on the left hand side of the inequality can be factored such that

$$(k - |k|)(k + |k|)$$ must be nonzero. By the definition of absolute value, you will find that this expression can never be nonzero for all $k \in \mathbb{Z}$. Thus, by contradiction, $f(x) = g(x)$ for all $x \in \mathbb{Z}$.

$\endgroup$
  • $\begingroup$ I know thy say "avoid saying thank you," but this did help, so thank you very much, Jacob. $\endgroup$ – kvnr Feb 13 '20 at 2:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.