\[ \boxed { {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) -a\cos \left ( y \left ( x \right ) \right ) +b=0} \]
Mathematica: cpu = 0.140018 (sec), leaf count = 116 \[ \left \{\left \{y(x)\to 2 \tan ^{-1}\left (\frac {a \tanh \left (\frac {1}{2} \left (x \sqrt {(a-b) (a+b)}-c_1 \sqrt {(a-b) (a+b)}\right )\right )}{\sqrt {(a-b) (a+b)}}-\frac {b \tanh \left (\frac {1}{2} \left (x \sqrt {(a-b) (a+b)}-c_1 \sqrt {(a-b) (a+b)}\right )\right )}{\sqrt {(a-b) (a+b)}}\right )\right \}\right \} \]
Maple: cpu = 0.031 (sec), leaf count = 54 \[ \left \{ y \left ( x \right ) =2\,\arctan \left ( {\frac {\tanh \left ( 1/ 2\,{\it \_C1}\,\sqrt {{a}^{2}-{b}^{2}}+1/2\,x\sqrt {{a}^{2}-{b}^{2}} \right ) \sqrt {{a}^{2}-{b}^{2}}}{a+b}} \right ) \right \} \]