My Math Forum Help with Understanding/Solving floor function #1

 Pre-Calculus Pre-Calculus Math Forum

 December 16th, 2016, 08:10 AM #1 Newbie   Joined: Jul 2016 From: Israel Posts: 24 Thanks: 0 Help with Understanding/Solving floor function #1 Hey, So I'm in pre-calculus class in my B.Sc. Computer Science degree, and I have to say that I am not the brightest sun-shine in the world when it comes to math, so I would love for you guys to help me out in times of need! So we started with floor / ceiling functions, and the professor doesn't really teach us, or takes the time to explain. So when he gives out assignments for turning in, I'm left out in the dark looking around the web / youtube for solutions. But, I'm returning to the one place who really cares!! Please help me understand is there is a general way to work out floor/ceiling functions other than: Floor: [x] = k, k<= x < k+1 Ceil: [x] = k, k-1< x <= k The problem to solve is attached below: and I was trying to solve it like this: I have no clue whether it's the right way; I don't know where to start, other than assuming a few things... I really hate it when someone teaches a new topic, but never really cares to teach its fundamentals. Please help out! Last edited by skipjack; December 16th, 2016 at 01:38 PM.
 December 16th, 2016, 08:30 AM #2 Senior Member     Joined: Sep 2015 From: USA Posts: 1,780 Thanks: 919 I would work this through with some examples until you see what's going on. The idea is that if $x>0$ then removing the fractional part results in a number less than x. But if $x < 0$ removing the fractional part results in a number greater than x, so you have to adjust this by subtracting off 1. For example $-2 > -2.5$ so $\left \lfloor -2.5 \right \rfloor = (-2) - 1 = -3$ Here $(-2)$ is $-2.5$ with the fractional part removed. Finally note that a negative number, $x$ with the fractional part removed can be represented as $-\left \lfloor |x| \right \rfloor$ and combining these we get $\forall x \not \in \mathbb{Z} \wedge x < 0,~~\left \lfloor x \right \rfloor = -\left \lfloor |x| \right \rfloor -1$ Thanks from shanytc
December 16th, 2016, 08:51 AM   #3
Newbie

Joined: Jul 2016
From: Israel

Posts: 24
Thanks: 0

Quote:
 Originally Posted by romsek I would work this through with some examples until you see what's going on. The idea is that if $x>0$ then removing the fractional part results in a number less than x. But if $x < 0$ removing the fractional part results in a number greater than x, so you have to adjust this by subtracting off 1. For example $-2 > -2.5$ so $\left \lfloor -2.5 \right \rfloor = (-2) - 1 = -3$ Here $(-2)$ is $-2.5$ with the fractional part removed. Finally note that a negative number, $x$ with the fractional part removed can be represented as $-\left \lfloor |x| \right \rfloor$ and combining these we get $\forall x \not \in \mathbb{Z} \wedge x < 0,~~\left \lfloor x \right \rfloor = -\left \lfloor |x| \right \rfloor -1$
Hey romsek,
I'm trying to follow up with your solution/suggestion but I am having some hard times understanding some key points first.

The problem has an equality between two parts, does it mean:
[-x] = -[x] AND [-x] = -[x]-1 ???

or maybe there is an OR between them?

[-x] = -[x] OR [-x] = -[x]-1 ???

I am trying to find the logic of the question first.

trying to come up with examples as you said, I let x=2.5 and then for the 2 equalities I get:

1. [-2.5] which is -3 != (-[2.5]) which is -2; so that means they are not equal.

2. [-2.5] which is -3 = -[2.5]-1 which is -3; they are equal.

So there is a number which won't work (2.5) for both qualities. but is it what I need to prove? that it works for both of them?

Thanks!

December 16th, 2016, 09:09 AM   #4
Senior Member

Joined: May 2016
From: USA

Posts: 916
Thanks: 366

Quote:
 Originally Posted by shanytc Hey, Please help me understand is there is a general way to work out floor/ceiling functions other than: Floor: [x] = k, k<= x < k+1 Ceil: [x] = k, k-1< x <= k
The short answer is "No," but what you have is incomplete and perhaps not as clearly stated as possible.

$k \in \mathbb Z\ and\ k \le x < (k + 1) \iff \lfloor x \rfloor = k.$

$k \in \mathbb Z\ and\ k < x \le (k + 1) \iff \lceil x \rceil = k + 1.$

EDIT: Notice that I have changed the definitions around so that they are parallel, but they mean the same thing as the definitions you were given. You may find my version a bit clearer.

In English, if x is an integer, the floor and ceiling functions BOTH return x.

$\lfloor 3 \rfloor = 3 = \lceil 3 \rceil.$

Where the two functions differ is when x is not an integer.

If x is not an integer, the floor function returns the next lower integer and the ceiling function returns the next higher integer.

$\lfloor 3.1\rfloor = 3\ but\ \lceil 3.1 \rceil = 4.$

This may be one of those concepts that is so simple that you disbelieve its utter simplicity.

Does this help?

Last edited by JeffM1; December 16th, 2016 at 09:16 AM.

December 16th, 2016, 09:16 AM   #5
Newbie

