<s>[INST] Integration of $x^2$ using double substitution my professor has asked me to calculate: $$\int x^2dx = \frac{1}{3}x^3 + C$$ using the substitution of $$u=x$$ $$v=x$$
meaning that $$du=dx$$ $$dv = dx$$
The next step is where I think I'm wrong but I'm unsure why $$dx = \frac{du + dv}{2}$$
$$ \int uv(\frac{du+dv}{2}) = \frac{1}{2}\int uvdu + \frac{1}{2}\int uvdv = \frac{1}{4}u^2v + \frac{1}{2}uv^2 + C $$
Substituting back results in
$$ \frac{1}{4}x^2x + \frac{1}{4}xx^2 + C = \frac{1}{2}x^3 +  C$$ 
However, $$ \frac{1}{2}x^3 + C \neq \frac{1}{3}x^3 + C $$
So I am unsure where I went wrong. Any help would be appreciated thanks.
 [/INST] You can't use two substitutions in the same integral for the same variable. It dosen't make sense..
Note that
$$\int uv(\frac{du+dv}{2}) = \frac{1}{2}\int uvdu + \frac{1}{2}\int uvdv = \frac{1}{4}u^2v + \frac{1}{2}uv^2 + C$$
You have uv as variable but du...and also $u=v$ so normally
$$\int uvdu=\int u^2du=\frac {u^3}3+K$$
</s>