Derivative of floor function

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.


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.


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 infinite 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...