47.1 Problem number 178

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

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

command

integrate(sin(x)**2/(a+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} \]_____________________________________________________