Also, are you sure there is a relationship between C and A? This function is periodic and cannot be related to A .. It should be irrelevant.
The correct way is to change the integral limit to 0 to 2π, and then the original formula = ln(2+cosx)d(sinx), and integrate by parts.