Your second solutions looks fine to me, try differentiating the right side and see if you end up with your original function.
How does one solve
I have attempted to use the identity cos^2x=1/2(1+cos2x) to give
However I am not sure how to proceed any further because of the double angle....
In another attempt, i tried tackling it using the method of substitution such as below
let u=cosx then du = -sinxdx
But this answer doesnt look right either....
Any tips or suggestions on what I am doing wrong will be appreciated. Thanks