Math Help - Find two functions?

1. Find two functions?

Question:
Find two functions f,g: R -> R such that neither f nor g is a constant map, but g o f is a constant map.

Attempt:
I know for something to be a constant map graphically it means the function is a horizontal line. However, I am having trouble coming up with two functions whose composition is a constant map but they themselves are not a constant map.

Would appreciate any input or hint in the right direction.

2. Re: Find two functions?

Originally Posted by gridvvk
Question:
Find two functions f,g: R -> R such that neither f nor g is a constant map, but g o f is a constant map.
Consider $f(x) = x - \left\lfloor x \right\rfloor \;\& \;g(x) = \left\lfloor x \right\rfloor$.

3. Re: Find two functions?

That works pretty well the composition is 0. If you don't mind me asking what was the thought process behind the construction? I see no way to do it without resorting to the abs function. Thanks again.

4. Re: Find two functions?

Originally Posted by gridvvk
That works pretty well the composition is 0. If you don't mind me asking what was the thought process behind the construction? I see no way to do it without resorting to the abs function. Thanks again.

I don't mean to disappoint you, but there was no real thought process there/
Look at this thread. I just happened to have been thinking about those functions.

5. Re: Find two functions?

That's very convenient. Anyways thanks your functions work well for my example. Out of curiosity I seem to be overlooking how these functions are sufficient to disprove the claim posted by the user in the other thread.

For instance, for x0 = 1 we have the limit equal different values, but the claim said "if the limits are the same for any real value of x0".

Edit: I take that back the functions do work. The cause of the confusion on my part (and perhaps the other person) was that you made a typo for f(x) in post 2 of the linked thread.

6. Re: Find two functions?

Originally Posted by gridvvk
Edit: I take that back the functions do work. The cause of the confusion on my part (and perhaps the other person) was that you made a typo for f(x) in post 2 of the linked thread.
No, there is no typo in reply #2 there.

$f(x) = \left\lceil x \right\rceil - 1$ that uses the ceiling function.

$g(x) = \left\lfloor x \right\rfloor$ that is the floor function.

So if $n then $f(x)=g(x)$. That is why the left hand limit exists everywhere.

7. Re: Find two functions?

Right, I assumed you were going creative with the absolute value symbol, but those functions do exist, I just wasn't aware of them. They seem pretty useful.

8. Re: Find two functions?

Originally Posted by gridvvk
Right, I assumed you were going creative with the absolute value symbol, but those functions do exist, I just wasn't aware of them. They seem pretty useful. Coincidentally for my question both the floor function and absolute value function work out.
Actually they are very useful in computer science. In fact, the names come directly from CS. In mathematics the floor function was called greatest integer function.