Differentiating a greatest integer function?

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
I had an AP Calc test today on derivatives and one of the questions asked to take the derivative of the greatest integer function.

f(x) = [| x |] **Note: [| x |] is as close as I could get to the symbol for greatest integer function

Find f'(2.5) if it exists: ___________
Find f'(3) if it exists: ___________

I said neither exists and tried showing it using f'(c) = lim of x -> c [ (f(x) - f(c)) / (x - c)]

So I did: ( [| x |] - [| x |] ) / (x - c)

for 2.5... ( [| x |] - [| 2.5 |] ) / (x - 2.5)

( [| x |] - 2) / (x - 2.5)

Then I didn't know what to do with the greatest integer function...if I could get rid of it...so then I subbed in the 2.5 for x since I couldn't figure out how to go farther and got ( [| x |] - 2 ) / 0 From this I concluded that it was undefined at 2.5 so there was no derivative because there would be a discontinuity...

For 3 I did it similarly...only I ended up with ([| x |] - 3 )/ x - 3 so when I subbed in I got 0/0 so I said there was a discontinuity there too. I could have just shown that there was a discontinuity and therefore no derivative of it graphically showing the discontinuity at x = 3 on the graph, but oh well. I knew where I would end up when it was 3.

Basically, I said neither was differentiable...was I right? Partially right? Not even close?

Heh, let me know. :)

By the way, I don't think we did anything with differentiating greatest integer functions in class or in the homework, so that's why I'm a bit querulous of whether I did it right...although I'm not too confident about that one. However, I know I did very well on the rest of the test - the rest was easy.
 

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
Doesn't anyone here know? :) I thought these forums were packed with math geeks? Hehe.
 

Legendary

Diamond Member
Jan 22, 2002
7,019
1
0
The derivative of the | greatest int | function at any point at which x is not a whole number is zero.
If x is a whole number, the limit is not defined so the derivative is not defined.
I think that's right anyway.
 

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
Originally posted by: Legendary
The derivative of the | greatest int | function at any point at which x is not a whole number is zero.
If x is a whole number, the limit is not defined so the derivative is not defined.
I think that's right anyway.
So I got part f'(3) right you think?

I guess that makes sense for f'(2.5) since it has it's own point distinct point...(2.5, 2). So the derivative of 2 would be 0. Damn it.

However, I'm pretty certain about f'(3) since there is a discontinuity there.
 

Legendary

Diamond Member
Jan 22, 2002
7,019
1
0
Yeah since there's a discontinuity at 3 (the limit from the left is not the same as the limit from the right) I'd have to say you got part 3 right.
Proving this algebraically is tough, I just remembered how the graph went.
 

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
Originally posted by: Legendary

Proving this algebraically is tough, I just remembered how the graph went.
Agreed. If I think about the graph, I suppose that f'(2.5) = 0, but then the algebraic way I did it is completely different. :Q

I'll have to ask my Calc teacher about that - I'm sure he'll have an answer for me, he's a great teacher and he knows a ton! :) Had him for precalc last year too.
 

bizmark

Banned
Feb 4, 2002
2,311
0
0
Originally posted by: zippy
Originally posted by: Legendary
The derivative of the | greatest int | function at any point at which x is not a whole number is zero.
If x is a whole number, the limit is not defined so the derivative is not defined.
I think that's right anyway.
So I got part f'(3) right you think?

I guess that makes sense for f'(2.5) since it has it's own point distinct point...(2.5, 2). So the derivative of 2 would be 0. Damn it.

However, I'm pretty certain about f'(3) since there is a discontinuity there.

No, the derivative of 2 would be undefined. There's a way of looking at things, where you can say that a function has a left derivative and a right derivative at any point. If the two derivatives are the same, then the function is differentiable at that point.

So every point on the real line has a right derivative with the greatest integer function. It's 0. Even at places like 2.99999, that has a derivative since you can get arbitrarily close to 3 without reaching it. (It's an open set at this end of the segment, but looking at it the other way it's a closed set.) To clarify, you could simply rewrite the greatest integer function as this:

f(x)=0 for x such that x in [0, 1)
f(x)=1 for x such that x in [1, 2)
... etc.

So look what happens at 1. Coming from the right, the function is 1 all the way until x hits 1, and that *includes* 1 itself. Going the other way (from the left), the function is 0, again all the way until x hits 1, but this time 1 isn't included. So we look at the limit, as x approaches 1 from the left:

lim [f(x)-f(1)]/[x-1] = [1-0]/[x-1]
x->1-

but we can see that the denominator will clearly approach 0 while the numerator will always remain 1. So it's undefined for the left-hand derivative. We saw that the right-hand derivative is 0, so obviously undefined != 0, so the limit does not exist.

