\(\int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx\) [433]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [B] (verification not implemented)
Maxima [A] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 227 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=\frac {1}{8} a \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) x-\frac {a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \cos (e+f x)}{30 f}-\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \cos (e+f x) \sin (e+f x)}{120 f}-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{60 f}-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{20 f}-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f} \] Output:

1/8*a*(8*c^4+16*c^3*d+24*c^2*d^2+12*c*d^3+3*d^4)*x-1/30*a*(12*c^4+95*c^3*d 
+112*c^2*d^2+80*c*d^3+16*d^4)*cos(f*x+e)/f-1/120*a*d*(24*c^3+130*c^2*d+116 
*c*d^2+45*d^3)*cos(f*x+e)*sin(f*x+e)/f-1/60*a*(12*c^2+35*c*d+16*d^2)*cos(f 
*x+e)*(c+d*sin(f*x+e))^2/f-1/20*a*(4*c+5*d)*cos(f*x+e)*(c+d*sin(f*x+e))^3/ 
f-1/5*a*cos(f*x+e)*(c+d*sin(f*x+e))^4/f
 

Mathematica [A] (verified)

Time = 1.88 (sec) , antiderivative size = 207, normalized size of antiderivative = 0.91 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=\frac {a (1+\sin (e+f x)) \left (-60 \left (8 c^4+32 c^3 d+36 c^2 d^2+24 c d^3+5 d^4\right ) \cos (e+f x)+10 d^2 \left (24 c^2+16 c d+5 d^2\right ) \cos (3 (e+f x))-6 d^4 \cos (5 (e+f x))+15 \left (4 \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right ) f x-8 d \left (4 c^3+6 c^2 d+4 c d^2+d^3\right ) \sin (2 (e+f x))+d^3 (4 c+d) \sin (4 (e+f x))\right )\right )}{480 f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2} \] Input:

Integrate[(a + a*Sin[e + f*x])*(c + d*Sin[e + f*x])^4,x]
 

Output:

(a*(1 + Sin[e + f*x])*(-60*(8*c^4 + 32*c^3*d + 36*c^2*d^2 + 24*c*d^3 + 5*d 
^4)*Cos[e + f*x] + 10*d^2*(24*c^2 + 16*c*d + 5*d^2)*Cos[3*(e + f*x)] - 6*d 
^4*Cos[5*(e + f*x)] + 15*(4*(8*c^4 + 16*c^3*d + 24*c^2*d^2 + 12*c*d^3 + 3* 
d^4)*f*x - 8*d*(4*c^3 + 6*c^2*d + 4*c*d^2 + d^3)*Sin[2*(e + f*x)] + d^3*(4 
*c + d)*Sin[4*(e + f*x)])))/(480*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 
)
 

Rubi [A] (verified)

Time = 0.81 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.06, number of steps used = 8, number of rules used = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.348, Rules used = {3042, 3232, 3042, 3232, 3042, 3232, 3042, 3213}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int (a \sin (e+f x)+a) (c+d \sin (e+f x))^4 \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int (a \sin (e+f x)+a) (c+d \sin (e+f x))^4dx\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {1}{5} \int (c+d \sin (e+f x))^3 (a (5 c+4 d)+a (4 c+5 d) \sin (e+f x))dx-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \int (c+d \sin (e+f x))^3 (a (5 c+4 d)+a (4 c+5 d) \sin (e+f x))dx-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \int (c+d \sin (e+f x))^2 \left (a \left (20 c^2+28 d c+15 d^2\right )+a \left (12 c^2+35 d c+16 d^2\right ) \sin (e+f x)\right )dx-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \int (c+d \sin (e+f x))^2 \left (a \left (20 c^2+28 d c+15 d^2\right )+a \left (12 c^2+35 d c+16 d^2\right ) \sin (e+f x)\right )dx-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \int (c+d \sin (e+f x)) \left (a \left (60 c^3+108 d c^2+115 d^2 c+32 d^3\right )+a \left (24 c^3+130 d c^2+116 d^2 c+45 d^3\right ) \sin (e+f x)\right )dx-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \int (c+d \sin (e+f x)) \left (a \left (60 c^3+108 d c^2+115 d^2 c+32 d^3\right )+a \left (24 c^3+130 d c^2+116 d^2 c+45 d^3\right ) \sin (e+f x)\right )dx-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

