How to do integration with substitution Let's suppose we have the following integral and substitution for $u=x^2$:
$$\int x^2\;\mathrm dx=\int u\;\mathrm du\tag1$$
The solution for the following integral is:
$$\int x\;\mathrm dx=\frac{x^2}2+C$$
So we might conclude that $$\int x^2\;\mathrm dx=\frac{u^2}2=\frac{x^4}2$$
Which is definitely incorrect. However I have seen the substitution $(1)$ many times. So what is all about? How do I fix the above reasoning? Please give me some links for further reading. 

As said in comments, you cannot freely swap $\mathrm du$ and $\mathrm dx$. The relationship between them is governed by the relationship between $u$ and $x$ in each case (this time, for instance, we have $u = x^2$). We have to calculate $\mathrm du$, and it is usually done by this abuse of notation (it is abuse of notation since I'm calculating like $\frac{\mathrm du}{\mathrm dx}$ is a fraction, even though it really isn't):
$$
\begin{align}
  u = &x^2\\
\implies  \frac{\mathrm du}{\mathrm dx} = &2x\\
\implies \mathrm du =& 2x\;\mathrm dx
\end{align}$$
So to swap in $\mathrm du$ you need to have $2x\:\mathrm dx$ standing around somewhere. You can do that the following way:
$$
\int x^2 \: \mathrm dx = \int \frac{x}{2}\cdot 2x\:\mathrm dx =\\
\int \frac{\sqrt{u}}{2}\mathrm du = \frac{1}{2}\int u^\frac{1}{2}\:\mathrm du = \\
\frac{1}{2}\cdot \frac{2}{3}u^{3/2} + C = \frac{1}{3}x^3 + C
$$
which is the expected answer.