BTW this is the same way that you'd show that the absolute value function has no derivative at 0. For x>0, the derivative is 1; for x<0, it's -1; and even though the left-hand and right-hand LIMITS of f are the same (i.e. the function is not discontinuous), the left-hand and right-hand DERIVATIVES of f will still be different.
 

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
Originally posted by: bizmark
Originally posted by: zippy
Originally posted by: Legendary
The derivative of the | greatest int | function at any point at which x is not a whole number is zero.
If x is a whole number, the limit is not defined so the derivative is not defined.
I think that's right anyway.
So I got part f'(3) right you think?

I guess that makes sense for f'(2.5) since it has it's own point distinct point...(2.5, 2). So the derivative of 2 would be 0. Damn it.

However, I'm pretty certain about f'(3) since there is a discontinuity there.

No, the derivative of 2 would be undefined. There's a way of looking at things, where you can say that a function has a left derivative and a right derivative at any point. If the two derivatives are the same, then the function is differentiable at that point.

So every point on the real line has a right derivative with the greatest integer function. It's 0. Even at places like 2.99999, that has a derivative since you can get arbitrarily close to 3 without reaching it. (It's an open set at this end of the segment, but looking at it the other way it's a closed set.) To clarify, you could simply rewrite the greatest integer function as this:

f(x)=0 for x such that x in [0, 1)
f(x)=1 for x such that x in [1, 2)
... etc.

So look what happens at 1. Coming from the right, the function is 1 all the way until x hits 1, and that *includes* 1 itself. Going the other way (from the left), the function is 0, again all the way until x hits 1, but this time 1 isn't included. So we look at the limit, as x approaches 1 from the left:

lim [f(x)-f(1)]/[x-1] = [1-0]/[x-1]
x->1-

but we can see that the denominator will clearly approach 0 while the numerator will always remain 1. So it's undefined for the left-hand derivative. We saw that the right-hand derivative is 0, so obviously undefined != 0, so the limit does not exist.

BTW this is the same way that you'd show that the absolute value function has no derivative at 0. For x>0, the derivative is 1; for x<0, it's -1; and even though the left-hand and right-hand LIMITS of f are the same (i.e. the function is not discontinuous), the left-hand and right-hand DERIVATIVES of f will still be different.
Yup, well said. I know that. :) The fact that it is undefined causes it to be discontinuous at 3 (you said 2, same difference).

I'm just not sure about at 2.5 - I think it is 0 there after what legendary and one of my friends said.

 

bizmark

Banned
Feb 4, 2002
2,311
0
0
yeah, the derivative is 0 everywhere other than the integers. Look at it on both sides of 2.5: just look for example at the range between 2.4 and 2.6. The value of the function is constant within this range. The derivative of a constant function is always 0. More rigorously,

lim f(x) = [f(x)-f(2.5)]/[x-2.5] = [2-2]/[x-2.5] = 0.
x->2.5
 

zippy

Diamond Member
Nov 10, 1999
9,998
1
0
Originally posted by: bizmark
yeah, the derivative 0 everywhere other than the integers. Look at it on both sides of 2.5: just look for example at the range between 2.4 and 2.6. The value of the function is constant within this range. The derivative of a constant function is always 0. More rigorously,

lim f(x) = [f(x)-f(2.5)]/[x-2.5] = [2-2]/[x-2.5] = 0.
x->2.5
It's actually 0/0, so it's not 0 if you do it like that (which is how I did it on the test...I thought to myself that it was just (2.5, 2) but didn't put it together that the f(2.5) = 2 and thus f'(2.5) = 0. I wonder how my Calc teacher will address this. I'm pretty confused on it.
 

bizmark

Banned
Feb 4, 2002
2,311
0
0
It's actually 0/0, so it's not 0 if you do it like that (which is how I did it on the test...I thought to myself that it was just (2.5, 2) but didn't put it together that the f(2.5) = 2 and thus f'(2.5) = 0. I wonder how my Calc teacher will address this. I'm pretty confused on it.

No, actually it's not. You can't just stick the 2.5 in for x. This is as x approaches 2.5, not "x is 2.5". It actually never reaches 2.5. It just gets infinitisimally close.

You get 0/[x-2.5]. x-2.5 gets arbitrarily small, but it can't get smaller than 0.

Could you explain exactly how you're confused? I'm confused about your confusion...

edit: Look, if what you're saying is correct, then f(x)=0 has an undefined derivative at 2 too. Look at
lim f'(x)=(f(x)-0)/(x-2) = (0-0)/(x-2) =0/0.
(x->2)

But we all know that the constant function f(x)=0 has a derivative of 0. We can do the direct substitution of 0 for f(2) because it's correct.... f(x)=0 *everywhere*. We can't do the substitution of 2 for x in the denominator, because x is approaching 2. But even when x is approaching 2, f(x)=0. Capiche?