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

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 = 25, antiderivative size = 318 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=\frac {1}{16} a^2 \left (24 c^4+64 c^3 d+84 c^2 d^2+48 c d^3+11 d^4\right ) x+\frac {a^2 \left (4 c^5-48 c^4 d-311 c^3 d^2-448 c^2 d^3-288 c d^4-64 d^5\right ) \cos (e+f x)}{60 d f}+\frac {a^2 \left (8 c^4-96 c^3 d-438 c^2 d^2-464 c d^3-165 d^4\right ) \cos (e+f x) \sin (e+f x)}{240 f}+\frac {a^2 \left (4 c^3-48 c^2 d-123 c d^2-64 d^3\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d f}+\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d f}+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d f}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f} \] Output:

1/16*a^2*(24*c^4+64*c^3*d+84*c^2*d^2+48*c*d^3+11*d^4)*x+1/60*a^2*(4*c^5-48 
*c^4*d-311*c^3*d^2-448*c^2*d^3-288*c*d^4-64*d^5)*cos(f*x+e)/d/f+1/240*a^2* 
(8*c^4-96*c^3*d-438*c^2*d^2-464*c*d^3-165*d^4)*cos(f*x+e)*sin(f*x+e)/f+1/1 
20*a^2*(4*c^3-48*c^2*d-123*c*d^2-64*d^3)*cos(f*x+e)*(c+d*sin(f*x+e))^2/d/f 
+1/120*a^2*(4*c^2-48*c*d-55*d^2)*cos(f*x+e)*(c+d*sin(f*x+e))^3/d/f+1/30*a^ 
2*(c-12*d)*cos(f*x+e)*(c+d*sin(f*x+e))^4/d/f-1/6*a^2*cos(f*x+e)*(c+d*sin(f 
*x+e))^5/d/f
 

Mathematica [A] (verified)

Time = 1.51 (sec) , antiderivative size = 262, normalized size of antiderivative = 0.82 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=-\frac {a^2 \cos (e+f x) \left (30 \left (24 c^4+64 c^3 d+84 c^2 d^2+48 c d^3+11 d^4\right ) \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )+\sqrt {\cos ^2(e+f x)} \left (32 \left (15 c^4+50 c^3 d+60 c^2 d^2+36 c d^3+8 d^4\right )+15 \left (8 c^4+64 c^3 d+84 c^2 d^2+48 c d^3+11 d^4\right ) \sin (e+f x)+64 d \left (5 c^3+15 c^2 d+9 c d^2+2 d^3\right ) \sin ^2(e+f x)+10 d^2 \left (36 c^2+48 c d+11 d^2\right ) \sin ^3(e+f x)+96 d^3 (2 c+d) \sin ^4(e+f x)+40 d^4 \sin ^5(e+f x)\right )\right )}{240 f \sqrt {\cos ^2(e+f x)}} \] Input:

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

Output:

-1/240*(a^2*Cos[e + f*x]*(30*(24*c^4 + 64*c^3*d + 84*c^2*d^2 + 48*c*d^3 + 
11*d^4)*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]] + Sqrt[Cos[e + f*x]^2]*(32* 
(15*c^4 + 50*c^3*d + 60*c^2*d^2 + 36*c*d^3 + 8*d^4) + 15*(8*c^4 + 64*c^3*d 
 + 84*c^2*d^2 + 48*c*d^3 + 11*d^4)*Sin[e + f*x] + 64*d*(5*c^3 + 15*c^2*d + 
 9*c*d^2 + 2*d^3)*Sin[e + f*x]^2 + 10*d^2*(36*c^2 + 48*c*d + 11*d^2)*Sin[e 
 + f*x]^3 + 96*d^3*(2*c + d)*Sin[e + f*x]^4 + 40*d^4*Sin[e + f*x]^5)))/(f* 
Sqrt[Cos[e + f*x]^2])
 

Rubi [A] (verified)

Time = 1.12 (sec) , antiderivative size = 329, normalized size of antiderivative = 1.03, number of steps used = 11, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.440, Rules used = {3042, 3242, 3042, 3232, 3042, 3232, 27, 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)^2 (c+d \sin (e+f x))^4 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3242