\(\Big \downarrow \) 3213

\(\displaystyle \frac {1}{5} \left (\frac {1}{4} \left (\frac {1}{3} \left (-\frac {a d \left (24 c^3+130 c^2 d+116 c d^2+45 d^3\right ) \sin (e+f x) \cos (e+f x)}{2 f}-\frac {2 a \left (12 c^4+95 c^3 d+112 c^2 d^2+80 c d^3+16 d^4\right ) \cos (e+f x)}{f}+\frac {15}{2} a x \left (8 c^4+16 c^3 d+24 c^2 d^2+12 c d^3+3 d^4\right )\right )-\frac {a \left (12 c^2+35 c d+16 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )-\frac {a (4 c+5 d) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )-\frac {a \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}\)

Input:

Int[(a + a*Sin[e + f*x])*(c + d*Sin[e + f*x])^4,x]
 

Output:

-1/5*(a*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/f + (-1/4*(a*(4*c + 5*d)*Cos[ 
e + f*x]*(c + d*Sin[e + f*x])^3)/f + (-1/3*(a*(12*c^2 + 35*c*d + 16*d^2)*C 
os[e + f*x]*(c + d*Sin[e + f*x])^2)/f + ((15*a*(8*c^4 + 16*c^3*d + 24*c^2* 
d^2 + 12*c*d^3 + 3*d^4)*x)/2 - (2*a*(12*c^4 + 95*c^3*d + 112*c^2*d^2 + 80* 
c*d^3 + 16*d^4)*Cos[e + f*x])/f - (a*d*(24*c^3 + 130*c^2*d + 116*c*d^2 + 4 
5*d^3)*Cos[e + f*x]*Sin[e + f*x])/(2*f))/3)/4)/5
 

Defintions of rubi rules used

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3213
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) 
*(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co 
s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free 
Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
 

rule 3232
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + 
(f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( 
f*(m + 1))), x] + Simp[1/(m + 1)   Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* 
d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ 
[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 
 0] && IntegerQ[2*m]
 
Maple [A] (verified)

Time = 94.38 (sec) , antiderivative size = 190, normalized size of antiderivative = 0.84

method result size
parallelrisch \(-\frac {a \left (d \left (c +\frac {d}{2}\right ) \left (c^{2}+c d +\frac {1}{2} d^{2}\right ) \sin \left (2 f x +2 e \right )+\left (-\frac {5}{48} d^{4}-\frac {1}{2} c^{2} d^{2}-\frac {1}{3} c \,d^{3}\right ) \cos \left (3 f x +3 e \right )-\frac {d^{3} \left (\frac {d}{4}+c \right ) \sin \left (4 f x +4 e \right )}{8}+\frac {d^{4} \cos \left (5 f x +5 e \right )}{80}+\left (c^{4}+4 c^{3} d +\frac {9}{2} c^{2} d^{2}+3 c \,d^{3}+\frac {5}{8} d^{4}\right ) \cos \left (f x +e \right )+\left (\frac {8}{15}-\frac {3 f x}{8}\right ) d^{4}+c \left (-\frac {3 f x}{2}+\frac {8}{3}\right ) d^{3}+\left (-3 f x +4\right ) c^{2} d^{2}-2 c^{3} \left (f x -2\right ) d -c^{4} \left (f x -1\right )\right )}{f}\) \(190\)
parts \(a \,c^{4} x +\frac {\left (4 a c \,d^{3}+a \,d^{4}\right ) \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}-\frac {\left (6 a \,c^{2} d^{2}+4 a c \,d^{3}\right ) \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3 f}+\frac {\left (4 a \,c^{3} d +6 a \,c^{2} d^{2}\right ) \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {\left (a \,c^{4}+4 a \,c^{3} d \right ) \cos \left (f x +e \right )}{f}-\frac {a \,d^{4} \left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )}{5 f}\) \(198\)
derivativedivides \(\frac {-a \,c^{4} \cos \left (f x +e \right )+4 a \,c^{3} d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a \,c^{2} d^{2} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )+4 a c \,d^{3} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \,d^{4} \left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )}{5}+a \,c^{4} \left (f x +e \right )-4 a \,c^{3} d \cos \left (f x +e \right )+6 a \,c^{2} d^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 a c \,d^{3} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a \,d^{4} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) \(259\)
default \(\frac {-a \,c^{4} \cos \left (f x +e \right )+4 a \,c^{3} d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-2 a \,c^{2} d^{2} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )+4 a c \,d^{3} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {a \,d^{4} \left (\frac {8}{3}+\sin \left (f x +e \right )^{4}+\frac {4 \sin \left (f x +e \right )^{2}}{3}\right ) \cos \left (f x +e \right )}{5}+a \,c^{4} \left (f x +e \right )-4 a \,c^{3} d \cos \left (f x +e \right )+6 a \,c^{2} d^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-\frac {4 a c \,d^{3} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a \,d^{4} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}\) \(259\)
risch \(a \,c^{4} x +2 a \,c^{3} d x +3 a \,c^{2} d^{2} x +\frac {3 a c \,d^{3} x}{2}+\frac {3 a \,d^{4} x}{8}-\frac {a \cos \left (f x +e \right ) c^{4}}{f}-\frac {4 a \cos \left (f x +e \right ) c^{3} d}{f}-\frac {9 a \cos \left (f x +e \right ) c^{2} d^{2}}{2 f}-\frac {3 a \cos \left (f x +e \right ) c \,d^{3}}{f}-\frac {5 a \cos \left (f x +e \right ) d^{4}}{8 f}-\frac {a \,d^{4} \cos \left (5 f x +5 e \right )}{80 f}+\frac {\sin \left (4 f x +4 e \right ) a c \,d^{3}}{8 f}+\frac {\sin \left (4 f x +4 e \right ) a \,d^{4}}{32 f}+\frac {a \,d^{2} \cos \left (3 f x +3 e \right ) c^{2}}{2 f}+\frac {a \,d^{3} \cos \left (3 f x +3 e \right ) c}{3 f}+\frac {5 a \,d^{4} \cos \left (3 f x +3 e \right )}{48 f}-\frac {\sin \left (2 f x +2 e \right ) a \,c^{3} d}{f}-\frac {3 \sin \left (2 f x +2 e \right ) a \,c^{2} d^{2}}{2 f}-\frac {\sin \left (2 f x +2 e \right ) a c \,d^{3}}{f}-\frac {\sin \left (2 f x +2 e \right ) a \,d^{4}}{4 f}\) \(311\)
norman \(\frac {\left (a \,c^{4}+2 a \,c^{3} d +3 a \,c^{2} d^{2}+\frac {3}{2} a c \,d^{3}+\frac {3}{8} a \,d^{4}\right ) x +\left (a \,c^{4}+2 a \,c^{3} d +3 a \,c^{2} d^{2}+\frac {3}{2} a c \,d^{3}+\frac {3}{8} a \,d^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{10}+\left (5 a \,c^{4}+10 a \,c^{3} d +15 a \,c^{2} d^{2}+\frac {15}{2} a c \,d^{3}+\frac {15}{8} a \,d^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (5 a \,c^{4}+10 a \,c^{3} d +15 a \,c^{2} d^{2}+\frac {15}{2} a c \,d^{3}+\frac {15}{8} a \,d^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}+\left (10 a \,c^{4}+20 a \,c^{3} d +30 a \,c^{2} d^{2}+15 a c \,d^{3}+\frac {15}{4} a \,d^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (10 a \,c^{4}+20 a \,c^{3} d +30 a \,c^{2} d^{2}+15 a c \,d^{3}+\frac {15}{4} a \,d^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}-\frac {30 a \,c^{4}+120 a \,c^{3} d +120 a \,c^{2} d^{2}+80 a c \,d^{3}+16 a \,d^{4}}{15 f}-\frac {\left (2 a \,c^{4}+8 a \,c^{3} d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{f}-\frac {2 \left (4 a \,c^{4}+16 a \,c^{3} d +12 a \,c^{2} d^{2}+8 a c \,d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{f}-\frac {2 \left (18 a \,c^{4}+72 a \,c^{3} d +84 a \,c^{2} d^{2}+56 a c \,d^{3}+16 a \,d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{3 f}-\frac {\left (24 a \,c^{4}+96 a \,c^{3} d +120 a \,c^{2} d^{2}+80 a c \,d^{3}+16 a \,d^{4}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{3 f}-\frac {a d \left (16 c^{3}+24 c^{2} d +12 c \,d^{2}+3 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {a d \left (16 c^{3}+24 c^{2} d +12 c \,d^{2}+3 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{4 f}-\frac {a d \left (16 c^{3}+24 c^{2} d +28 c \,d^{2}+7 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 f}+\frac {a d \left (16 c^{3}+24 c^{2} d +28 c \,d^{2}+7 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{2 f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{5}}\) \(682\)
orering \(\text {Expression too large to display}\) \(3644\)

Input:

int((a+sin(f*x+e)*a)*(c+d*sin(f*x+e))^4,x,method=_RETURNVERBOSE)
 

Output:

-a*(d*(c+1/2*d)*(c^2+c*d+1/2*d^2)*sin(2*f*x+2*e)+(-5/48*d^4-1/2*c^2*d^2-1/ 
3*c*d^3)*cos(3*f*x+3*e)-1/8*d^3*(1/4*d+c)*sin(4*f*x+4*e)+1/80*d^4*cos(5*f* 
x+5*e)+(c^4+4*c^3*d+9/2*c^2*d^2+3*c*d^3+5/8*d^4)*cos(f*x+e)+(8/15-3/8*f*x) 
*d^4+c*(-3/2*f*x+8/3)*d^3+(-3*f*x+4)*c^2*d^2-2*c^3*(f*x-2)*d-c^4*(f*x-1))/ 
f
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.90 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=-\frac {24 \, a d^{4} \cos \left (f x + e\right )^{5} - 80 \, {\left (3 \, a c^{2} d^{2} + 2 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (8 \, a c^{4} + 16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 12 \, a c d^{3} + 3 \, a d^{4}\right )} f x + 120 \, {\left (a c^{4} + 4 \, a c^{3} d + 6 \, a c^{2} d^{2} + 4 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right ) - 15 \, {\left (2 \, {\left (4 \, a c d^{3} + a d^{4}\right )} \cos \left (f x + e\right )^{3} - {\left (16 \, a c^{3} d + 24 \, a c^{2} d^{2} + 20 \, a c d^{3} + 5 \, a d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{120 \, f} \] Input:

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x, algorithm="fricas")
 

Output:

-1/120*(24*a*d^4*cos(f*x + e)^5 - 80*(3*a*c^2*d^2 + 2*a*c*d^3 + a*d^4)*cos 
(f*x + e)^3 - 15*(8*a*c^4 + 16*a*c^3*d + 24*a*c^2*d^2 + 12*a*c*d^3 + 3*a*d 
^4)*f*x + 120*(a*c^4 + 4*a*c^3*d + 6*a*c^2*d^2 + 4*a*c*d^3 + a*d^4)*cos(f* 
x + e) - 15*(2*(4*a*c*d^3 + a*d^4)*cos(f*x + e)^3 - (16*a*c^3*d + 24*a*c^2 
*d^2 + 20*a*c*d^3 + 5*a*d^4)*cos(f*x + e))*sin(f*x + e))/f
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 580 vs. \(2 (218) = 436\).

Time = 0.34 (sec) , antiderivative size = 580, normalized size of antiderivative = 2.56 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=\begin {cases} a c^{4} x - \frac {a c^{4} \cos {\left (e + f x \right )}}{f} + 2 a c^{3} d x \sin ^{2}{\left (e + f x \right )} + 2 a c^{3} d x \cos ^{2}{\left (e + f x \right )} - \frac {2 a c^{3} d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a c^{3} d \cos {\left (e + f x \right )}}{f} + 3 a c^{2} d^{2} x \sin ^{2}{\left (e + f x \right )} + 3 a c^{2} d^{2} x \cos ^{2}{\left (e + f x \right )} - \frac {6 a c^{2} d^{2} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a c^{2} d^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a c^{2} d^{2} \cos ^{3}{\left (e + f x \right )}}{f} + \frac {3 a c d^{3} x \sin ^{4}{\left (e + f x \right )}}{2} + 3 a c d^{3} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )} + \frac {3 a c d^{3} x \cos ^{4}{\left (e + f x \right )}}{2} - \frac {5 a c d^{3} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {4 a c d^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {3 a c d^{3} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{2 f} - \frac {8 a c d^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 a d^{4} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 a d^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 a d^{4} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {a d^{4} \sin ^{4}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {5 a d^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {4 a d^{4} \sin ^{2}{\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{3 f} - \frac {3 a d^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} - \frac {8 a d^{4} \cos ^{5}{\left (e + f x \right )}}{15 f} & \text {for}\: f \neq 0 \\x \left (c + d \sin {\left (e \right )}\right )^{4} \left (a \sin {\left (e \right )} + a\right ) & \text {otherwise} \end {cases} \] Input:

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))**4,x)
 

Output:

Piecewise((a*c**4*x - a*c**4*cos(e + f*x)/f + 2*a*c**3*d*x*sin(e + f*x)**2 
 + 2*a*c**3*d*x*cos(e + f*x)**2 - 2*a*c**3*d*sin(e + f*x)*cos(e + f*x)/f - 
 4*a*c**3*d*cos(e + f*x)/f + 3*a*c**2*d**2*x*sin(e + f*x)**2 + 3*a*c**2*d* 
*2*x*cos(e + f*x)**2 - 6*a*c**2*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 3*a* 
c**2*d**2*sin(e + f*x)*cos(e + f*x)/f - 4*a*c**2*d**2*cos(e + f*x)**3/f + 
3*a*c*d**3*x*sin(e + f*x)**4/2 + 3*a*c*d**3*x*sin(e + f*x)**2*cos(e + f*x) 
**2 + 3*a*c*d**3*x*cos(e + f*x)**4/2 - 5*a*c*d**3*sin(e + f*x)**3*cos(e + 
f*x)/(2*f) - 4*a*c*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*a*c*d**3*sin(e 
+ f*x)*cos(e + f*x)**3/(2*f) - 8*a*c*d**3*cos(e + f*x)**3/(3*f) + 3*a*d**4 
*x*sin(e + f*x)**4/8 + 3*a*d**4*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*a* 
d**4*x*cos(e + f*x)**4/8 - a*d**4*sin(e + f*x)**4*cos(e + f*x)/f - 5*a*d** 
4*sin(e + f*x)**3*cos(e + f*x)/(8*f) - 4*a*d**4*sin(e + f*x)**2*cos(e + f* 
x)**3/(3*f) - 3*a*d**4*sin(e + f*x)*cos(e + f*x)**3/(8*f) - 8*a*d**4*cos(e 
 + f*x)**5/(15*f), Ne(f, 0)), (x*(c + d*sin(e))**4*(a*sin(e) + a), True))
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 250, normalized size of antiderivative = 1.10 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=\frac {480 \, {\left (f x + e\right )} a c^{4} + 480 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{3} d + 960 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c^{2} d^{2} + 720 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a c^{2} d^{2} + 640 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a c d^{3} + 60 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a c d^{3} - 32 \, {\left (3 \, \cos \left (f x + e\right )^{5} - 10 \, \cos \left (f x + e\right )^{3} + 15 \, \cos \left (f x + e\right )\right )} a d^{4} + 15 \, {\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a d^{4} - 480 \, a c^{4} \cos \left (f x + e\right ) - 1920 \, a c^{3} d \cos \left (f x + e\right )}{480 \, f} \] Input:

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x, algorithm="maxima")
 

Output:

1/480*(480*(f*x + e)*a*c^4 + 480*(2*f*x + 2*e - sin(2*f*x + 2*e))*a*c^3*d 
+ 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*a*c^2*d^2 + 720*(2*f*x + 2*e - sin 
(2*f*x + 2*e))*a*c^2*d^2 + 640*(cos(f*x + e)^3 - 3*cos(f*x + e))*a*c*d^3 + 
 60*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*c*d^3 - 32*( 
3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*a*d^4 + 15*(12*f*x 
 + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a*d^4 - 480*a*c^4*cos(f*x 
 + e) - 1920*a*c^3*d*cos(f*x + e))/f
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 263, normalized size of antiderivative = 1.16 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=-\frac {a d^{4} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {a c d^{3} \cos \left (3 \, f x + 3 \, e\right )}{3 \, f} + \frac {a c d^{3} \sin \left (4 \, f x + 4 \, e\right )}{8 \, f} + \frac {a d^{4} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {1}{8} \, {\left (8 \, a c^{4} + 24 \, a c^{2} d^{2} + 3 \, a d^{4}\right )} x + \frac {1}{2} \, {\left (4 \, a c^{3} d + 3 \, a c d^{3}\right )} x + \frac {{\left (24 \, a c^{2} d^{2} + 5 \, a d^{4}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (8 \, a c^{4} + 36 \, a c^{2} d^{2} + 5 \, a d^{4}\right )} \cos \left (f x + e\right )}{8 \, f} - \frac {{\left (4 \, a c^{3} d + 3 \, a c d^{3}\right )} \cos \left (f x + e\right )}{f} - \frac {{\left (a c^{3} d + a c d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{f} - \frac {{\left (6 \, a c^{2} d^{2} + a d^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:

integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x, algorithm="giac")
 

Output:

-1/80*a*d^4*cos(5*f*x + 5*e)/f + 1/3*a*c*d^3*cos(3*f*x + 3*e)/f + 1/8*a*c* 
d^3*sin(4*f*x + 4*e)/f + 1/32*a*d^4*sin(4*f*x + 4*e)/f + 1/8*(8*a*c^4 + 24 
*a*c^2*d^2 + 3*a*d^4)*x + 1/2*(4*a*c^3*d + 3*a*c*d^3)*x + 1/48*(24*a*c^2*d 
^2 + 5*a*d^4)*cos(3*f*x + 3*e)/f - 1/8*(8*a*c^4 + 36*a*c^2*d^2 + 5*a*d^4)* 
cos(f*x + e)/f - (4*a*c^3*d + 3*a*c*d^3)*cos(f*x + e)/f - (a*c^3*d + a*c*d 
^3)*sin(2*f*x + 2*e)/f - 1/4*(6*a*c^2*d^2 + a*d^4)*sin(2*f*x + 2*e)/f
 

Mupad [B] (verification not implemented)

Time = 18.63 (sec) , antiderivative size = 559, normalized size of antiderivative = 2.46 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=\frac {a\,\mathrm {atan}\left (\frac {a\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (8\,c^4+16\,c^3\,d+24\,c^2\,d^2+12\,c\,d^3+3\,d^4\right )}{4\,\left (2\,a\,c^4+4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )}\right )\,\left (8\,c^4+16\,c^3\,d+24\,c^2\,d^2+12\,c\,d^3+3\,d^4\right )}{4\,f}-\frac {{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (8\,a\,c^4+32\,a\,c^3\,d+40\,a\,c^2\,d^2+\frac {80\,a\,c\,d^3}{3}+\frac {16\,a\,d^4}{3}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4\,\left (12\,a\,c^4+48\,a\,c^3\,d+56\,a\,c^2\,d^2+\frac {112\,a\,c\,d^3}{3}+\frac {32\,a\,d^4}{3}\right )+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8\,\left (2\,a\,c^4+8\,a\,d\,c^3\right )+2\,a\,c^4+\frac {16\,a\,d^4}{15}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6\,\left (8\,a\,c^4+32\,a\,c^3\,d+24\,a\,c^2\,d^2+16\,a\,c\,d^3\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^9\,\left (4\,a\,c^3\,d+6\,a\,c^2\,d^2+3\,a\,c\,d^3+\frac {3\,a\,d^4}{4}\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (8\,a\,c^3\,d+12\,a\,c^2\,d^2+14\,a\,c\,d^3+\frac {7\,a\,d^4}{2}\right )-{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^7\,\left (8\,a\,c^3\,d+12\,a\,c^2\,d^2+14\,a\,c\,d^3+\frac {7\,a\,d^4}{2}\right )+8\,a\,c^2\,d^2+\frac {16\,a\,c\,d^3}{3}+8\,a\,c^3\,d}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \] Input:

int((a + a*sin(e + f*x))*(c + d*sin(e + f*x))^4,x)
 

Output:

(a*atan((a*tan(e/2 + (f*x)/2)*(12*c*d^3 + 16*c^3*d + 8*c^4 + 3*d^4 + 24*c^ 
2*d^2))/(4*(2*a*c^4 + (3*a*d^4)/4 + 6*a*c^2*d^2 + 3*a*c*d^3 + 4*a*c^3*d))) 
*(12*c*d^3 + 16*c^3*d + 8*c^4 + 3*d^4 + 24*c^2*d^2))/(4*f) - (tan(e/2 + (f 
*x)/2)^2*(8*a*c^4 + (16*a*d^4)/3 + 40*a*c^2*d^2 + (80*a*c*d^3)/3 + 32*a*c^ 
3*d) + tan(e/2 + (f*x)/2)^4*(12*a*c^4 + (32*a*d^4)/3 + 56*a*c^2*d^2 + (112 
*a*c*d^3)/3 + 48*a*c^3*d) + tan(e/2 + (f*x)/2)*((3*a*d^4)/4 + 6*a*c^2*d^2 
+ 3*a*c*d^3 + 4*a*c^3*d) + tan(e/2 + (f*x)/2)^8*(2*a*c^4 + 8*a*c^3*d) + 2* 
a*c^4 + (16*a*d^4)/15 + tan(e/2 + (f*x)/2)^6*(8*a*c^4 + 24*a*c^2*d^2 + 16* 
a*c*d^3 + 32*a*c^3*d) - tan(e/2 + (f*x)/2)^9*((3*a*d^4)/4 + 6*a*c^2*d^2 + 
3*a*c*d^3 + 4*a*c^3*d) + tan(e/2 + (f*x)/2)^3*((7*a*d^4)/2 + 12*a*c^2*d^2 
+ 14*a*c*d^3 + 8*a*c^3*d) - tan(e/2 + (f*x)/2)^7*((7*a*d^4)/2 + 12*a*c^2*d 
^2 + 14*a*c*d^3 + 8*a*c^3*d) + 8*a*c^2*d^2 + (16*a*c*d^3)/3 + 8*a*c^3*d)/( 
f*(5*tan(e/2 + (f*x)/2)^2 + 10*tan(e/2 + (f*x)/2)^4 + 10*tan(e/2 + (f*x)/2 
)^6 + 5*tan(e/2 + (f*x)/2)^8 + tan(e/2 + (f*x)/2)^10 + 1))
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.45 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x))^4 \, dx=\frac {a \left (-24 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} d^{4}-30 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} d^{4}-32 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} d^{4}-45 \cos \left (f x +e \right ) \sin \left (f x +e \right ) d^{4}-480 \cos \left (f x +e \right ) c^{3} d -480 \cos \left (f x +e \right ) c^{2} d^{2}-320 \cos \left (f x +e \right ) c \,d^{3}+120 c^{4} f x +45 d^{4} f x +64 d^{4}-120 \cos \left (f x +e \right ) c^{4}-64 \cos \left (f x +e \right ) d^{4}+480 c^{3} d +480 c^{2} d^{2}+320 c \,d^{3}-120 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} c \,d^{3}-240 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} c^{2} d^{2}-160 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} c \,d^{3}-240 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{3} d -360 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{2} d^{2}-180 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c \,d^{3}+240 c^{3} d f x +360 c^{2} d^{2} f x +180 c \,d^{3} f x +120 c^{4}\right )}{120 f} \] Input:

int((a+a*sin(f*x+e))*(c+d*sin(f*x+e))^4,x)
 

Output:

(a*( - 24*cos(e + f*x)*sin(e + f*x)**4*d**4 - 120*cos(e + f*x)*sin(e + f*x 
)**3*c*d**3 - 30*cos(e + f*x)*sin(e + f*x)**3*d**4 - 240*cos(e + f*x)*sin( 
e + f*x)**2*c**2*d**2 - 160*cos(e + f*x)*sin(e + f*x)**2*c*d**3 - 32*cos(e 
 + f*x)*sin(e + f*x)**2*d**4 - 240*cos(e + f*x)*sin(e + f*x)*c**3*d - 360* 
cos(e + f*x)*sin(e + f*x)*c**2*d**2 - 180*cos(e + f*x)*sin(e + f*x)*c*d**3 
 - 45*cos(e + f*x)*sin(e + f*x)*d**4 - 120*cos(e + f*x)*c**4 - 480*cos(e + 
 f*x)*c**3*d - 480*cos(e + f*x)*c**2*d**2 - 320*cos(e + f*x)*c*d**3 - 64*c 
os(e + f*x)*d**4 + 120*c**4*f*x + 120*c**4 + 240*c**3*d*f*x + 480*c**3*d + 
 360*c**2*d**2*f*x + 480*c**2*d**2 + 180*c*d**3*f*x + 320*c*d**3 + 45*d**4 
*f*x + 64*d**4))/(120*f)