\[ \int \frac {(A+B \sin (e+f x)) (c+d \sin (e+f x))^3}{\sqrt {a+a \sin (e+f x)}} \, dx \]
Optimal antiderivative \[ -\frac {\left (A -B \right ) \left (c -d \right )^{3} \arctanh \left (\frac {\cos \left (f x +e \right ) \sqrt {a}\, \sqrt {2}}{2 \sqrt {a +a \sin \left (f x +e \right )}}\right ) \sqrt {2}}{f \sqrt {a}}-\frac {4 \left (7 A d \left (21 c^{2}-12 c d +7 d^{2}\right )+B \left (36 c^{3}-63 c^{2} d +144 c \,d^{2}-37 d^{3}\right )\right ) \cos \left (f x +e \right )}{105 f \sqrt {a +a \sin \left (f x +e \right )}}-\frac {2 \left (7 A d +6 B c -B d \right ) \cos \left (f x +e \right ) \left (c +d \sin \left (f x +e \right )\right )^{2}}{35 f \sqrt {a +a \sin \left (f x +e \right )}}-\frac {2 B \cos \left (f x +e \right ) \left (c +d \sin \left (f x +e \right )\right )^{3}}{7 f \sqrt {a +a \sin \left (f x +e \right )}}-\frac {2 d \left (7 A \left (9 c -d \right ) d +B \left (24 c^{2}-15 c d +31 d^{2}\right )\right ) \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}}{105 a f} \]
command
integrate((A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3/(a+a*sin(f*x+e))^(1/2),x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ \frac {\frac {105 \, \sqrt {2} {\left (A \sqrt {a} c^{3} - B \sqrt {a} c^{3} - 3 \, A \sqrt {a} c^{2} d + 3 \, B \sqrt {a} c^{2} d + 3 \, A \sqrt {a} c d^{2} - 3 \, B \sqrt {a} c d^{2} - A \sqrt {a} d^{3} + B \sqrt {a} d^{3}\right )} \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {105 \, \sqrt {2} {\left (A \sqrt {a} c^{3} - B \sqrt {a} c^{3} - 3 \, A \sqrt {a} c^{2} d + 3 \, B \sqrt {a} c^{2} d + 3 \, A \sqrt {a} c d^{2} - 3 \, B \sqrt {a} c d^{2} - A \sqrt {a} d^{3} + B \sqrt {a} d^{3}\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{a \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {4 \, \sqrt {2} {\left (120 \, B a^{\frac {13}{2}} d^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{7} - 252 \, B a^{\frac {13}{2}} c d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 84 \, A a^{\frac {13}{2}} d^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} - 168 \, B a^{\frac {13}{2}} d^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{5} + 210 \, B a^{\frac {13}{2}} c^{2} d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 210 \, A a^{\frac {13}{2}} c d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 210 \, B a^{\frac {13}{2}} c d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 70 \, A a^{\frac {13}{2}} d^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 140 \, B a^{\frac {13}{2}} d^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - 105 \, B a^{\frac {13}{2}} c^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 315 \, A a^{\frac {13}{2}} c^{2} d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 315 \, B a^{\frac {13}{2}} c d^{2} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 105 \, A a^{\frac {13}{2}} d^{3} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{a^{7} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{210 \, f} \]
Giac 1.7.0 via sagemath 9.3 output
\[ \text {Exception raised: NotImplementedError} \]________________________________________________________________________________________