It's a matter of practise and experience i guess.
See, if I was in your situation, I wouldn't let x=cosa anyway. I can already see it being complicated.
Sarccosx
= xarccosx - S x d(arccosx)
= xarccosx + S x/srt(1-x^2) dx
= xarccosx - 1/2 S -2x/sqrt(1-x^2)dx
= xarccosx - 1/2 S 1/sqrt(1-x^2)...