My Math Forum  

Go Back   My Math Forum > High School Math Forum > Pre-Calculus

Pre-Calculus Pre-Calculus Math Forum


Thanks Tree4Thanks
  • 1 Post By romsek
  • 1 Post By JeffM1
  • 1 Post By JeffM1
  • 1 Post By johng40
Reply
 
LinkBack Thread Tools Display Modes
December 16th, 2016, 09:10 AM   #1
Newbie
 
Joined: Jul 2016
From: Israel

Posts: 14
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 02:38 PM.
shanytc is offline  
 
December 16th, 2016, 09:30 AM   #2
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: CA

Posts: 782
Thanks: 410

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
romsek is offline  
December 16th, 2016, 09:51 AM   #3
Newbie
 
Joined: Jul 2016
From: Israel

Posts: 14
Thanks: 0

Quote:
Originally Posted by romsek View Post
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!
shanytc is offline  
December 16th, 2016, 10:09 AM   #4
Senior Member
 
Joined: May 2016
From: USA

Posts: 480
Thanks: 204

Quote:
Originally Posted by shanytc View Post
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?
Thanks from shanytc

Last edited by JeffM1; December 16th, 2016 at 10:16 AM.
JeffM1 is offline  
December 16th, 2016, 10:16 AM   #5
Newbie
 
Joined: Jul 2016
From: Israel

Posts: 14
Thanks: 0

Quote:
Originally Posted by JeffM1 View Post
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.
shanytc is offline  
December 16th, 2016, 10:22 AM   #6
Senior Member
 
romsek's Avatar
 
Joined: Sep 2015
From: CA

Posts: 782
Thanks: 410

Quote:
Originally Posted by shanytc View Post
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.
romsek is offline  
December 16th, 2016, 10:33 AM   #7
Senior Member
 
Joined: May 2016
From: USA

Posts: 480
Thanks: 204

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 10:37 AM.
JeffM1 is offline  
December 16th, 2016, 10:59 AM   #8
Newbie
 
Joined: Jan 2016
From: Athens, OH

Posts: 15
Thanks: 7

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<k+1$ and if z is any integer that satisfies the inequalities $z\leq x<z+1$ then z must be the floor of x. Similarly for the ceiling. (Actually, this can be proved assuming certain properties of the real number system, but I would just assume this as being "obvious".)

Let x be any real number. Then $\lfloor -x\rfloor=-\lceil x\rceil$. So replace x by -x and you get $-\lfloor x\rfloor=\lceil -x\rceil$.
Proof.
Multiply the defining inequalities for floor(-x) by -1 to get $-\lfloor -x\rfloor\geq 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<y<\lfloor y\rfloor+1$, it follows that $\lfloor y\rfloor +1\geq y>\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
johng40 is offline  
December 17th, 2016, 04:58 AM   #9
Newbie
 
Joined: Jul 2016
From: Israel

Posts: 14
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!
shanytc is offline  
Reply

  My Math Forum > High School Math Forum > Pre-Calculus

Tags
floor, function, solving, understanding, understanding or solving



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
floor function! susannaviv Algebra 7 April 20th, 2016 04:24 AM
proving floor function? coffee_leaf Number Theory 2 September 1st, 2012 05:12 AM
floor function and a constant mathbalarka Number Theory 21 June 18th, 2012 05:41 PM
Area between y = x and floor function min0rinmath Calculus 5 June 14th, 2012 06:30 AM
Inverse of Floor function Tear_Grant Calculus 1 April 20th, 2009 03:52 PM





Copyright © 2017 My Math Forum. All rights reserved.