a) Recall the integration by parts formula:

Then with
and
we have


since
and
. (C is of course an arbitrary constant that can be determined exactly if you know the velocity at some given value of x.)
b) No?

because multiplication is commutative. I get the feeling I'm missing something here...