47.8 Problem number 682

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

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

command

integrate((a+b*sin(f*x+e))**2/(c+d*sin(f*x+e)),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} \]_____________________________________________________