\(\int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx\) [251]

Optimal result
Mathematica [A] (warning: unable to verify)
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 = 35, antiderivative size = 464 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx=\frac {1}{16} a^2 \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right ) x+\frac {a^2 \left (6 A d \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right )-B \left (2 c^5-12 c^4 d+47 c^3 d^2+208 c^2 d^3+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{60 d^2 f}+\frac {a^2 \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \cos (e+f x) \sin (e+f x)}{240 d f}+\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{120 d^2 f}+\frac {a^2 \left (6 A (c-10 d) d-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{120 d^2 f}+\frac {a^2 (2 B c-6 A d-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{30 d^2 f}-\frac {B \cos (e+f x) \left (a^2+a^2 \sin (e+f x)\right ) (c+d \sin (e+f x))^4}{6 d f} \] Output:

1/16*a^2*(6*A*(4*c^3+8*c^2*d+7*c*d^2+2*d^3)+B*(16*c^3+42*c^2*d+36*c*d^2+11 
*d^3))*x+1/60*a^2*(6*A*d*(c^4-10*c^3*d-44*c^2*d^2-40*c*d^3-12*d^4)-B*(2*c^ 
5-12*c^4*d+47*c^3*d^2+208*c^2*d^3+216*c*d^4+64*d^5))*cos(f*x+e)/d^2/f+1/24 
0*a^2*(6*A*d*(2*c^3-20*c^2*d-57*c*d^2-30*d^3)-B*(4*c^4-24*c^3*d+96*c^2*d^2 
+284*c*d^3+165*d^4))*cos(f*x+e)*sin(f*x+e)/d/f+1/120*a^2*(6*A*d*(c^2-10*c* 
d-12*d^2)-B*(2*c^3-12*c^2*d+51*c*d^2+64*d^3))*cos(f*x+e)*(c+d*sin(f*x+e))^ 
2/d^2/f+1/120*a^2*(6*A*(c-10*d)*d-B*(2*c^2-12*c*d+55*d^2))*cos(f*x+e)*(c+d 
*sin(f*x+e))^3/d^2/f+1/30*a^2*(-6*A*d+2*B*c-7*B*d)*cos(f*x+e)*(c+d*sin(f*x 
+e))^4/d^2/f-1/6*B*cos(f*x+e)*(a^2+a^2*sin(f*x+e))*(c+d*sin(f*x+e))^4/d/f
 

Mathematica [A] (warning: unable to verify)

Time = 3.71 (sec) , antiderivative size = 437, normalized size of antiderivative = 0.94 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx=-\frac {a^2 \cos (e+f x) \left (60 \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right ) \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )+\sqrt {\cos ^2(e+f x)} \left (960 A c^3+880 B c^3+2640 A c^2 d+2400 B c^2 d+2400 A c d^2+2268 B c d^2+756 A d^3+712 B d^3-16 \left (3 A d \left (5 c^2+10 c d+4 d^2\right )+B \left (5 c^3+30 c^2 d+36 c d^2+14 d^3\right )\right ) \cos (2 (e+f x))+12 d^2 (3 B c+A d+2 B d) \cos (4 (e+f x))+240 A c^3 \sin (e+f x)+480 B c^3 \sin (e+f x)+1440 A c^2 d \sin (e+f x)+1530 B c^2 d \sin (e+f x)+1530 A c d^2 \sin (e+f x)+1620 B c d^2 \sin (e+f x)+540 A d^3 \sin (e+f x)+545 B d^3 \sin (e+f x)-90 B c^2 d \sin (3 (e+f x))-90 A c d^2 \sin (3 (e+f x))-180 B c d^2 \sin (3 (e+f x))-60 A d^3 \sin (3 (e+f x))-80 B d^3 \sin (3 (e+f x))+5 B d^3 \sin (5 (e+f x))\right )\right )}{480 f \sqrt {\cos ^2(e+f x)}} \] Input:

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

Output:

-1/480*(a^2*Cos[e + f*x]*(60*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B* 
(16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d^3))*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqr 
t[2]] + Sqrt[Cos[e + f*x]^2]*(960*A*c^3 + 880*B*c^3 + 2640*A*c^2*d + 2400* 
B*c^2*d + 2400*A*c*d^2 + 2268*B*c*d^2 + 756*A*d^3 + 712*B*d^3 - 16*(3*A*d* 
(5*c^2 + 10*c*d + 4*d^2) + B*(5*c^3 + 30*c^2*d + 36*c*d^2 + 14*d^3))*Cos[2 
*(e + f*x)] + 12*d^2*(3*B*c + A*d + 2*B*d)*Cos[4*(e + f*x)] + 240*A*c^3*Si 
n[e + f*x] + 480*B*c^3*Sin[e + f*x] + 1440*A*c^2*d*Sin[e + f*x] + 1530*B*c 
^2*d*Sin[e + f*x] + 1530*A*c*d^2*Sin[e + f*x] + 1620*B*c*d^2*Sin[e + f*x] 
+ 540*A*d^3*Sin[e + f*x] + 545*B*d^3*Sin[e + f*x] - 90*B*c^2*d*Sin[3*(e + 
f*x)] - 90*A*c*d^2*Sin[3*(e + f*x)] - 180*B*c*d^2*Sin[3*(e + f*x)] - 60*A* 
d^3*Sin[3*(e + f*x)] - 80*B*d^3*Sin[3*(e + f*x)] + 5*B*d^3*Sin[5*(e + f*x) 
])))/(f*Sqrt[Cos[e + f*x]^2])
 

