Hello guys here is my problem uploaded: , see the attached image of my scanned paper

The thing that i wonder about here is the hint : 2$cos u * u * dx-

Where this this expression come from, how did they apply Cos to .where did it suddenly come from. I can understand why the constant was suddenly omitted from the right side of the equation (Constant Multiplie Rule). Would be happy if someone could solve this for me.