\[ \int (a-a \sin (e+f x))^m (c+c \sin (e+f x))^n (B (m-n)+B (1+m+n) \sin (e+f x)) \, dx \]
Optimal antiderivative \[ -\frac {B \cos \left (f x +e \right ) \left (a -a \sin \left (f x +e \right )\right )^{m} \left (c +c \sin \left (f x +e \right )\right )^{n}}{f} \]
command
integrate((a-a*sin(f*x+e))^m*(c+c*sin(f*x+e))^n*(B*(m-n)+B*(1+m+n)*sin(f*x+e)),x, algorithm="giac")
Giac 1.9.0-11 via sagemath 9.6 output
\[ \text {output too large to display} \]
Giac 1.7.0 via sagemath 9.3 output \[ \text {Timed out} \]_______________________________________________________