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?
-
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
-
1You 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 Answers
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$.
- 3,365
-
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
-
-
1Well, 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
-
1The 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
-
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$.
- 77,665
-
-
-
-
-
-
@LukasJuhrich so we take $A = [10,20]$ for $f$ and $g$ and the answer is false? – quid Dec 16 '14 at 18:13
-
1The problem is that OP didn't specify the exact domains in the problem. So we just assume that it's the largest domain possible for each function. I added in my answer the definition of equality of functions I'm assuming. – Ivo Terek Dec 16 '14 at 18:16
-
I think you really meant to require $A=C$ and $B=D$, not $A=B$ and $C=D$. But still, +1 for this answer. The answer accepted by the OP is not completely correct as it omits the requirement that the ranges (a.k.a. codomains) also be equal. This is a technically important although frequently forgotten requirement. Excellent! – MPW Nov 06 '21 at 11:49
-
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.
- 1
-
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