Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I thought the derivative of function $\text{floor}(x)$ should be $\infty$ for integer values of $x$ and 0 elsewhere. But wolframalpha plot showed something different. Is there any explanation?

share|improve this question
6  
It does not exist for integer values, and it is $0$ elsewhere. Explanation: don't trust Wolfram too much. –  1015 Feb 17 '13 at 3:58
    
I really appreciate this website as an atomized helping tool, and it may be a good idea to collect as much bugs we can find and raise them to the website owners to improve. –  Tariq Feb 17 '13 at 4:11
2  
I don't think being a WolframAlpha bug tracker would be a good use of this site. If you find a bug in WolframAlpha you should probably just let them know directly. –  Rahul Feb 17 '13 at 4:16
add comment

3 Answers 3

up vote 8 down vote accepted

The Alpha plot is badly wrong. The derivative of $\lfloor x \rfloor$ is 0 at non integers and not defined at integers. You would have to ask the people at Wolfram why this happens.

share|improve this answer
1  
It does that for some other graphs as well. –  Joe Z. Feb 17 '13 at 4:02
add comment

If you try asking Wolfram Alpha to differentiate the floor function, it will just output "Floor'(x)". If you force Wolfram Alpha to plot the derivative of the floor function, I think what Wolfram Alpha does is it as an infinte sum of dirac deltas, so that when you integrate, you can still get back the floor function. See http://reference.wolfram.com/mathematica/ref/DiracDelta.html and http://mathworld.wolfram.com/DeltaFunction.html

Clearly that's not what you had in mind when you asked Wolfram Alpha to plot the graph, but well...

share|improve this answer
add comment

It's probably calculating the derivative numerically instead of symbolically. An approach that gives a good approximation for functions that actually are differentiable, but behaves weird when the function is discontinuous.

For example, using a simple centered difference approximation $f'(x) \approx \frac{f(x + h) - f(x - h)}{2h}$, with $h = 0.05$, gives $f'(1) \approx \frac{f(1.05) - f(0.95)}{0.1} = \frac{1 - 0}{0.1} = 10$. This is nonsense, but an artifact of the computation.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.