Rubi [A] (verified)

Time = 1.79 (sec) , antiderivative size = 480, normalized size of antiderivative = 1.03, number of steps used = 14, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {3042, 3455, 3042, 3447, 3042, 3502, 25, 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 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx\)

\(\Big \downarrow \) 3042

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

\(\Big \downarrow \) 3455

\(\displaystyle \frac {\int (\sin (e+f x) a+a) (c+d \sin (e+f x))^3 (a (6 A d+B (c+4 d))-a (2 B c-6 A d-7 B d) \sin (e+f x))dx}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int (\sin (e+f x) a+a) (c+d \sin (e+f x))^3 (a (6 A d+B (c+4 d))-a (2 B c-6 A d-7 B d) \sin (e+f x))dx}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3447

\(\displaystyle \frac {\int (c+d \sin (e+f x))^3 \left (-\left ((2 B c-6 A d-7 B d) \sin ^2(e+f x) a^2\right )+(6 A d+B (c+4 d)) a^2+\left (a^2 (6 A d+B (c+4 d))-a^2 (2 B c-6 A d-7 B d)\right ) \sin (e+f x)\right )dx}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\int (c+d \sin (e+f x))^3 \left (-\left ((2 B c-6 A d-7 B d) \sin (e+f x)^2 a^2\right )+(6 A d+B (c+4 d)) a^2+\left (a^2 (6 A d+B (c+4 d))-a^2 (2 B c-6 A d-7 B d)\right ) \sin (e+f x)\right )dx}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3502

