$$ \begin{align}x^2&=x+x+\cdots\ (\text{$x$ times})\\ \implies \dfrac{\mathrm d}{\mathrm dx}(x^2)&=\dfrac{\mathrm d}{\mathrm dx}(x)+\dfrac{\mathrm d}{\mathrm dx}(x)+\cdots \ (\text{$x$ times})\\ \implies 2x&=1+ 1+\cdots \ (\text{$x$ times})\\ \implies 2x&= x \\ \implies 2&=1 \end{align} $$

Which is obviously wrong. So, where am I wrong?