\(\displaystyle \frac {\int \left (11 a^2 d-a^2 (c-12 d) \sin (e+f x)\right ) (c+d \sin (e+f x))^4dx}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int \left (11 a^2 d-a^2 (c-12 d) \sin (e+f x)\right ) (c+d \sin (e+f x))^4dx}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {\frac {1}{5} \int (c+d \sin (e+f x))^3 \left (3 a^2 d (17 c+16 d)-a^2 \left (4 c^2-48 d c-55 d^2\right ) \sin (e+f x)\right )dx+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{5} \int (c+d \sin (e+f x))^3 \left (3 a^2 d (17 c+16 d)-a^2 \left (4 c^2-48 d c-55 d^2\right ) \sin (e+f x)\right )dx+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {\frac {1}{5} \left (\frac {1}{4} \int 3 (c+d \sin (e+f x))^2 \left (a^2 d \left (64 c^2+112 d c+55 d^2\right )-a^2 \left (4 c^3-48 d c^2-123 d^2 c-64 d^3\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \int (c+d \sin (e+f x))^2 \left (a^2 d \left (64 c^2+112 d c+55 d^2\right )-a^2 \left (4 c^3-48 d c^2-123 d^2 c-64 d^3\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \int (c+d \sin (e+f x))^2 \left (a^2 d \left (64 c^2+112 d c+55 d^2\right )-a^2 \left (4 c^3-48 d c^2-123 d^2 c-64 d^3\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \int (c+d \sin (e+f x)) \left (a^2 d \left (184 c^3+432 d c^2+411 d^2 c+128 d^3\right )-a^2 \left (8 c^4-96 d c^3-438 d^2 c^2-464 d^3 c-165 d^4\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (4 c^3-48 c^2 d-123 c d^2-64 d^3\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )+\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \int (c+d \sin (e+f x)) \left (a^2 d \left (184 c^3+432 d c^2+411 d^2 c+128 d^3\right )-a^2 \left (8 c^4-96 d c^3-438 d^2 c^2-464 d^3 c-165 d^4\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (4 c^3-48 c^2 d-123 c d^2-64 d^3\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )+\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}\right )+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

\(\Big \downarrow \) 3213

\(\displaystyle \frac {\frac {1}{5} \left (\frac {a^2 \left (4 c^2-48 c d-55 d^2\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}+\frac {3}{4} \left (\frac {a^2 \left (4 c^3-48 c^2 d-123 c d^2-64 d^3\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}+\frac {1}{3} \left (\frac {a^2 d \left (8 c^4-96 c^3 d-438 c^2 d^2-464 c d^3-165 d^4\right ) \sin (e+f x) \cos (e+f x)}{2 f}+\frac {15}{2} a^2 d x \left (24 c^4+64 c^3 d+84 c^2 d^2+48 c d^3+11 d^4\right )+\frac {2 a^2 \left (4 c^5-48 c^4 d-311 c^3 d^2-448 c^2 d^3-288 c d^4-64 d^5\right ) \cos (e+f x)}{f}\right )\right )\right )+\frac {a^2 (c-12 d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 f}}{6 d}-\frac {a^2 \cos (e+f x) (c+d \sin (e+f x))^5}{6 d f}\)

Input:

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

Output:

-1/6*(a^2*Cos[e + f*x]*(c + d*Sin[e + f*x])^5)/(d*f) + ((a^2*(c - 12*d)*Co 
s[e + f*x]*(c + d*Sin[e + f*x])^4)/(5*f) + ((a^2*(4*c^2 - 48*c*d - 55*d^2) 
*Cos[e + f*x]*(c + d*Sin[e + f*x])^3)/(4*f) + (3*((a^2*(4*c^3 - 48*c^2*d - 
 123*c*d^2 - 64*d^3)*Cos[e + f*x]*(c + d*Sin[e + f*x])^2)/(3*f) + ((15*a^2 
*d*(24*c^4 + 64*c^3*d + 84*c^2*d^2 + 48*c*d^3 + 11*d^4)*x)/2 + (2*a^2*(4*c 
^5 - 48*c^4*d - 311*c^3*d^2 - 448*c^2*d^3 - 288*c*d^4 - 64*d^5)*Cos[e + f* 
x])/f + (a^2*d*(8*c^4 - 96*c^3*d - 438*c^2*d^2 - 464*c*d^3 - 165*d^4)*Cos[ 
e + f*x]*Sin[e + f*x])/(2*f))/3))/4)/5)/(6*d)
 

Defintions of rubi rules used

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

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]
 

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

Time = 1.12 (sec) , antiderivative size = 462, normalized size of antiderivative = 1.45

\[\frac {c^{4} a^{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^{2} c^{3} d \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+6 a^{2} c^{2} d^{2} \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 {4 a^{2} c \,d^{3} \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^{2} d^{4} \left (-\frac {\left (\sin \left (f x +e \right )^{5}+\frac {5 \sin \left (f x +e \right )^{3}}{4}+\frac {15 \sin \left (f x +e \right )}{8}\right ) \cos \left (f x +e \right )}{6}+\frac {5 f x}{16}+\frac {5 e}{16}\right )-2 a^{2} c^{4} \cos \left (f x +e \right )+8 a^{2} 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 )-4 a^{2} c^{2} d^{2} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )+8 a^{2} 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 {2 a^{2} 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}+c^{4} a^{2} \left (f x +e \right )-4 a^{2} c^{3} d \cos \left (f x +e \right )+6 a^{2} 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^{2} c \,d^{3} \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+a^{2} 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}\]

Input:

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

Output:

1/f*(c^4*a^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-4/3*a^2*c^3*d*(2+s 
in(f*x+e)^2)*cos(f*x+e)+6*a^2*c^2*d^2*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))* 
cos(f*x+e)+3/8*f*x+3/8*e)-4/5*a^2*c*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2 
)*cos(f*x+e)+a^2*d^4*(-1/6*(sin(f*x+e)^5+5/4*sin(f*x+e)^3+15/8*sin(f*x+e)) 
*cos(f*x+e)+5/16*f*x+5/16*e)-2*a^2*c^4*cos(f*x+e)+8*a^2*c^3*d*(-1/2*cos(f* 
x+e)*sin(f*x+e)+1/2*f*x+1/2*e)-4*a^2*c^2*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+8 
*a^2*c*d^3*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-2 
/5*a^2*d^4*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+c^4*a^2*(f*x+e)- 
4*a^2*c^3*d*cos(f*x+e)+6*a^2*c^2*d^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1/2*f*x+1 
/2*e)-4/3*a^2*c*d^3*(2+sin(f*x+e)^2)*cos(f*x+e)+a^2*d^4*(-1/4*(sin(f*x+e)^ 
3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e))
 

Fricas [A] (verification not implemented)

Time = 0.11 (sec) , antiderivative size = 299, normalized size of antiderivative = 0.94 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=-\frac {96 \, {\left (2 \, a^{2} c d^{3} + a^{2} d^{4}\right )} \cos \left (f x + e\right )^{5} - 320 \, {\left (a^{2} c^{3} d + 3 \, a^{2} c^{2} d^{2} + 3 \, a^{2} c d^{3} + a^{2} d^{4}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (24 \, a^{2} c^{4} + 64 \, a^{2} c^{3} d + 84 \, a^{2} c^{2} d^{2} + 48 \, a^{2} c d^{3} + 11 \, a^{2} d^{4}\right )} f x + 480 \, {\left (a^{2} c^{4} + 4 \, a^{2} c^{3} d + 6 \, a^{2} c^{2} d^{2} + 4 \, a^{2} c d^{3} + a^{2} d^{4}\right )} \cos \left (f x + e\right ) + 5 \, {\left (8 \, a^{2} d^{4} \cos \left (f x + e\right )^{5} - 2 \, {\left (36 \, a^{2} c^{2} d^{2} + 48 \, a^{2} c d^{3} + 19 \, a^{2} d^{4}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (8 \, a^{2} c^{4} + 64 \, a^{2} c^{3} d + 108 \, a^{2} c^{2} d^{2} + 80 \, a^{2} c d^{3} + 21 \, a^{2} d^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{240 \, f} \] Input:

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

Output:

-1/240*(96*(2*a^2*c*d^3 + a^2*d^4)*cos(f*x + e)^5 - 320*(a^2*c^3*d + 3*a^2 
*c^2*d^2 + 3*a^2*c*d^3 + a^2*d^4)*cos(f*x + e)^3 - 15*(24*a^2*c^4 + 64*a^2 
*c^3*d + 84*a^2*c^2*d^2 + 48*a^2*c*d^3 + 11*a^2*d^4)*f*x + 480*(a^2*c^4 + 
4*a^2*c^3*d + 6*a^2*c^2*d^2 + 4*a^2*c*d^3 + a^2*d^4)*cos(f*x + e) + 5*(8*a 
^2*d^4*cos(f*x + e)^5 - 2*(36*a^2*c^2*d^2 + 48*a^2*c*d^3 + 19*a^2*d^4)*cos 
(f*x + e)^3 + 3*(8*a^2*c^4 + 64*a^2*c^3*d + 108*a^2*c^2*d^2 + 80*a^2*c*d^3 
 + 21*a^2*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. 1136 vs. \(2 (299) = 598\).

Time = 0.49 (sec) , antiderivative size = 1136, normalized size of antiderivative = 3.57 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=\text {Too large to display} \] Input:

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

Output:

Piecewise((a**2*c**4*x*sin(e + f*x)**2/2 + a**2*c**4*x*cos(e + f*x)**2/2 + 
 a**2*c**4*x - a**2*c**4*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*a**2*c**4*cos 
(e + f*x)/f + 4*a**2*c**3*d*x*sin(e + f*x)**2 + 4*a**2*c**3*d*x*cos(e + f* 
x)**2 - 4*a**2*c**3*d*sin(e + f*x)**2*cos(e + f*x)/f - 4*a**2*c**3*d*sin(e 
 + f*x)*cos(e + f*x)/f - 8*a**2*c**3*d*cos(e + f*x)**3/(3*f) - 4*a**2*c**3 
*d*cos(e + f*x)/f + 9*a**2*c**2*d**2*x*sin(e + f*x)**4/4 + 9*a**2*c**2*d** 
2*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 3*a**2*c**2*d**2*x*sin(e + f*x)**2 
 + 9*a**2*c**2*d**2*x*cos(e + f*x)**4/4 + 3*a**2*c**2*d**2*x*cos(e + f*x)* 
*2 - 15*a**2*c**2*d**2*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 12*a**2*c**2*d 
**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*a**2*c**2*d**2*sin(e + f*x)*cos(e + 
 f*x)**3/(4*f) - 3*a**2*c**2*d**2*sin(e + f*x)*cos(e + f*x)/f - 8*a**2*c** 
2*d**2*cos(e + f*x)**3/f + 3*a**2*c*d**3*x*sin(e + f*x)**4 + 6*a**2*c*d**3 
*x*sin(e + f*x)**2*cos(e + f*x)**2 + 3*a**2*c*d**3*x*cos(e + f*x)**4 - 4*a 
**2*c*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*a**2*c*d**3*sin(e + f*x)**3* 
cos(e + f*x)/f - 16*a**2*c*d**3*sin(e + f*x)**2*cos(e + f*x)**3/(3*f) - 4* 
a**2*c*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*a**2*c*d**3*sin(e + f*x)*co 
s(e + f*x)**3/f - 32*a**2*c*d**3*cos(e + f*x)**5/(15*f) - 8*a**2*c*d**3*co 
s(e + f*x)**3/(3*f) + 5*a**2*d**4*x*sin(e + f*x)**6/16 + 15*a**2*d**4*x*si 
n(e + f*x)**4*cos(e + f*x)**2/16 + 3*a**2*d**4*x*sin(e + f*x)**4/8 + 15*a* 
*2*d**4*x*sin(e + f*x)**2*cos(e + f*x)**4/16 + 3*a**2*d**4*x*sin(e + f*...
 

Maxima [A] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 451, normalized size of antiderivative = 1.42 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=\frac {240 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{4} + 960 \, {\left (f x + e\right )} a^{2} c^{4} + 1280 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c^{3} d + 1920 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{3} d + 3840 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c^{2} d^{2} + 180 \, {\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^{2} c^{2} d^{2} + 1440 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} c^{2} d^{2} - 256 \, {\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^{2} c d^{3} + 1280 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a^{2} c d^{3} + 240 \, {\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^{2} c d^{3} - 128 \, {\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^{2} d^{4} + 5 \, {\left (4 \, \sin \left (2 \, f x + 2 \, e\right )^{3} + 60 \, f x + 60 \, e + 9 \, \sin \left (4 \, f x + 4 \, e\right ) - 48 \, \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} d^{4} + 30 \, {\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^{2} d^{4} - 1920 \, a^{2} c^{4} \cos \left (f x + e\right ) - 3840 \, a^{2} c^{3} d \cos \left (f x + e\right )}{960 \, f} \] Input:

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

Output:

1/960*(240*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^4 + 960*(f*x + e)*a^2*c^ 
4 + 1280*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2*c^3*d + 1920*(2*f*x + 2*e - 
 sin(2*f*x + 2*e))*a^2*c^3*d + 3840*(cos(f*x + e)^3 - 3*cos(f*x + e))*a^2* 
c^2*d^2 + 180*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2* 
c^2*d^2 + 1440*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^2*d^2 - 256*(3*cos(f 
*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*a^2*c*d^3 + 1280*(cos(f*x 
 + e)^3 - 3*cos(f*x + e))*a^2*c*d^3 + 240*(12*f*x + 12*e + sin(4*f*x + 4*e 
) - 8*sin(2*f*x + 2*e))*a^2*c*d^3 - 128*(3*cos(f*x + e)^5 - 10*cos(f*x + e 
)^3 + 15*cos(f*x + e))*a^2*d^4 + 5*(4*sin(2*f*x + 2*e)^3 + 60*f*x + 60*e + 
 9*sin(4*f*x + 4*e) - 48*sin(2*f*x + 2*e))*a^2*d^4 + 30*(12*f*x + 12*e + s 
in(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*a^2*d^4 - 1920*a^2*c^4*cos(f*x + e) 
- 3840*a^2*c^3*d*cos(f*x + e))/f
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 448, normalized size of antiderivative = 1.41 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=\frac {a^{2} c d^{3} \cos \left (3 \, f x + 3 \, e\right )}{3 \, f} - \frac {a^{2} d^{4} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {a^{2} d^{4} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {1}{16} \, {\left (8 \, a^{2} c^{4} + 64 \, a^{2} c^{3} d + 36 \, a^{2} c^{2} d^{2} + 48 \, a^{2} c d^{3} + 5 \, a^{2} d^{4}\right )} x + \frac {1}{8} \, {\left (8 \, a^{2} c^{4} + 24 \, a^{2} c^{2} d^{2} + 3 \, a^{2} d^{4}\right )} x - \frac {{\left (2 \, a^{2} c d^{3} + a^{2} d^{4}\right )} \cos \left (5 \, f x + 5 \, e\right )}{40 \, f} + \frac {{\left (8 \, a^{2} c^{3} d + 24 \, a^{2} c^{2} d^{2} + 10 \, a^{2} c d^{3} + 5 \, a^{2} d^{4}\right )} \cos \left (3 \, f x + 3 \, e\right )}{24 \, f} - \frac {{\left (8 \, a^{2} c^{4} + 12 \, a^{2} c^{3} d + 36 \, a^{2} c^{2} d^{2} + 10 \, a^{2} c d^{3} + 5 \, a^{2} d^{4}\right )} \cos \left (f x + e\right )}{4 \, f} - \frac {{\left (4 \, a^{2} c^{3} d + 3 \, a^{2} c d^{3}\right )} \cos \left (f x + e\right )}{f} + \frac {{\left (12 \, a^{2} c^{2} d^{2} + 16 \, a^{2} c d^{3} + 3 \, a^{2} d^{4}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} - \frac {{\left (16 \, a^{2} c^{4} + 128 \, a^{2} c^{3} d + 96 \, a^{2} c^{2} d^{2} + 128 \, a^{2} c d^{3} + 15 \, a^{2} d^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} - \frac {{\left (6 \, a^{2} c^{2} d^{2} + a^{2} d^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:

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

Output:

1/3*a^2*c*d^3*cos(3*f*x + 3*e)/f - 1/192*a^2*d^4*sin(6*f*x + 6*e)/f + 1/32 
*a^2*d^4*sin(4*f*x + 4*e)/f + 1/16*(8*a^2*c^4 + 64*a^2*c^3*d + 36*a^2*c^2* 
d^2 + 48*a^2*c*d^3 + 5*a^2*d^4)*x + 1/8*(8*a^2*c^4 + 24*a^2*c^2*d^2 + 3*a^ 
2*d^4)*x - 1/40*(2*a^2*c*d^3 + a^2*d^4)*cos(5*f*x + 5*e)/f + 1/24*(8*a^2*c 
^3*d + 24*a^2*c^2*d^2 + 10*a^2*c*d^3 + 5*a^2*d^4)*cos(3*f*x + 3*e)/f - 1/4 
*(8*a^2*c^4 + 12*a^2*c^3*d + 36*a^2*c^2*d^2 + 10*a^2*c*d^3 + 5*a^2*d^4)*co 
s(f*x + e)/f - (4*a^2*c^3*d + 3*a^2*c*d^3)*cos(f*x + e)/f + 1/64*(12*a^2*c 
^2*d^2 + 16*a^2*c*d^3 + 3*a^2*d^4)*sin(4*f*x + 4*e)/f - 1/64*(16*a^2*c^4 + 
 128*a^2*c^3*d + 96*a^2*c^2*d^2 + 128*a^2*c*d^3 + 15*a^2*d^4)*sin(2*f*x + 
2*e)/f - 1/4*(6*a^2*c^2*d^2 + a^2*d^4)*sin(2*f*x + 2*e)/f
 

Mupad [B] (verification not implemented)

Time = 18.50 (sec) , antiderivative size = 865, normalized size of antiderivative = 2.72 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx =\text {Too large to display} \] Input:

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

Output:

(a^2*atan((a^2*tan(e/2 + (f*x)/2)*(48*c*d^3 + 64*c^3*d + 24*c^4 + 11*d^4 + 
 84*c^2*d^2))/(8*(3*a^2*c^4 + (11*a^2*d^4)/8 + 6*a^2*c*d^3 + 8*a^2*c^3*d + 
 (21*a^2*c^2*d^2)/2)))*(48*c*d^3 + 64*c^3*d + 24*c^4 + 11*d^4 + 84*c^2*d^2 
))/(8*f) - (tan(e/2 + (f*x)/2)^8*(20*a^2*c^4 + 16*a^2*c*d^3 + 56*a^2*c^3*d 
 + 48*a^2*c^2*d^2) + tan(e/2 + (f*x)/2)^10*(4*a^2*c^4 + 8*a^2*c^3*d) + tan 
(e/2 + (f*x)/2)*(a^2*c^4 + (11*a^2*d^4)/8 + 6*a^2*c*d^3 + 8*a^2*c^3*d + (2 
1*a^2*c^2*d^2)/2) + 4*a^2*c^4 + (32*a^2*d^4)/15 - tan(e/2 + (f*x)/2)^11*(a 
^2*c^4 + (11*a^2*d^4)/8 + 6*a^2*c*d^3 + 8*a^2*c^3*d + (21*a^2*c^2*d^2)/2) 
+ tan(e/2 + (f*x)/2)^5*(2*a^2*c^4 + (47*a^2*d^4)/4 + 28*a^2*c*d^3 + 16*a^2 
*c^3*d + 33*a^2*c^2*d^2) - tan(e/2 + (f*x)/2)^7*(2*a^2*c^4 + (47*a^2*d^4)/ 
4 + 28*a^2*c*d^3 + 16*a^2*c^3*d + 33*a^2*c^2*d^2) + tan(e/2 + (f*x)/2)^3*( 
3*a^2*c^4 + (187*a^2*d^4)/24 + 34*a^2*c*d^3 + 24*a^2*c^3*d + (87*a^2*c^2*d 
^2)/2) - tan(e/2 + (f*x)/2)^9*(3*a^2*c^4 + (187*a^2*d^4)/24 + 34*a^2*c*d^3 
 + 24*a^2*c^3*d + (87*a^2*c^2*d^2)/2) + tan(e/2 + (f*x)/2)^4*(40*a^2*c^4 + 
 32*a^2*d^4 + 128*a^2*c*d^3 + 144*a^2*c^3*d + 192*a^2*c^2*d^2) + tan(e/2 + 
 (f*x)/2)^2*(20*a^2*c^4 + (64*a^2*d^4)/5 + (288*a^2*c*d^3)/5 + 72*a^2*c^3* 
d + 96*a^2*c^2*d^2) + tan(e/2 + (f*x)/2)^6*(40*a^2*c^4 + (64*a^2*d^4)/3 + 
96*a^2*c*d^3 + (400*a^2*c^3*d)/3 + 160*a^2*c^2*d^2) + (48*a^2*c*d^3)/5 + ( 
40*a^2*c^3*d)/3 + 16*a^2*c^2*d^2)/(f*(6*tan(e/2 + (f*x)/2)^2 + 15*tan(e/2 
+ (f*x)/2)^4 + 20*tan(e/2 + (f*x)/2)^6 + 15*tan(e/2 + (f*x)/2)^8 + 6*ta...
 

Reduce [B] (verification not implemented)

Time = 0.21 (sec) , antiderivative size = 429, normalized size of antiderivative = 1.35 \[ \int (a+a \sin (e+f x))^2 (c+d \sin (e+f x))^4 \, dx=\frac {a^{2} \left (-96 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} d^{4}-110 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} d^{4}-128 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} d^{4}-165 \cos \left (f x +e \right ) \sin \left (f x +e \right ) d^{4}-1600 \cos \left (f x +e \right ) c^{3} d -1920 \cos \left (f x +e \right ) c^{2} d^{2}-1152 \cos \left (f x +e \right ) c \,d^{3}+360 c^{4} f x +165 d^{4} f x -120 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{4}-40 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{5} d^{4}-192 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{4} c \,d^{3}-360 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} c^{2} d^{2}-320 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} c^{3} d +256 d^{4}-480 \cos \left (f x +e \right ) c^{4}-256 \cos \left (f x +e \right ) d^{4}+1600 c^{3} d +1920 c^{2} d^{2}+1152 c \,d^{3}-480 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} c \,d^{3}-960 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} c^{2} d^{2}-576 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} c \,d^{3}-960 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{3} d -1260 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{2} d^{2}-720 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c \,d^{3}+960 c^{3} d f x +1260 c^{2} d^{2} f x +720 c \,d^{3} f x +480 c^{4}\right )}{240 f} \] Input:

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

Output:

(a**2*( - 40*cos(e + f*x)*sin(e + f*x)**5*d**4 - 192*cos(e + f*x)*sin(e + 
f*x)**4*c*d**3 - 96*cos(e + f*x)*sin(e + f*x)**4*d**4 - 360*cos(e + f*x)*s 
in(e + f*x)**3*c**2*d**2 - 480*cos(e + f*x)*sin(e + f*x)**3*c*d**3 - 110*c 
os(e + f*x)*sin(e + f*x)**3*d**4 - 320*cos(e + f*x)*sin(e + f*x)**2*c**3*d 
 - 960*cos(e + f*x)*sin(e + f*x)**2*c**2*d**2 - 576*cos(e + f*x)*sin(e + f 
*x)**2*c*d**3 - 128*cos(e + f*x)*sin(e + f*x)**2*d**4 - 120*cos(e + f*x)*s 
in(e + f*x)*c**4 - 960*cos(e + f*x)*sin(e + f*x)*c**3*d - 1260*cos(e + f*x 
)*sin(e + f*x)*c**2*d**2 - 720*cos(e + f*x)*sin(e + f*x)*c*d**3 - 165*cos( 
e + f*x)*sin(e + f*x)*d**4 - 480*cos(e + f*x)*c**4 - 1600*cos(e + f*x)*c** 
3*d - 1920*cos(e + f*x)*c**2*d**2 - 1152*cos(e + f*x)*c*d**3 - 256*cos(e + 
 f*x)*d**4 + 360*c**4*f*x + 480*c**4 + 960*c**3*d*f*x + 1600*c**3*d + 1260 
*c**2*d**2*f*x + 1920*c**2*d**2 + 720*c*d**3*f*x + 1152*c*d**3 + 165*d**4* 
f*x + 256*d**4))/(240*f)