# Flaw in calculation of $\int x \, dx=x^2$

$$\int x\ dx=\int \underbrace{(1 + 1 + \cdots + 1)}_{x\text{ times}}\ dx=x^2$$ Is the algebra Ok? The professor said that the function looses continuity; could anybody explain that?

-
What does "$x$ times" mean when $x=\frac{1}{2}$? – Thomas Andrews Sep 27 '12 at 20:01
Someone posted the question of where the error is in this argument a few weeks ago. I posted a reply. Maybe this isn't quite a duplicate question, but perhaps the same reply would work here. – Michael Hardy Sep 27 '12 at 20:04
Even without losing continuity this remains wrong: Compare $$\sum_{k=1}^n k =\sum_{k=1}^n \underbrace{1+1+\ldots +1}_{n} = n^2??$$ – Hagen von Eitzen Sep 27 '12 at 20:05
Is the problem written correctly? The integral result is wrong from the start. Was he trying to show that if you sum some set of rectangles you get the same results? Regardless, the title is wrong from the start. – Amzoti Sep 27 '12 at 20:07

One big problem we have in integration notation is that we use the letter $x$ in a way that is inconsistent. When writing the sum:

$$f(n)=1+2+3+\cdots+n$$

we would never write:

$$f(n)=\sum_{n=1}^n n$$

Rather, we write it as:

$$f(n)=\sum_{k=1}^n k$$

Note that $k$ is not $n$ - $k$ is a value that varies from $1$ to $n$.

In the integral, it is wrong to treat the $x$ "inside" the integral as a constant. It is not - it is like $k$ in the sum above. Depending on how you are defining integrals (as anti-derivatives or as areas or whatever) the $x$ on the inside is not the same as the outside. So we'd never say:

$$\int_0^x f(x) \, dx$$

But rather we say:

$$\int_0^x f(t) \, dt$$

with definite integrals.

Indefinite integrals are similar oddities. The indefinite integral:

$$F(x) = \int f(x) \, dx$$

is, in a sense, lazy notation - we reuse the letter $x$ because we really mean $F$ and $f$ have the same domain, and $F'(x)=f(x)$ for all $x$ in that domain.

Add to that the obvious difficulty of defining what "$x$ times" means when $x$ is not an integer, and you'll see the error.

-

$$f(x)=\underbrace{(1 + 1 + \cdots + 1)}_{x\text{ times}}$$

You will note that $f$ is only defined for $x \in \mathbb{Z}^+$, i.e. at isolated points.

It is clear that

$$f(1)=1$$ $$f(2)=1+1=2$$ $$f(3)=1+1+1=3$$ etc.

however, a problem arises when we want to find $f(-1)$ or $f\left(\frac{1}{2}\right)$. It is because of this we are not able to integrate this, as it is not a continuous (or differentiable) function. What happens when we want to find $\int_0^1 f(x)\,dx$?

-
I think that in your definition, $f(1)=x$ should change to $f(1)=1$, $f(2)=1+1$ and so on. – NoChance Sep 27 '12 at 20:29
@EmmadKareem Right. It's been a long day! – Argon Sep 27 '12 at 20:36
Thanks for the clarification. As a side note, I know about long days! – NoChance Sep 27 '12 at 20:41

The right hand side of the following is not using a mathematical notation:

$$\int x\ dx=\int \underbrace{(1 + 1 + \cdots + 1)}_{x\text{ times}}\ dx=x^2$$

Hence we are mixing a picture with very specific notations and this is leading to the confusion. Elaborating further on @Thomas Andrews answer (if I may),

$$\underbrace{(1 + 1 + \cdots + 1)}_{x\text{ times}}$$

can be repented by summation notation as follows:

$$x=\sum_{n=1}^x 1$$

Now you could represent the expression accurately by writing:

$$\int x\ dx=(\int \sum_{n=1}^x 1 dx=\int x\ dx)=\frac{x^2}{2}+C$$

-