3.1 Problem number 123

\[ \int \frac {1}{a+\cos (x)+b \sin (x)} \, dx \]

Optimal antiderivative \[ -\frac {2 \arctanh \left (\frac {b -\left (1-a \right ) \tan \left (\frac {x}{2}\right )}{\sqrt {-a^{2}+b^{2}+1}}\right )}{\sqrt {-a^{2}+b^{2}+1}} \]

command

integrate(1/(a+cos(x)+b*sin(x)),x)

Sympy 1.10.1 under Python 3.10.4 output

\[ \text {output too large to display} \]

Sympy 1.8 under Python 3.8.8 output \[ \text {Timed out} \]_____________________________________________________