What's wrong with these equations? My friend Boris (Boryan) gave me a task, and completely refuses to give the answer what's wrong here.
$$x^2=\overbrace{x+\cdots+x}
  ^{x\text{ times}}$$
$$(x^2)'=(x+\cdots+x)'$$
$$2x=1+\cdots+1$$
$$2x=x$$
$$2=1$$
Yeah! I've succesfully copypasted latex formulas!

I think the problem is in non-formal symbols. It brings me to question, what is the result for $(\sum_{i=1}^{x}x)' = ?$ That's usually an obstacle for those who memorised many things without clear understanding of definitions. So, I'm interested in fundamental mistake of this equations, because I want to get out of this mess)
 A: The first misconception is the definition of $x$-times applied operations.
If one ignores that, there still remains the error in the derivation
$$\frac d{dx}\sum_{i=1}^x x \neq \sum_{i=0}^x \frac d{dx} x = x$$
You have to use Leibniz integral rule, seeing the sum as a special type of integral, namely
$$\frac d{dx} \sum_{i=1}^x x = \frac d{dx} \int_0^x x d\#(i) = x|_{i=x} \cdot 1 - x|_{i=0} \cdot 0 + \int_0^x 1 d\#(i) = x + x = 2x$$
Where $\#$ denotes the counting measure. If you understand this, I can elaborate on the RHS.
A: If $x$ is any real positive number then the equality should be written in the form 
$x^2=\int_0^xxdy$ which is evidently true. 
Then the derivatives are $(x^2)'=2x$ and $\left( x\int_0^x dy\right)'=\int_0^xdy+x=x+x=2x$
A: The problem is that $(x + \cdots + x)' \not= 1 + \cdots +1$
A: $$(x^2)'=\bigg(\sum_1^xx\bigg)'=\sum_1^xx'+\sum_1^{x'}x=\sum_1^x1+\sum_1^1x=x+x=2x.$$
A: the mistake is at the beginning  $$x^2=\overbrace{x+\cdots+x}
  ^{x\text{ times}}$$ fails miserably when $x$ is not a natural number as the expression $$\overbrace{x+\cdots+x}
  ^{x\text{ times}}$$ is meaningless for example in case $x=1.37$ what does 
$$\overbrace{1.37+\cdots+1.37}
  ^{1.37\text{ times}}$$ mean?
A: Visualize the RHS graph. You will see that it is discontinuous. So can't differentiate. If you take $x^3$ instead of $x^2$, yon can also prove 1=2=3!
Surely try that too!
A: You have a genuine result that $(f+g)' = f' + g'$.
It follows from this that you can do the same for any finite sum of functions.
But now you seek to do the same for sums with a variable number of terms according to the value of $x$. That's not an application of the rule you have, because you're no longer looking at a function that's a sum of finitely many functions. Rather you're looking at a function whose value at a given point has been written as a sum of finitely many values. But so what if it is? Every real number is the sum of finitely many real numbers, and for that matter every integer is the sum of finitely many 1s! This tells us nothing about the function and so we shouldn't expect it to tell us anything about the derivative.
It's also a problem of course trying to differentiate a function of integers in the first place, and if $x$ isn't an integer then the RHS makes no sense. But you could overcome that objection by choosing instead to differentiate $x$ floor($x$) as the same sum with floor($x$) terms. The answer would still be wrong, indeed the function isn't differentiable or even continuous at integer values of $x$. For any of the piecewise continuous and differentiable regions between the integers, within which the value of floor($x$) is a constant, it would now give you the correct derivative, floor($x$).
