cos(x+a)=cos(x+b+a-b)=cos(x+b)cos(a-b)-sin(x+b)sin(a-b); cos(x+a)/sin(x+b)=cot(x+b)cos(a-b)-sin(a-b).
Integrating wrt x: cos(a-b)ln|sin(x+b)|-xsin(a-b)+k, because cot(x+b)=cos(x+b)/sin(x+b), the top being the differential of the bottom. (k is the constant of integration.)