Joined: Jul 2016
From: Israel

Posts: 24
Thanks: 0

Quote:
 Originally Posted by JeffM1 The short answer is "No," but what you have is incomplete. $k \in \mathbb Z\ and\ k \le x < (k + 1) \iff \lfloor x \rfloor = k.$ $k \in \mathbb Z\ and\ k < x \le (k + 1) \iff \lceil x \rceil = k + 1.$ Those are definitions. In English, if x is an integer, the floor and ceiling functions return x. $\lfloor 3 \rfloor = 3 = \lceil 3 \rceil.$ Where the two functions differ is when x is not an integer. If x is not an integer, the floor function returns the next lower integer and the ceiling function returns the next higher integer. $\lfloor 3.1\rfloor = 3\ but\ \lceil 3.1 \rceil = 4.$ This may be one of those concepts that is so simple that you disbelieve its utter simplicity. Does this help?
Oh yes, I understand that part well!
In my original problem to solve, x belongs to R indeed. I just need to understand the proof method.
something like:

(floor function)
let [x] = n then work out my way through into proof method or an equation showing the proof.

December 16th, 2016, 09:22 AM   #6
Senior Member

Joined: Sep 2015
From: USA

Posts: 1,780
Thanks: 919

Quote:
 Originally Posted by shanytc Hey romsek, I'm trying to follow up with your solution/suggestion but I am having some hard times understanding some key points first. The problem has an equality between two parts, does it mean: [-x] = -[x] AND [-x] = -[x]-1 ??? or maybe there is an OR between them? [-x] = -[x] OR [-x] = -[x]-1 ??? I am trying to find the logic of the question first. trying to come up with examples as you said, I let x=2.5 and then for the 2 equalities I get: 1. [-2.5] which is -3 != (-[2.5]) which is -2; so that means they are not equal. 2. [-2.5] which is -3 = -[2.5]-1 which is -3; they are equal. So there is a number which won't work (2.5) for both qualities. but is it what I need to prove? that it works for both of them? Thanks!
the first condition $x = \left \lfloor x \right \rfloor$ is identical to $x \in \mathbb{Z}$

and in my opinion it really should be stated that way.

The floor or ceiling of an integer is always the integer itself.

The second condition is identical to $x \in \mathbb{R} - \mathbb{Z}$

i.e. $x$ is not an integer.

It will always be one or the other.

 December 16th, 2016, 09:33 AM #7 Senior Member   Joined: May 2016 From: USA Posts: 916 Thanks: 366 I'd probably structure a formal proof in terms of cases. $Case\ I:\ x = \lfloor x \rfloor.$ $x = \lfloor x \rfloor \implies x \in \mathbb Z \implies -\ x \in \mathbb Z.$ $-\ x \in \mathbb Z \implies \lfloor -\ x \rfloor = -\ x = - \lfloor x \rfloor.$ $\therefore x = \lfloor x \rfloor \implies \lfloor -\ x \rfloor = - \lfloor x \rfloor.$ $Case\ II:\ x \ne \lfloor x \rfloor.$ $\therefore x \not \in \mathbb Z.$ $\therefore \exists\ k \in \mathbb Z\ such\ that\ k < x < (k + 1).$ $Case\ IIa:\ x < 0.$ Can you complete Cases IIa and IIb? EDIT: This builds from romsek's previous post, which he posted while I was writing. Thanks from shanytc Last edited by JeffM1; December 16th, 2016 at 09:37 AM.
 December 16th, 2016, 09:59 AM #8 Member   Joined: Jan 2016 From: Athens, OH Posts: 82 Thanks: 40 Your two descriptions of floor and ceiling completely define the functions. That is, for any real x, there is an integer k with $k\leq x-\lfloor -x\rfloor-1$. Since -floor(-x) is an integer, by the above paragraph, it follows that $-\lfloor -x\rfloor=\lceil x\rceil$ and so $\lfloor -x\rfloor=-\lceil x\rceil$. Next let y be any real that is not an integer. Then $\lceil y\rceil =\lfloor y\rfloor+1$. This again follows from the first paragraph. (From $\lfloor y\rfloor\lfloor y\rfloor+1-1$. Thus also $\lfloor y\rfloor=\lceil y\rceil-1$. For your problem when x is not an integer ($x\neq\lfloor x\rfloor$): $\lfloor -x\rfloor=-\lceil x\rceil=-(\lfloor x\rfloor+1)=-\lfloor x\rfloor-1$ Thanks from shanytc
 December 17th, 2016, 03:58 AM #9 Newbie   Joined: Jul 2016 From: Israel Posts: 24 Thanks: 0 Hey all, thanks for the help! I think I get the idea, it's still kind of weird. But I hope to keep on working on some examples. Thanks for your help!

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post susannaviv Algebra 7 April 20th, 2016 04:24 AM coffee_leaf Number Theory 2 September 1st, 2012 05:12 AM mathbalarka Number Theory 21 June 18th, 2012 05:41 PM min0rinmath Calculus 5 June 14th, 2012 06:30 AM Tear_Grant Calculus 1 April 20th, 2009 03:52 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top