Wikipedia:Reference desk/Archives/Mathematics/2021 September 8

= September 8 =

Are these functions the same?$$\frac{x^2 + 4}{x - 2}$$ and $$x + 2$$
$$\frac{x^2 + 4}{x - 2}$$ is not defined for $$x = 2$$, but what if we transform it to $$\frac{(x+2) * (x-2)}{(x-2)}$$ and get rid of the denominator. We obtain the function $$x + 2$$, and in this function, it makes sense to say that for $$x + 2$$, $$y = 4 $$. but if both functions are the same (except for a minor arithmetic tweaking) why don't they have the same domain? Bumptump (talk) 23:12, 8 September 2021 (UTC)


 * Hi Bumptump, good question. First, I assume you mean $$x^2-4$$, as that equals $$(x+2)(x-2)$$, rather than $$x^2+4$$.
 * While it is true that you can transform $$\frac{x^2-4}{x-2}$$ into $$x+2$$ through factoring, consider the specific steps you're taking carefully. Factoring $$x^2-4$$ into $$(x+2)(x-2)$$ is fine, as that is true for all real numbers. But then, you "get rid of the denominator" by dividing the numerator by the denominator $$x-2$$. You note $$x=2$$ as an example in which the two functions differ, and this step is why: when $$x=2$$, $$x-2=0$$, and you can't divide by 0. So, in the "minor arithmetic tweaking", you do something that's invalid for $$x=2$$, hence why the domain changes.
 * Consider as an analogue the function $$f(x)=x$$. This function's domain is obviously all real numbers, but let's say I multiply it by $$\frac{x}{x}$$, to get the function $$g(x)=\frac{x^2}{x}$$. While these functions are identical for most real numbers, the latter is clearly not defined for $$x=0$$, because $$\frac{x}{x}$$ doesn't make sense for $$x=0$$. Your case works similarly.
 * As an aside, you are correct that it "makes sense" that plugging 2 into the function would yield 4 (even though it doesn't) -- when you plug in numbers close to 2, you get a number close to 4 (because for non-2 numbers, $$\frac{x^2-4}{x-2}=x+2$$). This is the concept behind the limit of a function in calculus.
 * Please feel free to reply if this still isn't clear or if I missed something, and feel free to ignore the last paragraph if it just makes it more confusing. Thanks! ev iolite   (talk)  00:14, 9 September 2021 (UTC)


 * More formally, there is an abuse of language going on when elementary algebra classes ask to "find" the domain of a function; this is putting the cart before the horse because the formal definition of a function requires one to specify a domain as part of the definition; two functions with different domains, even if they agree on the intersection of those domains, are considered different functions. Thus, a bare expression does not define a function.
 * What is really meant is, "What is the maximal (under set inclusion) subset of the reals (or complex numbers) on which this expression can define a function?" or in your case, "Are the maximal subsets of the reals (or complex numbers) on which these expressions can define functions the same?". From this, we know that the sets are not the same for $$\frac{x^2 - 4}{x - 2}$$ and $$x + 2$$ because the former expression is not defined at x = 2, while the latter one is; the former can define a function on at most $$\mathbb{R} \backslash \{2\}$$ but the latter can define a function on all reals. However, the two do agree everywhere but 2. This is one way to show that x = 2 is in fact a removable discontinuity: if one function agrees with a continuous function except on a set of isolated points, then its limits at points where it does not agree with that continuous function are equal to the values of that continuous function at said points (x = 2 being an example here).--Jasper Deng (talk) 06:14, 9 September 2021 (UTC)
 * Yet we can say the two functions are "equivalent" - right? Because one rearranges into the other. Making them equivalent, but different. It's a little confusing. Card Zero  (talk) 19:10, 9 September 2021 (UTC)
 * No we can’t, in general. Two functions are equivalent when they have the same domain and for every member of the domain, the functions’ values are the same.—Jasper Deng (talk) 19:19, 9 September 2021 (UTC)
 * So what can we say? "Equivalent (for $$x \neq 2$$)", I guess. Card Zero  (talk) 19:49, 9 September 2021 (UTC)
 * You can say that the expressions agree except when $$x \neq 2$$. --Lambiam 19:58, 9 September 2021 (UTC)
 * You mean the expressions disagree except when $$x \neq 2$$. Card Zero  (talk) 20:06, 9 September 2021 (UTC)
 * Oops; I meant "agree except when $$x = 2$$". --Lambiam 22:17, 9 September 2021 (UTC)