\[ \int (a+a \sin (e+f x))^{5/2} (A+B \sin (e+f x)) \, dx \]
Optimal antiderivative \[ -\frac {2 a \left (7 A +5 B \right ) \cos \left (f x +e \right ) \left (a +a \sin \left (f x +e \right )\right )^{\frac {3}{2}}}{35 f}-\frac {2 B \cos \left (f x +e \right ) \left (a +a \sin \left (f x +e \right )\right )^{\frac {5}{2}}}{7 f}-\frac {64 a^{3} \left (7 A +5 B \right ) \cos \left (f x +e \right )}{105 f \sqrt {a +a \sin \left (f x +e \right )}}-\frac {16 a^{2} \left (7 A +5 B \right ) \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}}{105 f} \]
command
integrate((a+a*sin(f*x+e))^(5/2)*(A+B*sin(f*x+e)),x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ \frac {\sqrt {2} {\left (15 \, B a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {7}{4} \, \pi + \frac {7}{2} \, f x + \frac {7}{2} \, e\right ) + 525 \, {\left (4 \, A a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 3 \, B a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 35 \, {\left (10 \, A a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 11 \, B a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {3}{4} \, \pi + \frac {3}{2} \, f x + \frac {3}{2} \, e\right ) + 21 \, {\left (2 \, A a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) + 5 \, B a^{2} \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )\right )} \sin \left (-\frac {5}{4} \, \pi + \frac {5}{2} \, f x + \frac {5}{2} \, e\right )\right )} \sqrt {a}}{420 \, f} \]
Giac 1.7.0 via sagemath 9.3 output
\[ \text {Exception raised: NotImplementedError} \]________________________________________________________________________________________