Ok now I think I get it.
Because you put the 2 inside the integral you need to compensate by putting the 1/2 on the outside.
So if I had needed to put a 5 inside I would put a 1/5 outside right?
I have a suggestion; simply differentiate the following paying very close attention to the process.