✓ Maple : cpu = 0.057 (sec), leaf count = 41
This is separable.
Using standard Tangent half-angle substitution, let
Let
Now,
But
Going back to (1)
Verification
ode:=diff(y(x),x)=a*cos(y(x))+b; my_sol:=2*arctan( (a+b)/sqrt(b^2-a^2) * tan(1/2*sqrt(b^2-a^2)*(x+_C1))); odetest(y(x)=my_sol,ode); 0