47.3 Problem number 439

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

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