# Struggling to prove the statement

the original question

$\text{Define functions } f \text{ and } g \text{ as follows:}$ $f(x) = x - \lfloor x \rfloor$ $g(x) = x - \lceil x \rceil$ $\text{If } x \in \mathbb{R}\text{, then } \vert f(x) \vert = \vert\ g(x) \vert$

I hypothesize that the question wants me to prove "for all x in the domain of Real number, absolute of f(x) is equal to absolute of g(x)". Though I am not sure about that so perhaps someone else has another idea?

• Welcome to MSE! Not clear what the question is. Jun 24 '20 at 15:04
• The two functions are... the same? Jun 24 '20 at 15:07
• Calculate $f(1/3)$ and $g(1/3)$. Jun 24 '20 at 19:12
• isnt this statement false? Jun 24 '20 at 19:30

You have given two identical functions, therefore, f(x)=g(x) for all x which implies |f(x)|=|g(x)| for all values of x. If, you have copied the question incorrectly, do make sure to upload the correct one.

• They are not identical. The first is $x$ minus the floor of $x$ and the second is $x$ minus the ceiling of $x$. If $n < x < n+1$ for the integer $n$ then $f(x) = x - n$ and $g(x) =x- (n+1)$. They are not equal. But $|f(x)| = x-n$ and $|g(x)|=(n+1) -x$ and those are not equal so the question is wrong. Jun 25 '20 at 5:57
• Thats an oops from me :P, excuse my poor eyesight, i read both as the greatest integer function. Jul 20 '20 at 4:20

It looks like f(x) is the (negative) amount rounded up, and g(x) is the amount rounded down, to the next highest and lowest integers respectively.

The equation $${|f(x)| = |g(x)|}$$ is not true for all $${x \in \Bbb R}$$. If x=1.3, f(x)=-0.7 and g(x)= 0.3.

If the question is to solve (rather than prove) the equation, then $${x = z}$$ or $${ z+0.5 : z \in \Bbb Z}$$ would do it, I think.

• $x \in \mathbb Z$ will give you $f(x) =g(x) = 0$. And $x = z+0.5; z\in \mathbb Z$ will give you $f(x) = 0.5$ and $g(x) =-0.5$. A bit more work will tell you that in any other case $|f(x)| = 1-|g(x)|$ Jun 25 '20 at 5:53
• @fleablood Yes, your answer is much better. Thanks for commenting. Jun 25 '20 at 8:28

If $$x$$ is an number there is an integer $$n$$ so that $$n \le x < n+1$$. That integer is $$\lfloor x\rfloor$$.

And there is an integer $$m$$ so that $$m-1 < x \le m$$. That integer is $$\lceil x \rceil$$

So $$f(x) = x - \lfloor x\rfloor= x - n$$ and $$0 \le f(x) < 1$$.

And $$g(x) = x- \lceil x \rceil = x-m$$ and $$-1 < g(x) \le 0$$.

Now $$|f(x)| = x- n$$ and $$|g(x)| = |x-m| = m-x$$.

These are not equal. For example of $$x = 9.73$$ then $$f(x) = 9.73 - 9 = 0.73$$. And $$g(x) = 9.73-10 = -.27$$.

Instead what is true is if $$x\not \in \mathbb Z$$ then $$|g(x)| + |f(x)| = 1$$.

And if $$x \in \mathbb Z$$ then $$x = \lceil x \rceil = \lfloor x \rfloor$$ and $$f(x) = g(x) = 0$$.