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

Optimal. Leaf size=17 \[ -\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]
time = 0.03, antiderivative size = 17, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.333, Rules used = {4372, 2645, 14} \begin {gather*} \frac {8 \cos ^7(x)}{7}-\frac {8 \cos ^5(x)}{5} \end {gather*}

Antiderivative was successfully verified.

[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 {gather*} \begin {aligned} \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 {aligned} \end {gather*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 31, normalized size = 1.82 \begin {gather*} -\frac {3 \cos (x)}{8}-\frac {1}{8} \cos (3 x)+\frac {1}{40} \cos (5 x)+\frac {1}{56} \cos (7 x) \end {gather*}

Antiderivative was successfully verified.

[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]
time = 0.20, size = 24, normalized size = 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\)

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Maxima [A]
time = 0.35, size = 23, normalized size = 1.35 \begin {gather*} \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 ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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)

________________________________________________________________________________________

Fricas [A]
time = 0.61, size = 13, normalized size = 0.76 \begin {gather*} \frac {8}{7} \, \cos \left (x\right )^{7} - \frac {8}{5} \, \cos \left (x\right )^{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 65 vs. \(2 (15) = 30\).
time = 0.74, size = 65, normalized size = 3.82 \begin {gather*} - \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} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[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

________________________________________________________________________________________

Giac [A]
time = 0.38, size = 13, normalized size = 0.76 \begin {gather*} \frac {8}{7} \, \cos \left (x\right )^{7} - \frac {8}{5} \, \cos \left (x\right )^{5} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.07, size = 14, normalized size = 0.82 \begin {gather*} \frac {8\,{\cos \left (x\right )}^5\,\left (5\,{\cos \left (x\right )}^2-7\right )}{35} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Chatgpt [F] Failed to verify
time = 1.00, size = 20, normalized size = 1.18 \begin {gather*} \frac {3 \left (\sin ^{2}\left (2 x \right )\right )}{16}-\frac {\ln \left (1-\left (\sin ^{4}\left (x \right )\right )\right )}{8} \end {gather*}

Warning: Unable to verify antiderivative.

[In]

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

[Out]

3/16*sin(2*x)^2-1/8*ln(1-sin(x)^4)

________________________________________________________________________________________