5

How a function which is not defined for some value can be equal to a function which is defined for the same value? How is $f(x) = \frac{(x-2)(x-3)}{(x-2)(x-4)}$ equal to $g(x) = \frac{(x-3)}{(x-4)}$ when their domains are different?

LearningMath
  • 1,201
  • I would agree that they are not equal. Although they are equal at any value where they are both defined. – paw88789 Dec 16 '14 at 18:08
  • 1
    You need to be precise what you mean. In some contexts they are equal in other contexts they are not equal. Sometimes people also are just sloppy. – quid Dec 16 '14 at 18:10
  • When I put them into wolfram alpha to test for equality it says that they are equal. Also, I know that simplifying yields to an equivalent fraction. – LearningMath Dec 16 '14 at 18:10

3 Answers3

11

The actual problem is that what you wrote there are not the functions, but just two terms varying by a certain parameter.

In order to call those a function, you have to define the domain, which would look like this:

$$f: \mathbb{R}\setminus\{2, 4\}\rightarrow \mathbb{R}, x \mapsto f(x) := \frac{(x-2)(x-3)}{(x-2)(x-4)}\\ g: \mathbb{R}\rightarrow \mathbb{R}, x \mapsto g(x) := \frac{(x-3)}{(x-4)}\\$$ Now, $f\ne g$, but it equals the restriction of g to the domain of f: $f = g|_{\mathbb{R}\setminus \{2, 4\}}$

EDIT: Let me explain a bit more about how to compare terms and functions regarding equality.

  • Functions are defined as relations with certain properties (uniqueness & definedness of the argument): $f: A\rightarrow B, x\mapsto f(x) :\Leftrightarrow f := \{(x, y)\in A\times B|y = f(x)\}$, which has to hold $\forall x\in A\exists!y\in B: (x, y)\in f$ as the defining property of a function.

  • If two functions are equal is therefore just a question of comparing two sets. It holds if both contain exactly the same elements $(x, f(x))$. Thus, they must have the same domain.

  • When comparing two expressions regarding equality, one has to be careful as well: Let $f(x), g(x)$ be expressions. $f(x) = g(x)$ would not be a logical statement, because We do not know what x is — therefore, we have to give an explicit x or quantorize it: $$\forall x: f(x) = g(x)$$ Because a quantorization without limiting x to a certain set (let's say $\mathbb{R}$) would only make sense if we would concern f(x) = g(x) = x, which would allow x to be something else than a number, you have to give a domain in some way as well. For instance, let $f(x) := \frac{x-1}{x-1}, g(x) := 1$: $\forall x\in M: f(x)=g(x)$ would hold true for M = $\mathbb{R}\setminus \{1\}$, but not for $\mathbb{R}$, because there is no $f(x)$ at $x=1$.

  • What do I need in order to compare the two functions? I mean which things(domain,codomain, etc) – LearningMath Dec 16 '14 at 18:26
  • 1
    What do you mean by compare? – Lukas Juhrich Dec 16 '14 at 18:27
  • To compare for equality. – LearningMath Dec 16 '14 at 18:28
  • 1
    Well, a function is actually just a relation (a set of 2-tuples) with certain properties, more explicitly $f = {x, f(x)}$, which makes it just the comparison of two sets. – Lukas Juhrich Dec 16 '14 at 18:30
  • 1
    The domain of the first function is R/{2}. When we do transformations on the first function to get the second we are dividing by (x-2) and "define" a new function g(x) equal to the previous but we restrict it's domain to R/{2}? Because if we let the domain to be R then they are not equal functions? Am I right? – LearningMath Dec 16 '14 at 18:33
  • That's the right thought, although it is not a “transformation” onto the function — you are just manipulating the underlying term. But you are right. – Lukas Juhrich Dec 16 '14 at 18:36
  • I have one more question. Why is f(x) = (x-1)/(x-1) equal to f(x) = 1? – LearningMath Dec 16 '14 at 18:54
  • Because you divide by $x-1$…? Again, do you concern functions or terms? This question rather confuses me. – Lukas Juhrich Dec 16 '14 at 18:58
  • I think it's the same if you consider them like functions or rational expressions. When you divide by x-1 you restrict the domain of f(x). Does that mean you must restrict the domain of g(x) = 1 to R/{1} to consider them equal? – LearningMath Dec 16 '14 at 19:01
  • Yes. In this case, $f \cup {1, 1} = g$ or $f = g|_{\mathbb{R}\setminus{1}}$ – Lukas Juhrich Dec 16 '14 at 19:14
  • I extended my answer, I hope this makes things a bit clearer. – Lukas Juhrich Dec 16 '14 at 19:38
3

They are not. You can only say they assume the same values in the intersection of their domains, that is: $$f|_{D(f) \cap D(g)} = g|_{D(f) \cap D(g)}.$$


This answer assumes the definition: two functions $f:A \to B$ and $g:C \to D$ are equal if: $A = C$, $B = D$ and $f(x) = g(x)$ for all $x \in A = C$.

Ivo Terek
  • 77,665
-1

The reason we can't check functions for equality is because: 1. It reduces to The Halting Problem 2. Functions tend to have an infinite set of inputs, and as others have mentioned, checking functions for equality is a question of comparing two sets.

But we could try to force both expressions to have the same format, then check symbol by symbol, I suppose.

  • Welcome to Stack Exchange! It's true that equality of functions is not generally decidable, but I don't see how that's related to the question. – Tanner Swett Oct 16 '19 at 00:53