\[ \int \frac {\sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x))}{(c+d \sin (e+f x))^3} \, dx \]
Optimal antiderivative \[ -\frac {\left (3 A d +B \left (c +4 d \right )\right ) \arctanh \left (\frac {\cos \left (f x +e \right ) \sqrt {a}\, \sqrt {d}}{\sqrt {c +d}\, \sqrt {a +a \sin \left (f x +e \right )}}\right ) \sqrt {a}}{4 d^{\frac {3}{2}} \left (c +d \right )^{\frac {5}{2}} f}+\frac {a \left (-A d +B c \right ) \cos \left (f x +e \right )}{2 d \left (c +d \right ) f \left (c +d \sin \left (f x +e \right )\right )^{2} \sqrt {a +a \sin \left (f x +e \right )}}-\frac {a \left (3 A d +B \left (c +4 d \right )\right ) \cos \left (f x +e \right )}{4 d \left (c +d \right )^{2} f \left (c +d \sin \left (f x +e \right )\right ) \sqrt {a +a \sin \left (f x +e \right )}} \]
command
integrate((A+B*sin(f*x+e))*(a+a*sin(f*x+e))^(1/2)/(c+d*sin(f*x+e))^3,x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ -\frac {\sqrt {2} \sqrt {a} {\left (\frac {\sqrt {2} {\left (B c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, A d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 4 \, B d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \arctan \left (\frac {\sqrt {2} d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c d - d^{2}}}\right )}{{\left (c^{2} d + 2 \, c d^{2} + d^{3}\right )} \sqrt {-c d - d^{2}}} + \frac {2 \, {\left (2 \, B c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 6 \, A d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + 8 \, B d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} + B c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 5 \, A c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 3 \, B c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 5 \, A d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 4 \, B d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (c^{2} d + 2 \, c d^{2} + d^{3}\right )} {\left (2 \, d \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - c - d\right )}^{2}}\right )}}{8 \, f} \]
Giac 1.7.0 via sagemath 9.3 output
\[ \text {Timed out} \]________________________________________________________________________________________