\(\int \cos (x) \sin ^3(2 x) \, dx\) [2]

   Optimal result
   Rubi [A] (verified)
   Mathematica [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)

Optimal result

Integrand size = 9, antiderivative size = 17 \[ \int \cos (x) \sin ^3(2 x) \, dx=-\frac {8}{5} \cos ^5(x)+\frac {8 \cos ^7(x)}{7} \]

[Out]

-8/5*cos(x)^5+8/7*cos(x)^7

Rubi [A] (verified)

Time = 0.04 (sec) , antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4372, 2645, 14} \[ \int \cos (x) \sin ^3(2 x) \, dx=\frac {8 \cos ^7(x)}{7}-\frac {8 \cos ^5(x)}{5} \]

[In]

Int[Cos[x]*Sin[2*x]^3,x]

[Out]

(-8*Cos[x]^5)/5 + (8*Cos[x]^7)/7

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 2645

Int[(cos[(e_.) + (f_.)*(x_)]*(a_.))^(m_.)*sin[(e_.) + (f_.)*(x_)]^(n_.), x_Symbol] :> Dist[-(a*f)^(-1), Subst[
Int[x^m*(1 - x^2/a^2)^((n - 1)/2), x], x, a*Cos[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n - 1)/2]
 &&  !(IntegerQ[(m - 1)/2] && GtQ[m, 0] && LeQ[m, n])

Rule 4372

Int[(cos[(a_.) + (b_.)*(x_)]*(e_.))^(m_.)*sin[(c_.) + (d_.)*(x_)]^(p_.), x_Symbol] :> Dist[2^p/e^p, Int[(e*Cos
[a + b*x])^(m + p)*Sin[a + b*x]^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && EqQ[b*c - a*d, 0] && EqQ[d/b, 2]
&& IntegerQ[p]

Rubi steps \begin{align*} \text {integral}& = 8 \int \cos ^4(x) \sin ^3(x) \, dx \\ & = -\left (8 \text {Subst}\left (\int x^4 \left (1-x^2\right ) \, dx,x,\cos (x)\right )\right ) \\ & = -\left (8 \text {Subst}\left (\int \left (x^4-x^6\right ) \, dx,x,\cos (x)\right )\right ) \\ & = -\frac {8}{5} \cos ^5(x)+\frac {8 \cos ^7(x)}{7} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.02 (sec) , antiderivative size = 31, normalized size of antiderivative = 1.82 \[ \int \cos (x) \sin ^3(2 x) \, dx=-\frac {3 \cos (x)}{8}-\frac {1}{8} \cos (3 x)+\frac {1}{40} \cos (5 x)+\frac {1}{56} \cos (7 x) \]

[In]

Integrate[Cos[x]*Sin[2*x]^3,x]

[Out]

(-3*Cos[x])/8 - Cos[3*x]/8 + Cos[5*x]/40 + Cos[7*x]/56

Maple [A] (verified)

Time = 0.21 (sec) , antiderivative size = 24, normalized size of antiderivative = 1.41

method result size
default \(-\frac {3 \cos \left (x \right )}{8}-\frac {\cos \left (3 x \right )}{8}+\frac {\cos \left (5 x \right )}{40}+\frac {\cos \left (7 x \right )}{56}\) \(24\)
risch \(-\frac {3 \cos \left (x \right )}{8}-\frac {\cos \left (3 x \right )}{8}+\frac {\cos \left (5 x \right )}{40}+\frac {\cos \left (7 x \right )}{56}\) \(24\)
parallelrisch \(\frac {8}{21}-\frac {3 \cos \left (x \right )}{8}-\frac {\cos \left (3 x \right )}{8}+\frac {\cos \left (5 x \right )}{40}+\frac {\cos \left (7 x \right )}{56}\) \(25\)

[In]

int(sin(2*x)^3*cos(x),x,method=_RETURNVERBOSE)

[Out]

-3/8*cos(x)-1/8*cos(3*x)+1/40*cos(5*x)+1/56*cos(7*x)

Fricas [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \cos (x) \sin ^3(2 x) \, dx=\frac {8}{7} \, \cos \left (x\right )^{7} - \frac {8}{5} \, \cos \left (x\right )^{5} \]

[In]

integrate(sin(2*x)^3*cos(x),x, algorithm="fricas")

[Out]

8/7*cos(x)^7 - 8/5*cos(x)^5

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (15) = 30\).

Time = 0.59 (sec) , antiderivative size = 65, normalized size of antiderivative = 3.82 \[ \int \cos (x) \sin ^3(2 x) \, dx=- \frac {9 \sin {\left (x \right )} \sin ^{3}{\left (2 x \right )}}{35} - \frac {8 \sin {\left (x \right )} \sin {\left (2 x \right )} \cos ^{2}{\left (2 x \right )}}{35} - \frac {22 \sin ^{2}{\left (2 x \right )} \cos {\left (x \right )} \cos {\left (2 x \right )}}{35} - \frac {16 \cos {\left (x \right )} \cos ^{3}{\left (2 x \right )}}{35} \]

[In]

integrate(sin(2*x)**3*cos(x),x)

[Out]

-9*sin(x)*sin(2*x)**3/35 - 8*sin(x)*sin(2*x)*cos(2*x)**2/35 - 22*sin(2*x)**2*cos(x)*cos(2*x)/35 - 16*cos(x)*co
s(2*x)**3/35

Maxima [A] (verification not implemented)

none

Time = 0.19 (sec) , antiderivative size = 23, normalized size of antiderivative = 1.35 \[ \int \cos (x) \sin ^3(2 x) \, dx=\frac {1}{56} \, \cos \left (7 \, x\right ) + \frac {1}{40} \, \cos \left (5 \, x\right ) - \frac {1}{8} \, \cos \left (3 \, x\right ) - \frac {3}{8} \, \cos \left (x\right ) \]

[In]

integrate(sin(2*x)^3*cos(x),x, algorithm="maxima")

[Out]

1/56*cos(7*x) + 1/40*cos(5*x) - 1/8*cos(3*x) - 3/8*cos(x)

Giac [A] (verification not implemented)

none

Time = 0.27 (sec) , antiderivative size = 13, normalized size of antiderivative = 0.76 \[ \int \cos (x) \sin ^3(2 x) \, dx=\frac {8}{7} \, \cos \left (x\right )^{7} - \frac {8}{5} \, \cos \left (x\right )^{5} \]

[In]

integrate(sin(2*x)^3*cos(x),x, algorithm="giac")

[Out]

8/7*cos(x)^7 - 8/5*cos(x)^5

Mupad [B] (verification not implemented)

Time = 0.06 (sec) , antiderivative size = 14, normalized size of antiderivative = 0.82 \[ \int \cos (x) \sin ^3(2 x) \, dx=\frac {8\,{\cos \left (x\right )}^5\,\left (5\,{\cos \left (x\right )}^2-7\right )}{35} \]

[In]

int(sin(2*x)^3*cos(x),x)

[Out]

(8*cos(x)^5*(5*cos(x)^2 - 7))/35