\(\displaystyle \frac {\frac {\int -(c+d \sin (e+f x))^3 \left (3 d (B c-18 A d-16 B d) a^2+\left (6 A (c-10 d) d-B \left (2 c^2-12 d c+55 d^2\right )\right ) \sin (e+f x) a^2\right )dx}{5 d}+\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {\int (c+d \sin (e+f x))^3 \left (3 d (B (c-16 d)-18 A d) a^2+\left (6 A (c-10 d) d-B \left (2 c^2-12 d c+55 d^2\right )\right ) \sin (e+f x) a^2\right )dx}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {\int (c+d \sin (e+f x))^3 \left (3 d (B (c-16 d)-18 A d) a^2+\left (6 A (c-10 d) d-B \left (2 c^2-12 d c+55 d^2\right )\right ) \sin (e+f x) a^2\right )dx}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {\frac {1}{4} \int -3 (c+d \sin (e+f x))^2 \left (a^2 d \left (6 A d (11 c+10 d)-B \left (2 c^2-52 d c-55 d^2\right )\right )-a^2 \left (6 A d \left (c^2-10 d c-12 d^2\right )-B \left (2 c^3-12 d c^2+51 d^2 c+64 d^3\right )\right ) \sin (e+f x)\right )dx-\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {-\frac {3}{4} \int (c+d \sin (e+f x))^2 \left (a^2 d \left (6 A d (11 c+10 d)-B \left (2 c^2-52 d c-55 d^2\right )\right )-a^2 \left (6 A d \left (c^2-10 d c-12 d^2\right )-B \left (2 c^3-12 d c^2+51 d^2 c+64 d^3\right )\right ) \sin (e+f x)\right )dx-\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {-\frac {3}{4} \int (c+d \sin (e+f x))^2 \left (a^2 d \left (6 A d (11 c+10 d)-B \left (2 c^2-52 d c-55 d^2\right )\right )-a^2 \left (6 A d \left (c^2-10 d c-12 d^2\right )-B \left (2 c^3-12 d c^2+51 d^2 c+64 d^3\right )\right ) \sin (e+f x)\right )dx-\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3232

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {-\frac {3}{4} \left (\frac {1}{3} \int (c+d \sin (e+f x)) \left (a^2 d \left (6 A d \left (31 c^2+50 d c+24 d^2\right )-B \left (2 c^3-132 d c^2-267 d^2 c-128 d^3\right )\right )-a^2 \left (6 A d \left (2 c^3-20 d c^2-57 d^2 c-30 d^3\right )-B \left (4 c^4-24 d c^3+96 d^2 c^2+284 d^3 c+165 d^4\right )\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )-\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {-\frac {3}{4} \left (\frac {1}{3} \int (c+d \sin (e+f x)) \left (a^2 d \left (6 A d \left (31 c^2+50 d c+24 d^2\right )-B \left (2 c^3-132 d c^2-267 d^2 c-128 d^3\right )\right )-a^2 \left (6 A d \left (2 c^3-20 d c^2-57 d^2 c-30 d^3\right )-B \left (4 c^4-24 d c^3+96 d^2 c^2+284 d^3 c+165 d^4\right )\right ) \sin (e+f x)\right )dx+\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}\right )-\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

\(\Big \downarrow \) 3213

\(\displaystyle \frac {\frac {a^2 (-6 A d+2 B c-7 B d) \cos (e+f x) (c+d \sin (e+f x))^4}{5 d f}-\frac {-\frac {a^2 \left (6 A d (c-10 d)-B \left (2 c^2-12 c d+55 d^2\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^3}{4 f}-\frac {3}{4} \left (\frac {a^2 \left (6 A d \left (c^2-10 c d-12 d^2\right )-B \left (2 c^3-12 c^2 d+51 c d^2+64 d^3\right )\right ) \cos (e+f x) (c+d \sin (e+f x))^2}{3 f}+\frac {1}{3} \left (\frac {15}{2} a^2 d^2 x \left (6 A \left (4 c^3+8 c^2 d+7 c d^2+2 d^3\right )+B \left (16 c^3+42 c^2 d+36 c d^2+11 d^3\right )\right )+\frac {a^2 d \left (6 A d \left (2 c^3-20 c^2 d-57 c d^2-30 d^3\right )-B \left (4 c^4-24 c^3 d+96 c^2 d^2+284 c d^3+165 d^4\right )\right ) \sin (e+f x) \cos (e+f x)}{2 f}+\frac {2 a^2 \left (6 A d \left (c^4-10 c^3 d-44 c^2 d^2-40 c d^3-12 d^4\right )-B \left (2 c^5-12 c^4 d+47 c^3 d^2+208 c^2 d^3+216 c d^4+64 d^5\right )\right ) \cos (e+f x)}{f}\right )\right )}{5 d}}{6 d}-\frac {B \cos (e+f x) \left (a^2 \sin (e+f x)+a^2\right ) (c+d \sin (e+f x))^4}{6 d f}\)

Input:

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

Output:

-1/6*(B*Cos[e + f*x]*(a^2 + a^2*Sin[e + f*x])*(c + d*Sin[e + f*x])^4)/(d*f 
) + ((a^2*(2*B*c - 6*A*d - 7*B*d)*Cos[e + f*x]*(c + d*Sin[e + f*x])^4)/(5* 
d*f) - (-1/4*(a^2*(6*A*(c - 10*d)*d - B*(2*c^2 - 12*c*d + 55*d^2))*Cos[e + 
 f*x]*(c + d*Sin[e + f*x])^3)/f - (3*((a^2*(6*A*d*(c^2 - 10*c*d - 12*d^2) 
- B*(2*c^3 - 12*c^2*d + 51*c*d^2 + 64*d^3))*Cos[e + f*x]*(c + d*Sin[e + f* 
x])^2)/(3*f) + ((15*a^2*d^2*(6*A*(4*c^3 + 8*c^2*d + 7*c*d^2 + 2*d^3) + B*( 
16*c^3 + 42*c^2*d + 36*c*d^2 + 11*d^3))*x)/2 + (2*a^2*(6*A*d*(c^4 - 10*c^3 
*d - 44*c^2*d^2 - 40*c*d^3 - 12*d^4) - B*(2*c^5 - 12*c^4*d + 47*c^3*d^2 + 
208*c^2*d^3 + 216*c*d^4 + 64*d^5))*Cos[e + f*x])/f + (a^2*d*(6*A*d*(2*c^3 
- 20*c^2*d - 57*c*d^2 - 30*d^3) - B*(4*c^4 - 24*c^3*d + 96*c^2*d^2 + 284*c 
*d^3 + 165*d^4))*Cos[e + f*x]*Sin[e + f*x])/(2*f))/3))/4)/(5*d))/(6*d)
 

Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

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 3447
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a 
 + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), 
 x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
 

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

rule 3502
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) 
+ (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co 
s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m 
+ 2))   Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m 
 + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] 
 &&  !LtQ[m, -1]
 
Maple [A] (verified)

Time = 0.83 (sec) , antiderivative size = 745, normalized size of antiderivative = 1.61

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

Input:

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x)
 

Output:

1/f*(a^2*A*c^3*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-a^2*A*c^2*d*(2+s 
in(f*x+e)^2)*cos(f*x+e)+3*a^2*A*c*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)-1/5*a^2*A*d^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2 
)*cos(f*x+e)-1/3*a^2*B*c^3*(2+sin(f*x+e)^2)*cos(f*x+e)+3*a^2*B*c^2*d*(-1/4 
*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-3/5*a^2*B*c*d^2*( 
8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+a^2*B*d^3*(-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*A*c^ 
3*cos(f*x+e)+6*a^2*A*c^2*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-2*a^ 
2*A*c*d^2*(2+sin(f*x+e)^2)*cos(f*x+e)+2*a^2*A*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*a^2*B*c^3*(-1/2*sin(f*x+e)*cos(f*x 
+e)+1/2*f*x+1/2*e)-2*a^2*B*c^2*d*(2+sin(f*x+e)^2)*cos(f*x+e)+6*a^2*B*c*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)-2/5*a^2*B*d 
^3*(8/3+sin(f*x+e)^4+4/3*sin(f*x+e)^2)*cos(f*x+e)+a^2*A*c^3*(f*x+e)-3*a^2* 
A*c^2*d*cos(f*x+e)+3*a^2*A*c*d^2*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e 
)-1/3*a^2*A*d^3*(2+sin(f*x+e)^2)*cos(f*x+e)-a^2*B*c^3*cos(f*x+e)+3*a^2*B*c 
^2*d*(-1/2*sin(f*x+e)*cos(f*x+e)+1/2*f*x+1/2*e)-a^2*B*c*d^2*(2+sin(f*x+e)^ 
2)*cos(f*x+e)+a^2*B*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))
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 364, normalized size of antiderivative = 0.78 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx=-\frac {48 \, {\left (3 \, B a^{2} c d^{2} + {\left (A + 2 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{5} - 80 \, {\left (B a^{2} c^{3} + 3 \, {\left (A + 2 \, B\right )} a^{2} c^{2} d + 3 \, {\left (2 \, A + 3 \, B\right )} a^{2} c d^{2} + {\left (3 \, A + 4 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} - 15 \, {\left (8 \, {\left (3 \, A + 2 \, B\right )} a^{2} c^{3} + 6 \, {\left (8 \, A + 7 \, B\right )} a^{2} c^{2} d + 6 \, {\left (7 \, A + 6 \, B\right )} a^{2} c d^{2} + {\left (12 \, A + 11 \, B\right )} a^{2} d^{3}\right )} f x + 480 \, {\left ({\left (A + B\right )} a^{2} c^{3} + 3 \, {\left (A + B\right )} a^{2} c^{2} d + 3 \, {\left (A + B\right )} a^{2} c d^{2} + {\left (A + B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right ) + 5 \, {\left (8 \, B a^{2} d^{3} \cos \left (f x + e\right )^{5} - 2 \, {\left (18 \, B a^{2} c^{2} d + 18 \, {\left (A + 2 \, B\right )} a^{2} c d^{2} + {\left (12 \, A + 19 \, B\right )} a^{2} d^{3}\right )} \cos \left (f x + e\right )^{3} + 3 \, {\left (8 \, {\left (A + 2 \, B\right )} a^{2} c^{3} + 6 \, {\left (8 \, A + 9 \, B\right )} a^{2} c^{2} d + 6 \, {\left (9 \, A + 10 \, B\right )} a^{2} c d^{2} + {\left (20 \, A + 21 \, B\right )} a^{2} d^{3}\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*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algori 
thm="fricas")
 

Output:

-1/240*(48*(3*B*a^2*c*d^2 + (A + 2*B)*a^2*d^3)*cos(f*x + e)^5 - 80*(B*a^2* 
c^3 + 3*(A + 2*B)*a^2*c^2*d + 3*(2*A + 3*B)*a^2*c*d^2 + (3*A + 4*B)*a^2*d^ 
3)*cos(f*x + e)^3 - 15*(8*(3*A + 2*B)*a^2*c^3 + 6*(8*A + 7*B)*a^2*c^2*d + 
6*(7*A + 6*B)*a^2*c*d^2 + (12*A + 11*B)*a^2*d^3)*f*x + 480*((A + B)*a^2*c^ 
3 + 3*(A + B)*a^2*c^2*d + 3*(A + B)*a^2*c*d^2 + (A + B)*a^2*d^3)*cos(f*x + 
 e) + 5*(8*B*a^2*d^3*cos(f*x + e)^5 - 2*(18*B*a^2*c^2*d + 18*(A + 2*B)*a^2 
*c*d^2 + (12*A + 19*B)*a^2*d^3)*cos(f*x + e)^3 + 3*(8*(A + 2*B)*a^2*c^3 + 
6*(8*A + 9*B)*a^2*c^2*d + 6*(9*A + 10*B)*a^2*c*d^2 + (20*A + 21*B)*a^2*d^3 
)*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. 1865 vs. \(2 (450) = 900\).

Time = 0.55 (sec) , antiderivative size = 1865, normalized size of antiderivative = 4.02 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx=\text {Too large to display} \] Input:

integrate((a+a*sin(f*x+e))**2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))**3,x)
 

Output:

Piecewise((A*a**2*c**3*x*sin(e + f*x)**2/2 + A*a**2*c**3*x*cos(e + f*x)**2 
/2 + A*a**2*c**3*x - A*a**2*c**3*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*A*a** 
2*c**3*cos(e + f*x)/f + 3*A*a**2*c**2*d*x*sin(e + f*x)**2 + 3*A*a**2*c**2* 
d*x*cos(e + f*x)**2 - 3*A*a**2*c**2*d*sin(e + f*x)**2*cos(e + f*x)/f - 3*A 
*a**2*c**2*d*sin(e + f*x)*cos(e + f*x)/f - 2*A*a**2*c**2*d*cos(e + f*x)**3 
/f - 3*A*a**2*c**2*d*cos(e + f*x)/f + 9*A*a**2*c*d**2*x*sin(e + f*x)**4/8 
+ 9*A*a**2*c*d**2*x*sin(e + f*x)**2*cos(e + f*x)**2/4 + 3*A*a**2*c*d**2*x* 
sin(e + f*x)**2/2 + 9*A*a**2*c*d**2*x*cos(e + f*x)**4/8 + 3*A*a**2*c*d**2* 
x*cos(e + f*x)**2/2 - 15*A*a**2*c*d**2*sin(e + f*x)**3*cos(e + f*x)/(8*f) 
- 6*A*a**2*c*d**2*sin(e + f*x)**2*cos(e + f*x)/f - 9*A*a**2*c*d**2*sin(e + 
 f*x)*cos(e + f*x)**3/(8*f) - 3*A*a**2*c*d**2*sin(e + f*x)*cos(e + f*x)/(2 
*f) - 4*A*a**2*c*d**2*cos(e + f*x)**3/f + 3*A*a**2*d**3*x*sin(e + f*x)**4/ 
4 + 3*A*a**2*d**3*x*sin(e + f*x)**2*cos(e + f*x)**2/2 + 3*A*a**2*d**3*x*co 
s(e + f*x)**4/4 - A*a**2*d**3*sin(e + f*x)**4*cos(e + f*x)/f - 5*A*a**2*d* 
*3*sin(e + f*x)**3*cos(e + f*x)/(4*f) - 4*A*a**2*d**3*sin(e + f*x)**2*cos( 
e + f*x)**3/(3*f) - A*a**2*d**3*sin(e + f*x)**2*cos(e + f*x)/f - 3*A*a**2* 
d**3*sin(e + f*x)*cos(e + f*x)**3/(4*f) - 8*A*a**2*d**3*cos(e + f*x)**5/(1 
5*f) - 2*A*a**2*d**3*cos(e + f*x)**3/(3*f) + B*a**2*c**3*x*sin(e + f*x)**2 
 + B*a**2*c**3*x*cos(e + f*x)**2 - B*a**2*c**3*sin(e + f*x)**2*cos(e + f*x 
)/f - B*a**2*c**3*sin(e + f*x)*cos(e + f*x)/f - 2*B*a**2*c**3*cos(e + f...
 

Maxima [A] (verification not implemented)

Time = 0.05 (sec) , antiderivative size = 724, normalized size of antiderivative = 1.56 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx =\text {Too large to display} \] Input:

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algori 
thm="maxima")
 

Output:

1/960*(240*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^3 + 960*(f*x + e)*A*a^ 
2*c^3 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*B*a^2*c^3 + 480*(2*f*x + 2*e 
 - sin(2*f*x + 2*e))*B*a^2*c^3 + 960*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a 
^2*c^2*d + 1440*(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c^2*d + 1920*(cos(f 
*x + e)^3 - 3*cos(f*x + e))*B*a^2*c^2*d + 90*(12*f*x + 12*e + sin(4*f*x + 
4*e) - 8*sin(2*f*x + 2*e))*B*a^2*c^2*d + 720*(2*f*x + 2*e - sin(2*f*x + 2* 
e))*B*a^2*c^2*d + 1920*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*c*d^2 + 90* 
(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*c*d^2 + 720* 
(2*f*x + 2*e - sin(2*f*x + 2*e))*A*a^2*c*d^2 - 192*(3*cos(f*x + e)^5 - 10* 
cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*c*d^2 + 960*(cos(f*x + e)^3 - 3*co 
s(f*x + e))*B*a^2*c*d^2 + 180*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2* 
f*x + 2*e))*B*a^2*c*d^2 - 64*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*co 
s(f*x + e))*A*a^2*d^3 + 320*(cos(f*x + e)^3 - 3*cos(f*x + e))*A*a^2*d^3 + 
60*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e))*A*a^2*d^3 - 128 
*(3*cos(f*x + e)^5 - 10*cos(f*x + e)^3 + 15*cos(f*x + e))*B*a^2*d^3 + 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))*B*a^2*d^3 + 30*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8*sin(2*f*x + 2*e 
))*B*a^2*d^3 - 1920*A*a^2*c^3*cos(f*x + e) - 960*B*a^2*c^3*cos(f*x + e) - 
2880*A*a^2*c^2*d*cos(f*x + e))/f
 

Giac [A] (verification not implemented)

Time = 0.31 (sec) , antiderivative size = 468, normalized size of antiderivative = 1.01 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx=-\frac {B a^{2} d^{3} \sin \left (6 \, f x + 6 \, e\right )}{192 \, f} + \frac {1}{16} \, {\left (24 \, A a^{2} c^{3} + 16 \, B a^{2} c^{3} + 48 \, A a^{2} c^{2} d + 42 \, B a^{2} c^{2} d + 42 \, A a^{2} c d^{2} + 36 \, B a^{2} c d^{2} + 12 \, A a^{2} d^{3} + 11 \, B a^{2} d^{3}\right )} x - \frac {{\left (3 \, B a^{2} c d^{2} + A a^{2} d^{3} + 2 \, B a^{2} d^{3}\right )} \cos \left (5 \, f x + 5 \, e\right )}{80 \, f} + \frac {{\left (4 \, B a^{2} c^{3} + 12 \, A a^{2} c^{2} d + 24 \, B a^{2} c^{2} d + 24 \, A a^{2} c d^{2} + 27 \, B a^{2} c d^{2} + 9 \, A a^{2} d^{3} + 10 \, B a^{2} d^{3}\right )} \cos \left (3 \, f x + 3 \, e\right )}{48 \, f} - \frac {{\left (16 \, A a^{2} c^{3} + 14 \, B a^{2} c^{3} + 42 \, A a^{2} c^{2} d + 36 \, B a^{2} c^{2} d + 36 \, A a^{2} c d^{2} + 33 \, B a^{2} c d^{2} + 11 \, A a^{2} d^{3} + 10 \, B a^{2} d^{3}\right )} \cos \left (f x + e\right )}{8 \, f} + \frac {{\left (6 \, B a^{2} c^{2} d + 6 \, A a^{2} c d^{2} + 12 \, B a^{2} c d^{2} + 4 \, A a^{2} d^{3} + 5 \, B a^{2} d^{3}\right )} \sin \left (4 \, f x + 4 \, e\right )}{64 \, f} - \frac {{\left (16 \, A a^{2} c^{3} + 32 \, B a^{2} c^{3} + 96 \, A a^{2} c^{2} d + 96 \, B a^{2} c^{2} d + 96 \, A a^{2} c d^{2} + 96 \, B a^{2} c d^{2} + 32 \, A a^{2} d^{3} + 31 \, B a^{2} d^{3}\right )} \sin \left (2 \, f x + 2 \, e\right )}{64 \, f} \] Input:

integrate((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x, algori 
thm="giac")
 

Output:

-1/192*B*a^2*d^3*sin(6*f*x + 6*e)/f + 1/16*(24*A*a^2*c^3 + 16*B*a^2*c^3 + 
48*A*a^2*c^2*d + 42*B*a^2*c^2*d + 42*A*a^2*c*d^2 + 36*B*a^2*c*d^2 + 12*A*a 
^2*d^3 + 11*B*a^2*d^3)*x - 1/80*(3*B*a^2*c*d^2 + A*a^2*d^3 + 2*B*a^2*d^3)* 
cos(5*f*x + 5*e)/f + 1/48*(4*B*a^2*c^3 + 12*A*a^2*c^2*d + 24*B*a^2*c^2*d + 
 24*A*a^2*c*d^2 + 27*B*a^2*c*d^2 + 9*A*a^2*d^3 + 10*B*a^2*d^3)*cos(3*f*x + 
 3*e)/f - 1/8*(16*A*a^2*c^3 + 14*B*a^2*c^3 + 42*A*a^2*c^2*d + 36*B*a^2*c^2 
*d + 36*A*a^2*c*d^2 + 33*B*a^2*c*d^2 + 11*A*a^2*d^3 + 10*B*a^2*d^3)*cos(f* 
x + e)/f + 1/64*(6*B*a^2*c^2*d + 6*A*a^2*c*d^2 + 12*B*a^2*c*d^2 + 4*A*a^2* 
d^3 + 5*B*a^2*d^3)*sin(4*f*x + 4*e)/f - 1/64*(16*A*a^2*c^3 + 32*B*a^2*c^3 
+ 96*A*a^2*c^2*d + 96*B*a^2*c^2*d + 96*A*a^2*c*d^2 + 96*B*a^2*c*d^2 + 32*A 
*a^2*d^3 + 31*B*a^2*d^3)*sin(2*f*x + 2*e)/f
 

Mupad [B] (verification not implemented)

Time = 38.37 (sec) , antiderivative size = 1291, normalized size of antiderivative = 2.78 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx=\text {Too large to display} \] Input:

int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^2*(c + d*sin(e + f*x))^3,x)
                                                                                    
                                                                                    
 

Output:

(a^2*atan((a^2*tan(e/2 + (f*x)/2)*(24*A*c^3 + 12*A*d^3 + 16*B*c^3 + 11*B*d 
^3 + 42*A*c*d^2 + 48*A*c^2*d + 36*B*c*d^2 + 42*B*c^2*d))/(8*(3*A*a^2*c^3 + 
 (3*A*a^2*d^3)/2 + 2*B*a^2*c^3 + (11*B*a^2*d^3)/8 + (21*A*a^2*c*d^2)/4 + 6 
*A*a^2*c^2*d + (9*B*a^2*c*d^2)/2 + (21*B*a^2*c^2*d)/4)))*(24*A*c^3 + 12*A* 
d^3 + 16*B*c^3 + 11*B*d^3 + 42*A*c*d^2 + 48*A*c^2*d + 36*B*c*d^2 + 42*B*c^ 
2*d))/(8*f) - (tan(e/2 + (f*x)/2)*(A*a^2*c^3 + (3*A*a^2*d^3)/2 + 2*B*a^2*c 
^3 + (11*B*a^2*d^3)/8 + (21*A*a^2*c*d^2)/4 + 6*A*a^2*c^2*d + (9*B*a^2*c*d^ 
2)/2 + (21*B*a^2*c^2*d)/4) + tan(e/2 + (f*x)/2)^8*(20*A*a^2*c^3 + 4*A*a^2* 
d^3 + 14*B*a^2*c^3 + 24*A*a^2*c*d^2 + 42*A*a^2*c^2*d + 12*B*a^2*c*d^2 + 24 
*B*a^2*c^2*d) - tan(e/2 + (f*x)/2)^11*(A*a^2*c^3 + (3*A*a^2*d^3)/2 + 2*B*a 
^2*c^3 + (11*B*a^2*d^3)/8 + (21*A*a^2*c*d^2)/4 + 6*A*a^2*c^2*d + (9*B*a^2* 
c*d^2)/2 + (21*B*a^2*c^2*d)/4) + tan(e/2 + (f*x)/2)^5*(2*A*a^2*c^3 + 7*A*a 
^2*d^3 + 4*B*a^2*c^3 + (47*B*a^2*d^3)/4 + (33*A*a^2*c*d^2)/2 + 12*A*a^2*c^ 
2*d + 21*B*a^2*c*d^2 + (33*B*a^2*c^2*d)/2) - tan(e/2 + (f*x)/2)^7*(2*A*a^2 
*c^3 + 7*A*a^2*d^3 + 4*B*a^2*c^3 + (47*B*a^2*d^3)/4 + (33*A*a^2*c*d^2)/2 + 
 12*A*a^2*c^2*d + 21*B*a^2*c*d^2 + (33*B*a^2*c^2*d)/2) + tan(e/2 + (f*x)/2 
)^3*(3*A*a^2*c^3 + (17*A*a^2*d^3)/2 + 6*B*a^2*c^3 + (187*B*a^2*d^3)/24 + ( 
87*A*a^2*c*d^2)/4 + 18*A*a^2*c^2*d + (51*B*a^2*c*d^2)/2 + (87*B*a^2*c^2*d) 
/4) - tan(e/2 + (f*x)/2)^9*(3*A*a^2*c^3 + (17*A*a^2*d^3)/2 + 6*B*a^2*c^3 + 
 (187*B*a^2*d^3)/24 + (87*A*a^2*c*d^2)/4 + 18*A*a^2*c^2*d + (51*B*a^2*c...
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 705, normalized size of antiderivative = 1.52 \[ \int (a+a \sin (e+f x))^2 (A+B \sin (e+f x)) (c+d \sin (e+f x))^3 \, dx =\text {Too large to display} \] Input:

int((a+a*sin(f*x+e))^2*(A+B*sin(f*x+e))*(c+d*sin(f*x+e))^3,x)
 

Output:

(a**2*( - 40*cos(e + f*x)*sin(e + f*x)**5*b*d**3 - 48*cos(e + f*x)*sin(e + 
 f*x)**4*a*d**3 - 144*cos(e + f*x)*sin(e + f*x)**4*b*c*d**2 - 96*cos(e + f 
*x)*sin(e + f*x)**4*b*d**3 - 180*cos(e + f*x)*sin(e + f*x)**3*a*c*d**2 - 1 
20*cos(e + f*x)*sin(e + f*x)**3*a*d**3 - 180*cos(e + f*x)*sin(e + f*x)**3* 
b*c**2*d - 360*cos(e + f*x)*sin(e + f*x)**3*b*c*d**2 - 110*cos(e + f*x)*si 
n(e + f*x)**3*b*d**3 - 240*cos(e + f*x)*sin(e + f*x)**2*a*c**2*d - 480*cos 
(e + f*x)*sin(e + f*x)**2*a*c*d**2 - 144*cos(e + f*x)*sin(e + f*x)**2*a*d* 
*3 - 80*cos(e + f*x)*sin(e + f*x)**2*b*c**3 - 480*cos(e + f*x)*sin(e + f*x 
)**2*b*c**2*d - 432*cos(e + f*x)*sin(e + f*x)**2*b*c*d**2 - 128*cos(e + f* 
x)*sin(e + f*x)**2*b*d**3 - 120*cos(e + f*x)*sin(e + f*x)*a*c**3 - 720*cos 
(e + f*x)*sin(e + f*x)*a*c**2*d - 630*cos(e + f*x)*sin(e + f*x)*a*c*d**2 - 
 180*cos(e + f*x)*sin(e + f*x)*a*d**3 - 240*cos(e + f*x)*sin(e + f*x)*b*c* 
*3 - 630*cos(e + f*x)*sin(e + f*x)*b*c**2*d - 540*cos(e + f*x)*sin(e + f*x 
)*b*c*d**2 - 165*cos(e + f*x)*sin(e + f*x)*b*d**3 - 480*cos(e + f*x)*a*c** 
3 - 1200*cos(e + f*x)*a*c**2*d - 960*cos(e + f*x)*a*c*d**2 - 288*cos(e + f 
*x)*a*d**3 - 400*cos(e + f*x)*b*c**3 - 960*cos(e + f*x)*b*c**2*d - 864*cos 
(e + f*x)*b*c*d**2 - 256*cos(e + f*x)*b*d**3 + 360*a*c**3*f*x + 480*a*c**3 
 + 720*a*c**2*d*f*x + 1200*a*c**2*d + 630*a*c*d**2*f*x + 960*a*c*d**2 + 18 
0*a*d**3*f*x + 288*a*d**3 + 240*b*c**3*f*x + 400*b*c**3 + 630*b*c**2*d*f*x 
 + 960*b*c**2*d + 540*b*c*d**2*f*x + 864*b*c*d**2 + 165*b*d**3*f*x + 25...