1) x2 = x + x + ... + x (x terms)
2) 2x = 1 + 1 ... + 1 (x terms) after taking the derivative
3) 2x = x (on summing the ones)
4) 2 = 1 (on dividing by x)
Explanation
There is an error in step 2. This is obvious if you substitute x = 3 in 1) and 2) as you get
1) 32 = 3 + 3 + 3
2) 6 = 1 + 1 + 1
So step 2 has to be wrong. Why?
The problem is that even step 1 is wrong because although it is fine to write:
1) x2 = x + x + ... + x (x terms)
for x having values such as 1, 2, 3 etc, it does not make sense for values such as 1.25, -4, pi etc.
In other words when we say "x terms" this only makes sense for counting numbers.
If you want to write step one correctly you have to do something like this:
1) x2 = x + x + ... + x ([x] terms) + x(x - [x])
where [x] is the largest counting number smaller than x.
(Even this is not valid for negative numbers.)
This is easy to see if you substitute 3.2 for x:
3.22 = 3.2 + 3.2 + 3.2 + 3.2( 3.2 - 3 )
The funny thing is that the last fractional term makes so much difference when you take the derivative, since it stops 2x from being x (ie the false result you get in the original proof).