I want to integrate $$\int x^2(sin(2x))dx$$ using $u$-substitution.
Seeing that $x^2$ and $2x$ made me think that $u$ should equal $x^2$ and working through it I immediately got stuck at $$ \int u\left(sin(du)\right)$$ cause I think we all know that just ain't right. So instead I used $u=2x$ $$\frac{1}{2}\int \sqrt{\frac{u}{2}}sin(u)du$$ but it seems I'm just over complicating the problem, so which $u$-sub is correct?
$\int x^{2} \sin (2x)dx =-\frac 1 2 \cos (2x)x^{2} +\int x\cos (2x)dx$. Another integration by parts gives $\int x^{2} \sin (2x)dx =-\frac 1 2 \cos (2x)x^{2}+\frac 1 2 x\sin (2x) -\frac 1 2\int \sin (2x) dx$. So the answer is $-\frac 1 2 \cos (2x)x^{2}+\frac 1 2 x\sin (2x) dx+\frac 1 4 \cos (2x)+C$ where $C$ is a constant.