Integrand size = 29, antiderivative size = 54 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {(A b-a B) (a+b \sin (c+d x))^3}{3 b^2 d}+\frac {B (a+b \sin (c+d x))^4}{4 b^2 d} \] Output:
1/3*(A*b-B*a)*(a+b*sin(d*x+c))^3/b^2/d+1/4*B*(a+b*sin(d*x+c))^4/b^2/d
Time = 0.08 (sec) , antiderivative size = 41, normalized size of antiderivative = 0.76 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {(a+b \sin (c+d x))^3 (4 A b-a B+3 b B \sin (c+d x))}{12 b^2 d} \] Input:
Integrate[Cos[c + d*x]*(a + b*Sin[c + d*x])^2*(A + B*Sin[c + d*x]),x]
Output:
((a + b*Sin[c + d*x])^3*(4*A*b - a*B + 3*b*B*Sin[c + d*x]))/(12*b^2*d)
Time = 0.28 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.91, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {3042, 3312, 27, 49, 2009}
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 (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x))dx\) |
\(\Big \downarrow \) 3312 |
\(\displaystyle \frac {\int \frac {(a+b \sin (c+d x))^2 (A b+B \sin (c+d x) b)}{b}d(b \sin (c+d x))}{b d}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int (a+b \sin (c+d x))^2 (A b+B \sin (c+d x) b)d(b \sin (c+d x))}{b^2 d}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {\int \left (B (a+b \sin (c+d x))^3+(A b-a B) (a+b \sin (c+d x))^2\right )d(b \sin (c+d x))}{b^2 d}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\frac {1}{3} (A b-a B) (a+b \sin (c+d x))^3+\frac {1}{4} B (a+b \sin (c+d x))^4}{b^2 d}\) |
Input:
Int[Cos[c + d*x]*(a + b*Sin[c + d*x])^2*(A + B*Sin[c + d*x]),x]
Output:
(((A*b - a*B)*(a + b*Sin[c + d*x])^3)/3 + (B*(a + b*Sin[c + d*x])^4)/4)/(b ^2*d)
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[cos[(e_.) + (f_.)*(x_)]*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*(( c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[1/(b*f) Su bst[Int[(a + x)^m*(c + (d/b)*x)^n, x], x, b*Sin[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, m, n}, x]
Time = 7.26 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.35
method | result | size |
derivativedivides | \(\frac {\frac {B \,b^{2} \sin \left (d x +c \right )^{4}}{4}+\frac {\left (b^{2} A +2 a b B \right ) \sin \left (d x +c \right )^{3}}{3}+\frac {\left (2 A a b +a^{2} B \right ) \sin \left (d x +c \right )^{2}}{2}+\sin \left (d x +c \right ) A \,a^{2}}{d}\) | \(73\) |
default | \(\frac {\frac {B \,b^{2} \sin \left (d x +c \right )^{4}}{4}+\frac {\left (b^{2} A +2 a b B \right ) \sin \left (d x +c \right )^{3}}{3}+\frac {\left (2 A a b +a^{2} B \right ) \sin \left (d x +c \right )^{2}}{2}+\sin \left (d x +c \right ) A \,a^{2}}{d}\) | \(73\) |
parallelrisch | \(\frac {\left (-48 A a b -24 a^{2} B -12 B \,b^{2}\right ) \cos \left (2 d x +2 c \right )+\left (-8 b^{2} A -16 a b B \right ) \sin \left (3 d x +3 c \right )+3 B \cos \left (4 d x +4 c \right ) b^{2}+\left (96 A \,a^{2}+24 b^{2} A +48 a b B \right ) \sin \left (d x +c \right )+48 A a b +24 a^{2} B +9 B \,b^{2}}{96 d}\) | \(114\) |
risch | \(\frac {\sin \left (d x +c \right ) A \,a^{2}}{d}+\frac {\sin \left (d x +c \right ) b^{2} A}{4 d}+\frac {\sin \left (d x +c \right ) a b B}{2 d}+\frac {B \,b^{2} \cos \left (4 d x +4 c \right )}{32 d}-\frac {\sin \left (3 d x +3 c \right ) b^{2} A}{12 d}-\frac {\sin \left (3 d x +3 c \right ) a b B}{6 d}-\frac {\cos \left (2 d x +2 c \right ) A a b}{2 d}-\frac {\cos \left (2 d x +2 c \right ) a^{2} B}{4 d}-\frac {\cos \left (2 d x +2 c \right ) B \,b^{2}}{8 d}\) | \(151\) |
norman | \(\frac {\frac {2 \left (9 A \,a^{2}+4 b^{2} A +8 a b B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 d}+\frac {2 \left (9 A \,a^{2}+4 b^{2} A +8 a b B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 d}+\frac {2 \left (2 A a b +a^{2} B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{d}+\frac {2 \left (2 A a b +a^{2} B \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6}}{d}+\frac {2 \left (4 A a b +2 a^{2} B +2 B \,b^{2}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4}}{d}+\frac {2 A \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{d}+\frac {2 A \,a^{2} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{d}}{\left (1+\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}\right )^{4}}\) | \(212\) |
orering | \(\text {Expression too large to display}\) | \(978\) |
Input:
int(cos(d*x+c)*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x,method=_RETURNVERBOSE )
Output:
1/d*(1/4*B*b^2*sin(d*x+c)^4+1/3*(A*b^2+2*B*a*b)*sin(d*x+c)^3+1/2*(2*A*a*b+ B*a^2)*sin(d*x+c)^2+sin(d*x+c)*A*a^2)
Time = 0.08 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.70 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {3 \, B b^{2} \cos \left (d x + c\right )^{4} - 6 \, {\left (B a^{2} + 2 \, A a b + B b^{2}\right )} \cos \left (d x + c\right )^{2} + 4 \, {\left (3 \, A a^{2} + 2 \, B a b + A b^{2} - {\left (2 \, B a b + A b^{2}\right )} \cos \left (d x + c\right )^{2}\right )} \sin \left (d x + c\right )}{12 \, d} \] Input:
integrate(cos(d*x+c)*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="fri cas")
Output:
1/12*(3*B*b^2*cos(d*x + c)^4 - 6*(B*a^2 + 2*A*a*b + B*b^2)*cos(d*x + c)^2 + 4*(3*A*a^2 + 2*B*a*b + A*b^2 - (2*B*a*b + A*b^2)*cos(d*x + c)^2)*sin(d*x + c))/d
Leaf count of result is larger than twice the leaf count of optimal. 117 vs. \(2 (46) = 92\).
Time = 0.17 (sec) , antiderivative size = 117, normalized size of antiderivative = 2.17 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\begin {cases} \frac {A a^{2} \sin {\left (c + d x \right )}}{d} - \frac {A a b \cos ^{2}{\left (c + d x \right )}}{d} + \frac {A b^{2} \sin ^{3}{\left (c + d x \right )}}{3 d} - \frac {B a^{2} \cos ^{2}{\left (c + d x \right )}}{2 d} + \frac {2 B a b \sin ^{3}{\left (c + d x \right )}}{3 d} + \frac {B b^{2} \sin ^{4}{\left (c + d x \right )}}{4 d} & \text {for}\: d \neq 0 \\x \left (A + B \sin {\left (c \right )}\right ) \left (a + b \sin {\left (c \right )}\right )^{2} \cos {\left (c \right )} & \text {otherwise} \end {cases} \] Input:
integrate(cos(d*x+c)*(a+b*sin(d*x+c))**2*(A+B*sin(d*x+c)),x)
Output:
Piecewise((A*a**2*sin(c + d*x)/d - A*a*b*cos(c + d*x)**2/d + A*b**2*sin(c + d*x)**3/(3*d) - B*a**2*cos(c + d*x)**2/(2*d) + 2*B*a*b*sin(c + d*x)**3/( 3*d) + B*b**2*sin(c + d*x)**4/(4*d), Ne(d, 0)), (x*(A + B*sin(c))*(a + b*s in(c))**2*cos(c), True))
Time = 0.03 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.37 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {3 \, B b^{2} \sin \left (d x + c\right )^{4} + 12 \, A a^{2} \sin \left (d x + c\right ) + 4 \, {\left (2 \, B a b + A b^{2}\right )} \sin \left (d x + c\right )^{3} + 6 \, {\left (B a^{2} + 2 \, A a b\right )} \sin \left (d x + c\right )^{2}}{12 \, d} \] Input:
integrate(cos(d*x+c)*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="max ima")
Output:
1/12*(3*B*b^2*sin(d*x + c)^4 + 12*A*a^2*sin(d*x + c) + 4*(2*B*a*b + A*b^2) *sin(d*x + c)^3 + 6*(B*a^2 + 2*A*a*b)*sin(d*x + c)^2)/d
Time = 0.39 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.59 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {3 \, B b^{2} \sin \left (d x + c\right )^{4} + 8 \, B a b \sin \left (d x + c\right )^{3} + 4 \, A b^{2} \sin \left (d x + c\right )^{3} + 6 \, B a^{2} \sin \left (d x + c\right )^{2} + 12 \, A a b \sin \left (d x + c\right )^{2} + 12 \, A a^{2} \sin \left (d x + c\right )}{12 \, d} \] Input:
integrate(cos(d*x+c)*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x, algorithm="gia c")
Output:
1/12*(3*B*b^2*sin(d*x + c)^4 + 8*B*a*b*sin(d*x + c)^3 + 4*A*b^2*sin(d*x + c)^3 + 6*B*a^2*sin(d*x + c)^2 + 12*A*a*b*sin(d*x + c)^2 + 12*A*a^2*sin(d*x + c))/d
Time = 0.07 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.31 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {{\sin \left (c+d\,x\right )}^2\,\left (\frac {B\,a^2}{2}+A\,b\,a\right )+{\sin \left (c+d\,x\right )}^3\,\left (\frac {A\,b^2}{3}+\frac {2\,B\,a\,b}{3}\right )+\frac {B\,b^2\,{\sin \left (c+d\,x\right )}^4}{4}+A\,a^2\,\sin \left (c+d\,x\right )}{d} \] Input:
int(cos(c + d*x)*(A + B*sin(c + d*x))*(a + b*sin(c + d*x))^2,x)
Output:
(sin(c + d*x)^2*((B*a^2)/2 + A*a*b) + sin(c + d*x)^3*((A*b^2)/3 + (2*B*a*b )/3) + (B*b^2*sin(c + d*x)^4)/4 + A*a^2*sin(c + d*x))/d
Time = 0.16 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.06 \[ \int \cos (c+d x) (a+b \sin (c+d x))^2 (A+B \sin (c+d x)) \, dx=\frac {-6 \cos \left (d x +c \right )^{2} a^{2} b +\sin \left (d x +c \right )^{4} b^{3}+4 \sin \left (d x +c \right )^{3} a \,b^{2}+4 \sin \left (d x +c \right ) a^{3}}{4 d} \] Input:
int(cos(d*x+c)*(a+b*sin(d*x+c))^2*(A+B*sin(d*x+c)),x)
Output:
( - 6*cos(c + d*x)**2*a**2*b + sin(c + d*x)**4*b**3 + 4*sin(c + d*x)**3*a* b**2 + 4*sin(c + d*x)*a**3)/(4*d)