49.10 Problem number 248

\[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx \]

Optimal antiderivative \[ -\frac {a \left (B c -\left (A +B \right ) d \right ) x}{d^{2}}-\frac {a B \cos \left (f x +e \right )}{d f}+\frac {2 a \left (c -d \right ) \left (-A d +B c \right ) \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+a*sin(f*x+e))*(A+B*sin(f*x+e))/(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} \]_____________________________________________________