you made two errors:
(1) You slipped the non-constnat x outside the integral.
(2) You forgot to substitute for dx.