\[ \int \frac {(a+a \sin (e+f x))^2 (A+B \sin (e+f x))}{(c-c \sin (e+f x))^7} \, dx \]
Optimal antiderivative \[ \frac {a^{2} \left (A +B \right ) c^{2} \left (\cos ^{5}\left (f x +e \right )\right )}{13 f \left (c -c \sin \left (f x +e \right )\right )^{9}}+\frac {a^{2} \left (4 A -9 B \right ) c \left (\cos ^{5}\left (f x +e \right )\right )}{143 f \left (c -c \sin \left (f x +e \right )\right )^{8}}+\frac {a^{2} \left (4 A -9 B \right ) \left (\cos ^{5}\left (f x +e \right )\right )}{429 f \left (c -c \sin \left (f x +e \right )\right )^{7}}+\frac {2 a^{2} \left (4 A -9 B \right ) \left (\cos ^{5}\left (f x +e \right )\right )}{3003 c f \left (c -c \sin \left (f x +e \right )\right )^{6}}+\frac {2 a^{2} \left (4 A -9 B \right ) \left (\cos ^{5}\left (f x +e \right )\right )}{15015 c^{2} f \left (c -c \sin \left (f x +e \right )\right )^{5}} \]
command
integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))/(c-c*sin(f*x+e))**7,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} \]_____________________________________________________