\[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^{3/2} (c+d \sin (e+f x))} \, dx \]
Optimal antiderivative \[ -\frac {\left (A -B \right ) \cos \left (f x +e \right )}{2 \left (c -d \right ) f \left (a +a \sin \left (f x +e \right )\right )^{\frac {3}{2}}}-\frac {\left (A \left (c -5 d \right )+B \left (3 c +d \right )\right ) \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}}{4 a^{\frac {3}{2}} \left (c -d \right )^{2} f}+\frac {2 \left (-A d +B c \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 {d}}{a^{\frac {3}{2}} \left (c -d \right )^{2} f \sqrt {c +d}} \]
command
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^(3/2)/(c+d*sin(f*x+e)),x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ \frac {\frac {8 \, \sqrt {2} {\left (B c d - A d^{2}\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 (\sqrt {2} a^{\frac {3}{2}} c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - 2 \, \sqrt {2} a^{\frac {3}{2}} c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + \sqrt {2} a^{\frac {3}{2}} d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sqrt {-c d - d^{2}}} + \frac {{\left (A \sqrt {a} c + 3 \, B \sqrt {a} c - 5 \, A \sqrt {a} d + B \sqrt {a} d\right )} \log \left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{\sqrt {2} a^{2} c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - 2 \, \sqrt {2} a^{2} c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + \sqrt {2} a^{2} d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {{\left (A \sqrt {a} c + 3 \, B \sqrt {a} c - 5 \, A \sqrt {a} d + B \sqrt {a} d\right )} \log \left (-\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}{\sqrt {2} a^{2} c^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - 2 \, \sqrt {2} a^{2} c d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + \sqrt {2} a^{2} d^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} - \frac {2 \, {\left (A \sqrt {a} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - B \sqrt {a} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}}{{\left (\sqrt {2} a^{2} c \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - \sqrt {2} a^{2} d \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} {\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 1\right )}}}{4 \, f} \]
Giac 1.7.0 via sagemath 9.3 output
\[ \text {Exception raised: TypeError} \]________________________________________________________________________________________