# Derivative/integral relationship appears to disprove the fundamental theorem of calculus!!! [duplicate]

Consider the floor function:

$$f(x) = \lfloor x \rfloor$$

The indefinite integral of f is:

$$\int_0^x f(x) dx = x\lfloor x \rfloor - \frac {\lfloor x \rfloor^2 + \lfloor x \rfloor} 2$$

This should be an antiderivative of floor, right?

Nope! If you take the derivative of the integral you find that sharp corners cause the derivative to not exist.

So then this would mean that the integral of floor is not an antiderivative right?

Therefore, I have found a case where the antiderivative does not equal the indefinite integral.

In that case I must be flawed as that violates the first fundamental theorem of calculus.

Where is the mistake in my logic and why does it appear to disprove the first fundamental theorem's relationship between integral and derivative?

This isn't part of the above question per se, but I noticed interesting enough, that the derivative of the integral above is:

$$\lfloor x \rfloor \frac {x - \lfloor x \rfloor}{x - \lfloor x \rfloor}$$

I wonder what sort of properties would be altered within integration/differentiation if one were to IDK... redefine the derivative by canceling the terms in that fraction? Or for that matter, canceling all fractions of that nature?

• you should consider instead $\int_0^x sign(x) dx = |x|$ and the fundamental theorem of calculus is that $|x|$ is weak differentiable with $(|x|)' = sign(x)$ almost everywhere – reuns Jun 17 '16 at 21:37
• @user1952009 why should I change the function? That's illogical. I noticed the property when taking the integral of floor. How is it logical to change the function arbitrarily? – user64742 Jun 17 '16 at 23:54
• $sign(x)$ is the simplest example for understanding what is happening, exactly in the same way as for $\lfloor x \rfloor = \sum_k \frac{(1+sign(x-k))}{2}$ – reuns Jun 18 '16 at 0:09
• ok then when people are trying to help you, they are completely ridiculous... sure ! so I'm telling you your example is a complicated version of $(|x|)' = sign(x), x\ne 0$, and that at $x=0$ there is no problem, only a discontinuity of the derivative – reuns Jun 18 '16 at 1:37
• I didn't mean to edit your question, but edit what you wrote on your paper, yes, because your function hides the phenomena which is that everything happens as for $(|x|)'$ – reuns Jun 18 '16 at 3:37

The fundamental theorem of calculus has a crucial hypothesis: $$F(x)=\int_{a}^x f(t)dt\Rightarrow F'(a)=f(a)$$

Whenever and wherever $f$ is continuous, here we are assuming $f$ is continuous at the point $a$. The floor function is very much not continuous. When you see theorems, it is very important that you check what the hypotheses are.

• @EthanHunt This site has really improved my typing. – operatorerror Jun 16 '16 at 22:17
• Dude, this is an oversight that bites tons of people. I voted the question and answer up accordingly. – The Nate Jun 17 '16 at 6:53

The first fundamental theorem of calculus is stated as follows:

For any continuous function $f:[a,b]\rightarrow \mathbb R$ the function $F(x)=\int_{a}^x f(x)\,dx$ has $F'(x)=f(x)$ for all $x\in (a,b)$.

Notice that $f(x)=\lfloor x\rfloor$ is not continuous at the integers, thus this theorem says nothing about that. Note that the derivatives do agree at points where $f(x)$ is continuous.

An interesting thing to note is that there is another version of the first fundamental theorem of calculus called the Lebesgue differentiation theorem which loosens the restriction on $f$, but only says that $F'(x)=f(x)$ almost everywhere. It relies on measure theory to state, so I won't reproduce it here, but it's worth noting that one has a trade-off between conditions on $f$ and results for $F$.

Therefore, I have found a case where the antiderivative does not equal the indefinite integral.

That statement is actually not quite right. What you have in fact found is a case where the indefinite integral can not be used to obtain the original function through differentiation. But you can't say anything about an antiderivative that does not equal something else, because it doesn't exist.

Indeed, the statement “any antiderivative is equal to the indefinite integral” is still true – for all of the zero antiderivatives!

What's more: in more than one sense the integral is actually differentiable. In particular, for any $x$ and any sequence $((x)_i)_i$ converging to $x$ from above (i.e. $x_i>x$), you get $$\lim_{i\to\infty} \frac{F(x_i) - F(x)}{x_i - x} \equiv \lim_{\xi\searrow x} \frac{F(\xi) - F(x)}{\xi - x} = \lfloor x\rfloor = f(x).$$ For all $x\not\in\mathbb{Z}$, this upper derivative is equal to the normal derivative. Trouble is, there would be no compelling reason to favour the upper derivative over the lower derivative, and it turns out that the lower derivative disagrees: $$\lim_{\xi\nearrow x} \frac{F(\xi) - F(x)}{\xi - x} = \lceil x-1\rceil.$$ This is still equal to $f(x)$ almost everywhere, but for $x\in\mathbb{Z}$ we have $\lceil x-1\rceil = f(x)-1$.

You can pretty much say that the derivative is deliberately constructed in such a way that it doesn't exist in cases like this where there would be an ambiguity and the Fundamental Theorem would be contradicted. By requiring continuity of $f$, the Fundamental Theorem also precludes such ambiguity and guarantees that the integral has a well-defined derivative.

These upper or lower derivatives really aren't much use in practice, but there is a concept called weak derivative that does have some pretty useful applications.