In Misc 9 of Chapter 7 Class 12 - https://www.teachoo.com/4835/728/Misc-9---Integrate-cos-x---root-4---sin2-x-/category/Miscellaneous/, we have the answer the same as NCERT.
What is the other way you are suggesting?
Teachoo is free. Login to view more pages.
Login with facebook
Login with gmail
On signing up you are confirming that you have read and agree to
Terms of Service