Integrand size = 31, antiderivative size = 366 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {1}{16} \left (8 a^4 A+36 a^2 A b^2+5 A b^4+24 a^3 b B+20 a b^3 B\right ) x+\frac {\left (140 a^3 A b+112 a A b^3+35 a^4 B+168 a^2 b^2 B+24 b^4 B\right ) \sin (c+d x)}{35 d}+\frac {\left (8 a^4 A+36 a^2 A b^2+5 A b^4+24 a^3 b B+20 a b^3 B\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {b \left (224 a^2 A b+35 A b^3+104 a^3 B+140 a b^2 B\right ) \cos ^3(c+d x) \sin (c+d x)}{168 d}+\frac {b^2 \left (49 a A b+31 a^2 B+18 b^2 B\right ) \cos ^4(c+d x) \sin (c+d x)}{105 d}+\frac {b (7 A b+10 a B) \cos ^3(c+d x) (a+b \cos (c+d x))^2 \sin (c+d x)}{42 d}+\frac {b B \cos ^3(c+d x) (a+b \cos (c+d x))^3 \sin (c+d x)}{7 d}-\frac {\left (140 a^3 A b+112 a A b^3+35 a^4 B+168 a^2 b^2 B+24 b^4 B\right ) \sin ^3(c+d x)}{105 d} \] Output:
1/16*(8*A*a^4+36*A*a^2*b^2+5*A*b^4+24*B*a^3*b+20*B*a*b^3)*x+1/35*(140*A*a^ 3*b+112*A*a*b^3+35*B*a^4+168*B*a^2*b^2+24*B*b^4)*sin(d*x+c)/d+1/16*(8*A*a^ 4+36*A*a^2*b^2+5*A*b^4+24*B*a^3*b+20*B*a*b^3)*cos(d*x+c)*sin(d*x+c)/d+1/16 8*b*(224*A*a^2*b+35*A*b^3+104*B*a^3+140*B*a*b^2)*cos(d*x+c)^3*sin(d*x+c)/d +1/105*b^2*(49*A*a*b+31*B*a^2+18*B*b^2)*cos(d*x+c)^4*sin(d*x+c)/d+1/42*b*( 7*A*b+10*B*a)*cos(d*x+c)^3*(a+b*cos(d*x+c))^2*sin(d*x+c)/d+1/7*b*B*cos(d*x +c)^3*(a+b*cos(d*x+c))^3*sin(d*x+c)/d-1/105*(140*A*a^3*b+112*A*a*b^3+35*B* a^4+168*B*a^2*b^2+24*B*b^4)*sin(d*x+c)^3/d
Time = 2.53 (sec) , antiderivative size = 408, normalized size of antiderivative = 1.11 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {3360 a^4 A c+15120 a^2 A b^2 c+2100 A b^4 c+10080 a^3 b B c+8400 a b^3 B c+3360 a^4 A d x+15120 a^2 A b^2 d x+2100 A b^4 d x+10080 a^3 b B d x+8400 a b^3 B d x+105 \left (192 a^3 A b+160 a A b^3+48 a^4 B+240 a^2 b^2 B+35 b^4 B\right ) \sin (c+d x)+105 \left (16 a^4 A+96 a^2 A b^2+15 A b^4+64 a^3 b B+60 a b^3 B\right ) \sin (2 (c+d x))+2240 a^3 A b \sin (3 (c+d x))+2800 a A b^3 \sin (3 (c+d x))+560 a^4 B \sin (3 (c+d x))+4200 a^2 b^2 B \sin (3 (c+d x))+735 b^4 B \sin (3 (c+d x))+1260 a^2 A b^2 \sin (4 (c+d x))+315 A b^4 \sin (4 (c+d x))+840 a^3 b B \sin (4 (c+d x))+1260 a b^3 B \sin (4 (c+d x))+336 a A b^3 \sin (5 (c+d x))+504 a^2 b^2 B \sin (5 (c+d x))+147 b^4 B \sin (5 (c+d x))+35 A b^4 \sin (6 (c+d x))+140 a b^3 B \sin (6 (c+d x))+15 b^4 B \sin (7 (c+d x))}{6720 d} \] Input:
Integrate[Cos[c + d*x]^2*(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x]),x]
Output:
(3360*a^4*A*c + 15120*a^2*A*b^2*c + 2100*A*b^4*c + 10080*a^3*b*B*c + 8400* a*b^3*B*c + 3360*a^4*A*d*x + 15120*a^2*A*b^2*d*x + 2100*A*b^4*d*x + 10080* a^3*b*B*d*x + 8400*a*b^3*B*d*x + 105*(192*a^3*A*b + 160*a*A*b^3 + 48*a^4*B + 240*a^2*b^2*B + 35*b^4*B)*Sin[c + d*x] + 105*(16*a^4*A + 96*a^2*A*b^2 + 15*A*b^4 + 64*a^3*b*B + 60*a*b^3*B)*Sin[2*(c + d*x)] + 2240*a^3*A*b*Sin[3 *(c + d*x)] + 2800*a*A*b^3*Sin[3*(c + d*x)] + 560*a^4*B*Sin[3*(c + d*x)] + 4200*a^2*b^2*B*Sin[3*(c + d*x)] + 735*b^4*B*Sin[3*(c + d*x)] + 1260*a^2*A *b^2*Sin[4*(c + d*x)] + 315*A*b^4*Sin[4*(c + d*x)] + 840*a^3*b*B*Sin[4*(c + d*x)] + 1260*a*b^3*B*Sin[4*(c + d*x)] + 336*a*A*b^3*Sin[5*(c + d*x)] + 5 04*a^2*b^2*B*Sin[5*(c + d*x)] + 147*b^4*B*Sin[5*(c + d*x)] + 35*A*b^4*Sin[ 6*(c + d*x)] + 140*a*b^3*B*Sin[6*(c + d*x)] + 15*b^4*B*Sin[7*(c + d*x)])/( 6720*d)
Time = 1.80 (sec) , antiderivative size = 315, normalized size of antiderivative = 0.86, number of steps used = 17, number of rules used = 16, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.516, Rules used = {3042, 3469, 3042, 3528, 3042, 3512, 3042, 3502, 27, 3042, 3227, 3042, 3113, 2009, 3115, 24}
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 \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^4 \left (A+B \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx\) |
\(\Big \downarrow \) 3469 |
\(\displaystyle \frac {1}{7} \int \cos ^2(c+d x) (a+b \cos (c+d x))^2 \left (b (7 A b+10 a B) \cos ^2(c+d x)+\left (6 B b^2+7 a (2 A b+a B)\right ) \cos (c+d x)+a (7 a A+3 b B)\right )dx+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right )^2 \left (b (7 A b+10 a B) \sin \left (c+d x+\frac {\pi }{2}\right )^2+\left (6 B b^2+7 a (2 A b+a B)\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+a (7 a A+3 b B)\right )dx+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3528 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \int \cos ^2(c+d x) (a+b \cos (c+d x)) \left (2 b \left (31 B a^2+49 A b a+18 b^2 B\right ) \cos ^2(c+d x)+\left (42 B a^3+126 A b a^2+104 b^2 B a+35 A b^3\right ) \cos (c+d x)+3 a \left (14 A a^2+16 b B a+7 A b^2\right )\right )dx+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (a+b \sin \left (c+d x+\frac {\pi }{2}\right )\right ) \left (2 b \left (31 B a^2+49 A b a+18 b^2 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2+\left (42 B a^3+126 A b a^2+104 b^2 B a+35 A b^3\right ) \sin \left (c+d x+\frac {\pi }{2}\right )+3 a \left (14 A a^2+16 b B a+7 A b^2\right )\right )dx+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3512 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \int \cos ^2(c+d x) \left (15 \left (14 A a^2+16 b B a+7 A b^2\right ) a^2+5 b \left (104 B a^3+224 A b a^2+140 b^2 B a+35 A b^3\right ) \cos ^2(c+d x)+6 \left (35 B a^4+140 A b a^3+168 b^2 B a^2+112 A b^3 a+24 b^4 B\right ) \cos (c+d x)\right )dx+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (15 \left (14 A a^2+16 b B a+7 A b^2\right ) a^2+5 b \left (104 B a^3+224 A b a^2+140 b^2 B a+35 A b^3\right ) \sin \left (c+d x+\frac {\pi }{2}\right )^2+6 \left (35 B a^4+140 A b a^3+168 b^2 B a^2+112 A b^3 a+24 b^4 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {1}{4} \int 3 \cos ^2(c+d x) \left (35 \left (8 A a^4+24 b B a^3+36 A b^2 a^2+20 b^3 B a+5 A b^4\right )+8 \left (35 B a^4+140 A b a^3+168 b^2 B a^2+112 A b^3 a+24 b^4 B\right ) \cos (c+d x)\right )dx+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \int \cos ^2(c+d x) \left (35 \left (8 A a^4+24 b B a^3+36 A b^2 a^2+20 b^3 B a+5 A b^4\right )+8 \left (35 B a^4+140 A b a^3+168 b^2 B a^2+112 A b^3 a+24 b^4 B\right ) \cos (c+d x)\right )dx+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \int \sin \left (c+d x+\frac {\pi }{2}\right )^2 \left (35 \left (8 A a^4+24 b B a^3+36 A b^2 a^2+20 b^3 B a+5 A b^4\right )+8 \left (35 B a^4+140 A b a^3+168 b^2 B a^2+112 A b^3 a+24 b^4 B\right ) \sin \left (c+d x+\frac {\pi }{2}\right )\right )dx+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3227 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (8 \left (35 a^4 B+140 a^3 A b+168 a^2 b^2 B+112 a A b^3+24 b^4 B\right ) \int \cos ^3(c+d x)dx+35 \left (8 a^4 A+24 a^3 b B+36 a^2 A b^2+20 a b^3 B+5 A b^4\right ) \int \cos ^2(c+d x)dx\right )+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (35 \left (8 a^4 A+24 a^3 b B+36 a^2 A b^2+20 a b^3 B+5 A b^4\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx+8 \left (35 a^4 B+140 a^3 A b+168 a^2 b^2 B+112 a A b^3+24 b^4 B\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^3dx\right )+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3113 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (35 \left (8 a^4 A+24 a^3 b B+36 a^2 A b^2+20 a b^3 B+5 A b^4\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {8 \left (35 a^4 B+140 a^3 A b+168 a^2 b^2 B+112 a A b^3+24 b^4 B\right ) \int \left (1-\sin ^2(c+d x)\right )d(-\sin (c+d x))}{d}\right )+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (35 \left (8 a^4 A+24 a^3 b B+36 a^2 A b^2+20 a b^3 B+5 A b^4\right ) \int \sin \left (c+d x+\frac {\pi }{2}\right )^2dx-\frac {8 \left (35 a^4 B+140 a^3 A b+168 a^2 b^2 B+112 a A b^3+24 b^4 B\right ) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 3115 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {1}{5} \left (\frac {3}{4} \left (35 \left (8 a^4 A+24 a^3 b B+36 a^2 A b^2+20 a b^3 B+5 A b^4\right ) \left (\frac {\int 1dx}{2}+\frac {\sin (c+d x) \cos (c+d x)}{2 d}\right )-\frac {8 \left (35 a^4 B+140 a^3 A b+168 a^2 b^2 B+112 a A b^3+24 b^4 B\right ) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )+\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}\right )+\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {1}{7} \left (\frac {1}{6} \left (\frac {2 b^2 \left (31 a^2 B+49 a A b+18 b^2 B\right ) \sin (c+d x) \cos ^4(c+d x)}{5 d}+\frac {1}{5} \left (\frac {5 b \left (104 a^3 B+224 a^2 A b+140 a b^2 B+35 A b^3\right ) \sin (c+d x) \cos ^3(c+d x)}{4 d}+\frac {3}{4} \left (35 \left (8 a^4 A+24 a^3 b B+36 a^2 A b^2+20 a b^3 B+5 A b^4\right ) \left (\frac {\sin (c+d x) \cos (c+d x)}{2 d}+\frac {x}{2}\right )-\frac {8 \left (35 a^4 B+140 a^3 A b+168 a^2 b^2 B+112 a A b^3+24 b^4 B\right ) \left (\frac {1}{3} \sin ^3(c+d x)-\sin (c+d x)\right )}{d}\right )\right )\right )+\frac {b (10 a B+7 A b) \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^2}{6 d}\right )+\frac {b B \sin (c+d x) \cos ^3(c+d x) (a+b \cos (c+d x))^3}{7 d}\) |
Input:
Int[Cos[c + d*x]^2*(a + b*Cos[c + d*x])^4*(A + B*Cos[c + d*x]),x]
Output:
(b*B*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^3*Sin[c + d*x])/(7*d) + ((b*(7*A* b + 10*a*B)*Cos[c + d*x]^3*(a + b*Cos[c + d*x])^2*Sin[c + d*x])/(6*d) + (( 2*b^2*(49*a*A*b + 31*a^2*B + 18*b^2*B)*Cos[c + d*x]^4*Sin[c + d*x])/(5*d) + ((5*b*(224*a^2*A*b + 35*A*b^3 + 104*a^3*B + 140*a*b^2*B)*Cos[c + d*x]^3* Sin[c + d*x])/(4*d) + (3*(35*(8*a^4*A + 36*a^2*A*b^2 + 5*A*b^4 + 24*a^3*b* B + 20*a*b^3*B)*(x/2 + (Cos[c + d*x]*Sin[c + d*x])/(2*d)) - (8*(140*a^3*A* b + 112*a*A*b^3 + 35*a^4*B + 168*a^2*b^2*B + 24*b^4*B)*(-Sin[c + d*x] + Si n[c + d*x]^3/3))/d))/4)/5)/6)/7
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp and[(1 - x^2)^((n - 1)/2), x], x], x, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]
Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[b^2*((n - 1)/n) Int[(b*Sin [c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[ 2*n]
Int[((b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[c Int[(b*Sin[e + f*x])^m, x], x] + Simp[d/b Int [(b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{b, c, d, e, f, m}, x]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Si mp[(-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 - 2)*(c + d*Sin[e + f*x])^n*Simp[a^2*A*d*(m + n + 1) + b*B*(b*c*( m - 1) + a*d*(n + 1)) + (a*d*(2*A*b + a*B)*(m + n + 1) - b*B*(a*c - b*d*(m + n)))*Sin[e + f*x] + b*(A*b*d*(m + n + 1) - B*(b*c*m - a*d*(2*m + n)))*Sin [e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[m, 1] && !(IGt Q[n, 1] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
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]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f _.)*(x_)]^2), x_Symbol] :> Simp[(-C)*d*Cos[e + f*x]*Sin[e + f*x]*((a + b*Si n[e + f*x])^(m + 1)/(b*f*(m + 3))), x] + Simp[1/(b*(m + 3)) Int[(a + b*Si n[e + f*x])^m*Simp[a*C*d + A*b*c*(m + 3) + b*(B*c*(m + 3) + d*(C*(m + 2) + A*(m + 3)))*Sin[e + f*x] - (2*a*C*d - b*(c*C + B*d)*(m + 3))*Sin[e + f*x]^2 , x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, m}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && !LtQ[m, -1]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_ .) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Cos[e + f*x]*(a + b*Sin[e + f*x ])^m*((c + d*Sin[e + f*x])^(n + 1)/(d*f*(m + n + 2))), x] + Simp[1/(d*(m + n + 2)) Int[(a + b*Sin[e + f*x])^(m - 1)*(c + d*Sin[e + f*x])^n*Simp[a*A* d*(m + n + 2) + C*(b*c*m + a*d*(n + 1)) + (d*(A*b + a*B)*(m + n + 2) - C*(a *c - b*d*(m + n + 1)))*Sin[e + f*x] + (C*(a*d*m - b*c*(m + 1)) + b*B*d*(m + n + 2))*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, C, n} , x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && GtQ[ m, 0] && !(IGtQ[n, 0] && ( !IntegerQ[m] || (EqQ[a, 0] && NeQ[c, 0])))
Time = 5.77 (sec) , antiderivative size = 368, normalized size of antiderivative = 1.01
\[\frac {a^{4} A \left (\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{2}+\frac {d x}{2}+\frac {c}{2}\right )+\frac {B \,a^{4} \left (\cos \left (d x +c \right )^{2}+2\right ) \sin \left (d x +c \right )}{3}+\frac {4 A \,a^{3} b \left (\cos \left (d x +c \right )^{2}+2\right ) \sin \left (d x +c \right )}{3}+4 B \,a^{3} b \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+6 A \,a^{2} b^{2} \left (\frac {\left (\cos \left (d x +c \right )^{3}+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{4}+\frac {3 d x}{8}+\frac {3 c}{8}\right )+\frac {6 B \,a^{2} b^{2} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}+\frac {4 A a \,b^{3} \left (\frac {8}{3}+\cos \left (d x +c \right )^{4}+\frac {4 \cos \left (d x +c \right )^{2}}{3}\right ) \sin \left (d x +c \right )}{5}+4 B a \,b^{3} \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+A \,b^{4} \left (\frac {\left (\cos \left (d x +c \right )^{5}+\frac {5 \cos \left (d x +c \right )^{3}}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )+\frac {B \,b^{4} \left (\frac {16}{5}+\cos \left (d x +c \right )^{6}+\frac {6 \cos \left (d x +c \right )^{4}}{5}+\frac {8 \cos \left (d x +c \right )^{2}}{5}\right ) \sin \left (d x +c \right )}{7}}{d}\]
Input:
int(cos(d*x+c)^2*(a+cos(d*x+c)*b)^4*(A+B*cos(d*x+c)),x)
Output:
1/d*(a^4*A*(1/2*cos(d*x+c)*sin(d*x+c)+1/2*d*x+1/2*c)+1/3*B*a^4*(cos(d*x+c) ^2+2)*sin(d*x+c)+4/3*A*a^3*b*(cos(d*x+c)^2+2)*sin(d*x+c)+4*B*a^3*b*(1/4*(c os(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)+6*A*a^2*b^2*(1/4*(co s(d*x+c)^3+3/2*cos(d*x+c))*sin(d*x+c)+3/8*d*x+3/8*c)+6/5*B*a^2*b^2*(8/3+co s(d*x+c)^4+4/3*cos(d*x+c)^2)*sin(d*x+c)+4/5*A*a*b^3*(8/3+cos(d*x+c)^4+4/3* cos(d*x+c)^2)*sin(d*x+c)+4*B*a*b^3*(1/6*(cos(d*x+c)^5+5/4*cos(d*x+c)^3+15/ 8*cos(d*x+c))*sin(d*x+c)+5/16*d*x+5/16*c)+A*b^4*(1/6*(cos(d*x+c)^5+5/4*cos (d*x+c)^3+15/8*cos(d*x+c))*sin(d*x+c)+5/16*d*x+5/16*c)+1/7*B*b^4*(16/5+cos (d*x+c)^6+6/5*cos(d*x+c)^4+8/5*cos(d*x+c)^2)*sin(d*x+c))
Time = 0.10 (sec) , antiderivative size = 289, normalized size of antiderivative = 0.79 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {105 \, {\left (8 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 20 \, B a b^{3} + 5 \, A b^{4}\right )} d x + {\left (240 \, B b^{4} \cos \left (d x + c\right )^{6} + 280 \, {\left (4 \, B a b^{3} + A b^{4}\right )} \cos \left (d x + c\right )^{5} + 1120 \, B a^{4} + 4480 \, A a^{3} b + 5376 \, B a^{2} b^{2} + 3584 \, A a b^{3} + 768 \, B b^{4} + 96 \, {\left (21 \, B a^{2} b^{2} + 14 \, A a b^{3} + 3 \, B b^{4}\right )} \cos \left (d x + c\right )^{4} + 70 \, {\left (24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 20 \, B a b^{3} + 5 \, A b^{4}\right )} \cos \left (d x + c\right )^{3} + 16 \, {\left (35 \, B a^{4} + 140 \, A a^{3} b + 168 \, B a^{2} b^{2} + 112 \, A a b^{3} + 24 \, B b^{4}\right )} \cos \left (d x + c\right )^{2} + 105 \, {\left (8 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 20 \, B a b^{3} + 5 \, A b^{4}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{1680 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+b*cos(d*x+c))^4*(A+B*cos(d*x+c)),x, algorithm="f ricas")
Output:
1/1680*(105*(8*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 20*B*a*b^3 + 5*A*b^4)*d *x + (240*B*b^4*cos(d*x + c)^6 + 280*(4*B*a*b^3 + A*b^4)*cos(d*x + c)^5 + 1120*B*a^4 + 4480*A*a^3*b + 5376*B*a^2*b^2 + 3584*A*a*b^3 + 768*B*b^4 + 96 *(21*B*a^2*b^2 + 14*A*a*b^3 + 3*B*b^4)*cos(d*x + c)^4 + 70*(24*B*a^3*b + 3 6*A*a^2*b^2 + 20*B*a*b^3 + 5*A*b^4)*cos(d*x + c)^3 + 16*(35*B*a^4 + 140*A* a^3*b + 168*B*a^2*b^2 + 112*A*a*b^3 + 24*B*b^4)*cos(d*x + c)^2 + 105*(8*A* a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 20*B*a*b^3 + 5*A*b^4)*cos(d*x + c))*sin( d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 1017 vs. \(2 (391) = 782\).
Time = 0.62 (sec) , antiderivative size = 1017, normalized size of antiderivative = 2.78 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\text {Too large to display} \] Input:
integrate(cos(d*x+c)**2*(a+b*cos(d*x+c))**4*(A+B*cos(d*x+c)),x)
Output:
Piecewise((A*a**4*x*sin(c + d*x)**2/2 + A*a**4*x*cos(c + d*x)**2/2 + A*a** 4*sin(c + d*x)*cos(c + d*x)/(2*d) + 8*A*a**3*b*sin(c + d*x)**3/(3*d) + 4*A *a**3*b*sin(c + d*x)*cos(c + d*x)**2/d + 9*A*a**2*b**2*x*sin(c + d*x)**4/4 + 9*A*a**2*b**2*x*sin(c + d*x)**2*cos(c + d*x)**2/2 + 9*A*a**2*b**2*x*cos (c + d*x)**4/4 + 9*A*a**2*b**2*sin(c + d*x)**3*cos(c + d*x)/(4*d) + 15*A*a **2*b**2*sin(c + d*x)*cos(c + d*x)**3/(4*d) + 32*A*a*b**3*sin(c + d*x)**5/ (15*d) + 16*A*a*b**3*sin(c + d*x)**3*cos(c + d*x)**2/(3*d) + 4*A*a*b**3*si n(c + d*x)*cos(c + d*x)**4/d + 5*A*b**4*x*sin(c + d*x)**6/16 + 15*A*b**4*x *sin(c + d*x)**4*cos(c + d*x)**2/16 + 15*A*b**4*x*sin(c + d*x)**2*cos(c + d*x)**4/16 + 5*A*b**4*x*cos(c + d*x)**6/16 + 5*A*b**4*sin(c + d*x)**5*cos( c + d*x)/(16*d) + 5*A*b**4*sin(c + d*x)**3*cos(c + d*x)**3/(6*d) + 11*A*b* *4*sin(c + d*x)*cos(c + d*x)**5/(16*d) + 2*B*a**4*sin(c + d*x)**3/(3*d) + B*a**4*sin(c + d*x)*cos(c + d*x)**2/d + 3*B*a**3*b*x*sin(c + d*x)**4/2 + 3 *B*a**3*b*x*sin(c + d*x)**2*cos(c + d*x)**2 + 3*B*a**3*b*x*cos(c + d*x)**4 /2 + 3*B*a**3*b*sin(c + d*x)**3*cos(c + d*x)/(2*d) + 5*B*a**3*b*sin(c + d* x)*cos(c + d*x)**3/(2*d) + 16*B*a**2*b**2*sin(c + d*x)**5/(5*d) + 8*B*a**2 *b**2*sin(c + d*x)**3*cos(c + d*x)**2/d + 6*B*a**2*b**2*sin(c + d*x)*cos(c + d*x)**4/d + 5*B*a*b**3*x*sin(c + d*x)**6/4 + 15*B*a*b**3*x*sin(c + d*x) **4*cos(c + d*x)**2/4 + 15*B*a*b**3*x*sin(c + d*x)**2*cos(c + d*x)**4/4 + 5*B*a*b**3*x*cos(c + d*x)**6/4 + 5*B*a*b**3*sin(c + d*x)**5*cos(c + d*x...
Time = 0.04 (sec) , antiderivative size = 366, normalized size of antiderivative = 1.00 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {1680 \, {\left (2 \, d x + 2 \, c + \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{4} - 2240 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} B a^{4} - 8960 \, {\left (\sin \left (d x + c\right )^{3} - 3 \, \sin \left (d x + c\right )\right )} A a^{3} b + 840 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a^{3} b + 1260 \, {\left (12 \, d x + 12 \, c + \sin \left (4 \, d x + 4 \, c\right ) + 8 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A a^{2} b^{2} + 2688 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} B a^{2} b^{2} + 1792 \, {\left (3 \, \sin \left (d x + c\right )^{5} - 10 \, \sin \left (d x + c\right )^{3} + 15 \, \sin \left (d x + c\right )\right )} A a b^{3} - 140 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} B a b^{3} - 35 \, {\left (4 \, \sin \left (2 \, d x + 2 \, c\right )^{3} - 60 \, d x - 60 \, c - 9 \, \sin \left (4 \, d x + 4 \, c\right ) - 48 \, \sin \left (2 \, d x + 2 \, c\right )\right )} A b^{4} - 192 \, {\left (5 \, \sin \left (d x + c\right )^{7} - 21 \, \sin \left (d x + c\right )^{5} + 35 \, \sin \left (d x + c\right )^{3} - 35 \, \sin \left (d x + c\right )\right )} B b^{4}}{6720 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+b*cos(d*x+c))^4*(A+B*cos(d*x+c)),x, algorithm="m axima")
Output:
1/6720*(1680*(2*d*x + 2*c + sin(2*d*x + 2*c))*A*a^4 - 2240*(sin(d*x + c)^3 - 3*sin(d*x + c))*B*a^4 - 8960*(sin(d*x + c)^3 - 3*sin(d*x + c))*A*a^3*b + 840*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*B*a^3*b + 12 60*(12*d*x + 12*c + sin(4*d*x + 4*c) + 8*sin(2*d*x + 2*c))*A*a^2*b^2 + 268 8*(3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*sin(d*x + c))*B*a^2*b^2 + 179 2*(3*sin(d*x + c)^5 - 10*sin(d*x + c)^3 + 15*sin(d*x + c))*A*a*b^3 - 140*( 4*sin(2*d*x + 2*c)^3 - 60*d*x - 60*c - 9*sin(4*d*x + 4*c) - 48*sin(2*d*x + 2*c))*B*a*b^3 - 35*(4*sin(2*d*x + 2*c)^3 - 60*d*x - 60*c - 9*sin(4*d*x + 4*c) - 48*sin(2*d*x + 2*c))*A*b^4 - 192*(5*sin(d*x + c)^7 - 21*sin(d*x + c )^5 + 35*sin(d*x + c)^3 - 35*sin(d*x + c))*B*b^4)/d
Time = 0.17 (sec) , antiderivative size = 313, normalized size of antiderivative = 0.86 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {B b^{4} \sin \left (7 \, d x + 7 \, c\right )}{448 \, d} + \frac {1}{16} \, {\left (8 \, A a^{4} + 24 \, B a^{3} b + 36 \, A a^{2} b^{2} + 20 \, B a b^{3} + 5 \, A b^{4}\right )} x + \frac {{\left (4 \, B a b^{3} + A b^{4}\right )} \sin \left (6 \, d x + 6 \, c\right )}{192 \, d} + \frac {{\left (24 \, B a^{2} b^{2} + 16 \, A a b^{3} + 7 \, B b^{4}\right )} \sin \left (5 \, d x + 5 \, c\right )}{320 \, d} + \frac {{\left (8 \, B a^{3} b + 12 \, A a^{2} b^{2} + 12 \, B a b^{3} + 3 \, A b^{4}\right )} \sin \left (4 \, d x + 4 \, c\right )}{64 \, d} + \frac {{\left (16 \, B a^{4} + 64 \, A a^{3} b + 120 \, B a^{2} b^{2} + 80 \, A a b^{3} + 21 \, B b^{4}\right )} \sin \left (3 \, d x + 3 \, c\right )}{192 \, d} + \frac {{\left (16 \, A a^{4} + 64 \, B a^{3} b + 96 \, A a^{2} b^{2} + 60 \, B a b^{3} + 15 \, A b^{4}\right )} \sin \left (2 \, d x + 2 \, c\right )}{64 \, d} + \frac {{\left (48 \, B a^{4} + 192 \, A a^{3} b + 240 \, B a^{2} b^{2} + 160 \, A a b^{3} + 35 \, B b^{4}\right )} \sin \left (d x + c\right )}{64 \, d} \] Input:
integrate(cos(d*x+c)^2*(a+b*cos(d*x+c))^4*(A+B*cos(d*x+c)),x, algorithm="g iac")
Output:
1/448*B*b^4*sin(7*d*x + 7*c)/d + 1/16*(8*A*a^4 + 24*B*a^3*b + 36*A*a^2*b^2 + 20*B*a*b^3 + 5*A*b^4)*x + 1/192*(4*B*a*b^3 + A*b^4)*sin(6*d*x + 6*c)/d + 1/320*(24*B*a^2*b^2 + 16*A*a*b^3 + 7*B*b^4)*sin(5*d*x + 5*c)/d + 1/64*(8 *B*a^3*b + 12*A*a^2*b^2 + 12*B*a*b^3 + 3*A*b^4)*sin(4*d*x + 4*c)/d + 1/192 *(16*B*a^4 + 64*A*a^3*b + 120*B*a^2*b^2 + 80*A*a*b^3 + 21*B*b^4)*sin(3*d*x + 3*c)/d + 1/64*(16*A*a^4 + 64*B*a^3*b + 96*A*a^2*b^2 + 60*B*a*b^3 + 15*A *b^4)*sin(2*d*x + 2*c)/d + 1/64*(48*B*a^4 + 192*A*a^3*b + 240*B*a^2*b^2 + 160*A*a*b^3 + 35*B*b^4)*sin(d*x + c)/d
Time = 45.59 (sec) , antiderivative size = 436, normalized size of antiderivative = 1.19 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {420\,A\,a^4\,\sin \left (2\,c+2\,d\,x\right )+\frac {1575\,A\,b^4\,\sin \left (2\,c+2\,d\,x\right )}{4}+140\,B\,a^4\,\sin \left (3\,c+3\,d\,x\right )+\frac {315\,A\,b^4\,\sin \left (4\,c+4\,d\,x\right )}{4}+\frac {35\,A\,b^4\,\sin \left (6\,c+6\,d\,x\right )}{4}+\frac {735\,B\,b^4\,\sin \left (3\,c+3\,d\,x\right )}{4}+\frac {147\,B\,b^4\,\sin \left (5\,c+5\,d\,x\right )}{4}+\frac {15\,B\,b^4\,\sin \left (7\,c+7\,d\,x\right )}{4}+1260\,B\,a^4\,\sin \left (c+d\,x\right )+\frac {3675\,B\,b^4\,\sin \left (c+d\,x\right )}{4}+4200\,A\,a\,b^3\,\sin \left (c+d\,x\right )+5040\,A\,a^3\,b\,\sin \left (c+d\,x\right )+840\,A\,a^4\,d\,x+525\,A\,b^4\,d\,x+700\,A\,a\,b^3\,\sin \left (3\,c+3\,d\,x\right )+560\,A\,a^3\,b\,\sin \left (3\,c+3\,d\,x\right )+84\,A\,a\,b^3\,\sin \left (5\,c+5\,d\,x\right )+1575\,B\,a\,b^3\,\sin \left (2\,c+2\,d\,x\right )+1680\,B\,a^3\,b\,\sin \left (2\,c+2\,d\,x\right )+315\,B\,a\,b^3\,\sin \left (4\,c+4\,d\,x\right )+210\,B\,a^3\,b\,\sin \left (4\,c+4\,d\,x\right )+35\,B\,a\,b^3\,\sin \left (6\,c+6\,d\,x\right )+6300\,B\,a^2\,b^2\,\sin \left (c+d\,x\right )+2520\,A\,a^2\,b^2\,\sin \left (2\,c+2\,d\,x\right )+315\,A\,a^2\,b^2\,\sin \left (4\,c+4\,d\,x\right )+1050\,B\,a^2\,b^2\,\sin \left (3\,c+3\,d\,x\right )+126\,B\,a^2\,b^2\,\sin \left (5\,c+5\,d\,x\right )+2100\,B\,a\,b^3\,d\,x+2520\,B\,a^3\,b\,d\,x+3780\,A\,a^2\,b^2\,d\,x}{1680\,d} \] Input:
int(cos(c + d*x)^2*(A + B*cos(c + d*x))*(a + b*cos(c + d*x))^4,x)
Output:
(420*A*a^4*sin(2*c + 2*d*x) + (1575*A*b^4*sin(2*c + 2*d*x))/4 + 140*B*a^4* sin(3*c + 3*d*x) + (315*A*b^4*sin(4*c + 4*d*x))/4 + (35*A*b^4*sin(6*c + 6* d*x))/4 + (735*B*b^4*sin(3*c + 3*d*x))/4 + (147*B*b^4*sin(5*c + 5*d*x))/4 + (15*B*b^4*sin(7*c + 7*d*x))/4 + 1260*B*a^4*sin(c + d*x) + (3675*B*b^4*si n(c + d*x))/4 + 4200*A*a*b^3*sin(c + d*x) + 5040*A*a^3*b*sin(c + d*x) + 84 0*A*a^4*d*x + 525*A*b^4*d*x + 700*A*a*b^3*sin(3*c + 3*d*x) + 560*A*a^3*b*s in(3*c + 3*d*x) + 84*A*a*b^3*sin(5*c + 5*d*x) + 1575*B*a*b^3*sin(2*c + 2*d *x) + 1680*B*a^3*b*sin(2*c + 2*d*x) + 315*B*a*b^3*sin(4*c + 4*d*x) + 210*B *a^3*b*sin(4*c + 4*d*x) + 35*B*a*b^3*sin(6*c + 6*d*x) + 6300*B*a^2*b^2*sin (c + d*x) + 2520*A*a^2*b^2*sin(2*c + 2*d*x) + 315*A*a^2*b^2*sin(4*c + 4*d* x) + 1050*B*a^2*b^2*sin(3*c + 3*d*x) + 126*B*a^2*b^2*sin(5*c + 5*d*x) + 21 00*B*a*b^3*d*x + 2520*B*a^3*b*d*x + 3780*A*a^2*b^2*d*x)/(1680*d)
Time = 0.18 (sec) , antiderivative size = 270, normalized size of antiderivative = 0.74 \[ \int \cos ^2(c+d x) (a+b \cos (c+d x))^4 (A+B \cos (c+d x)) \, dx=\frac {1400 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{5} a \,b^{4}-4200 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a^{3} b^{2}-4550 \cos \left (d x +c \right ) \sin \left (d x +c \right )^{3} a \,b^{4}+840 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{5}+10500 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{3} b^{2}+5775 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a \,b^{4}-240 \sin \left (d x +c \right )^{7} b^{5}+3360 \sin \left (d x +c \right )^{5} a^{2} b^{3}+1008 \sin \left (d x +c \right )^{5} b^{5}-2800 \sin \left (d x +c \right )^{3} a^{4} b -11200 \sin \left (d x +c \right )^{3} a^{2} b^{3}-1680 \sin \left (d x +c \right )^{3} b^{5}+8400 \sin \left (d x +c \right ) a^{4} b +16800 \sin \left (d x +c \right ) a^{2} b^{3}+1680 \sin \left (d x +c \right ) b^{5}+840 a^{5} d x +6300 a^{3} b^{2} d x +2625 a \,b^{4} d x}{1680 d} \] Input:
int(cos(d*x+c)^2*(a+b*cos(d*x+c))^4*(A+B*cos(d*x+c)),x)
Output:
(1400*cos(c + d*x)*sin(c + d*x)**5*a*b**4 - 4200*cos(c + d*x)*sin(c + d*x) **3*a**3*b**2 - 4550*cos(c + d*x)*sin(c + d*x)**3*a*b**4 + 840*cos(c + d*x )*sin(c + d*x)*a**5 + 10500*cos(c + d*x)*sin(c + d*x)*a**3*b**2 + 5775*cos (c + d*x)*sin(c + d*x)*a*b**4 - 240*sin(c + d*x)**7*b**5 + 3360*sin(c + d* x)**5*a**2*b**3 + 1008*sin(c + d*x)**5*b**5 - 2800*sin(c + d*x)**3*a**4*b - 11200*sin(c + d*x)**3*a**2*b**3 - 1680*sin(c + d*x)**3*b**5 + 8400*sin(c + d*x)*a**4*b + 16800*sin(c + d*x)*a**2*b**3 + 1680*sin(c + d*x)*b**5 + 8 40*a**5*d*x + 6300*a**3*b**2*d*x + 2625*a*b**4*d*x)/(1680*d)