# Equal functions with non-equal definitions

Suppose we have two functions $f, g: \mathbb{D} \rightarrow \mathbb{R}$ where $\mathbb{D} \subseteq \mathbb{R}$. Also, $\forall x \in \mathbb{D}: f(x) = g(x)$.

My question is: Is it possible for such two functions (i.e. can such a pair of functions exist) to have their definitions (i.e. the expressions that describe the relationship between $x$ and $f(x)$ resp. $g(x)$) not equal?

By "definitions not equal" I mean that one expression cannot be transcribed to the other one.

In other, less mathematical words: can there be two functions that are different but give equal values for every point of their domain?

If something is unclear, please comment and I'll update the question accordingly.

EDIT: To exclude trivial examples, let $\mathbb{D}$ be a nontrivial interval or a union of a finite number of nontrivial intervals.

EDIT 2: To narrow it down further more, let $\mathbb{D}$ be induced by the definitions of the functions only, i.e. it covers as much of $\mathbb{R}$ as possible that the functions are still defined. E.g. if $f(x) = \frac{1}{x}$ and $g(x) = \frac{2}{x}$ then $\mathbb{D} = \mathbb{R} \setminus \{0\}$ (I know, in this case they are not equal in values, but it's just for the illustration of what I want from the domain).

• Yes. Take for example $\mathbb{D}=\{0\}$ and set $f(x):= x$ and $g(x):=x^2$ – b00n heT May 25 '16 at 11:10
• @b00nheT Well, that's a rather trivial example which I didn't think of. I'll edit the question to exclude these, but thanks anyway! – zegkljan May 25 '16 at 11:12
• Your question is vague. What e.g. is "transcribe"? The answer to your question is: no. Two functions having the same domain and codomain, and with $f(x)=g(x)$ for every element $x$ of the domain are equal. You might say that the symbols $f$ and $g$ are different labels for the same mathematical entity. – drhab May 25 '16 at 11:17
• Another example would be the following: Let $\sup_{x\in\mathbb{D}}< n$ and take the floor function $x\mapsto \lfloor \frac{x}{n} \rfloor$. Then this and the zero function agree on $\mathbb{D}$ – b00n heT May 25 '16 at 11:21
• @drhab I'm sorry I'm unable to express the "transcription" precisely. Maybe that if the functions are expressed using elementary functions only, is it possible to rewrite one function to the other? – zegkljan May 25 '16 at 11:24

To give you a less trivial example than in the comment: there are funtions known on $\mathbb{R}^n$ which are of class $C^\infty$ (infinitely often differentiable) which are $=1$ on a given set (the unit ball, say), $=0$ outside of some larger set (on $|x|>2$, say) and have values between $0$ and $1$ on the remaining set. Let's assume we have such a function and call it $\phi$.
If you take then any function $g$ you can then look at $h = g\phi$. This function will be equal to $g$ on the unit ball, but different from $g$ unless $g= 0$ outside of the unit ball.
Non-trivial, yet easy, example: $f(x)=x$ and $g(x)= |x|$ on $\mathbb{R}^+$ are equal but certainly not equal on $\mathbb{R}$. This example is even expressed in "normal" symbols.
In general though we can just on any set simply define $g$ the same as $f$ on $\mathbb{D}$, and then define it in any other way on $\mathbb{R}\setminus\mathbb{D}$, we don't really need to find "expressions" as $x^2$, $\sin x$ or $|x|$ to define a function, we can just say where each number should be mapped.
• Thanks for your answer. However, I was not looking for a "solution" by manipulating $\mathbb{D}$ but rather the functions. I edited my question. But thanks anyway! – zegkljan May 25 '16 at 11:34