### 3.342 $$\int \cos ^2(x) \sin ^5(x) \, dx$$

Optimal. Leaf size=25 $-\frac{1}{7} \cos ^7(x)+\frac{2 \cos ^5(x)}{5}-\frac{\cos ^3(x)}{3}$

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.0265598, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 9, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.222, Rules used = {2565, 270} $-\frac{1}{7} \cos ^7(x)+\frac{2 \cos ^5(x)}{5}-\frac{\cos ^3(x)}{3}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

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

Rule 2565

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 270

Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*(a + b*x^n)^p,
x], x] /; FreeQ[{a, b, c, m, n}, x] && IGtQ[p, 0]

Rubi steps

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

Mathematica [A]  time = 0.0099994, size = 31, normalized size = 1.24 $-\frac{5 \cos (x)}{64}-\frac{1}{192} \cos (3 x)+\frac{3}{320} \cos (5 x)-\frac{1}{448} \cos (7 x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(-5*Cos[x])/64 - Cos[3*x]/192 + (3*Cos[5*x])/320 - Cos[7*x]/448

________________________________________________________________________________________

Maple [A]  time = 0.006, size = 28, normalized size = 1.1 \begin{align*} -{\frac{ \left ( \cos \left ( x \right ) \right ) ^{3} \left ( \sin \left ( x \right ) \right ) ^{4}}{7}}-{\frac{4\, \left ( \sin \left ( x \right ) \right ) ^{2} \left ( \cos \left ( x \right ) \right ) ^{3}}{35}}-{\frac{8\, \left ( \cos \left ( x \right ) \right ) ^{3}}{105}} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/7*cos(x)^3*sin(x)^4-4/35*sin(x)^2*cos(x)^3-8/105*cos(x)^3

________________________________________________________________________________________

Maxima [A]  time = 0.949246, size = 26, normalized size = 1.04 \begin{align*} -\frac{1}{7} \, \cos \left (x\right )^{7} + \frac{2}{5} \, \cos \left (x\right )^{5} - \frac{1}{3} \, \cos \left (x\right )^{3} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/7*cos(x)^7 + 2/5*cos(x)^5 - 1/3*cos(x)^3

________________________________________________________________________________________

Fricas [A]  time = 2.07527, size = 61, normalized size = 2.44 \begin{align*} -\frac{1}{7} \, \cos \left (x\right )^{7} + \frac{2}{5} \, \cos \left (x\right )^{5} - \frac{1}{3} \, \cos \left (x\right )^{3} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/7*cos(x)^7 + 2/5*cos(x)^5 - 1/3*cos(x)^3

________________________________________________________________________________________

Sympy [A]  time = 0.062005, size = 20, normalized size = 0.8 \begin{align*} - \frac{\cos ^{7}{\left (x \right )}}{7} + \frac{2 \cos ^{5}{\left (x \right )}}{5} - \frac{\cos ^{3}{\left (x \right )}}{3} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-cos(x)**7/7 + 2*cos(x)**5/5 - cos(x)**3/3

________________________________________________________________________________________

Giac [A]  time = 1.0583, size = 26, normalized size = 1.04 \begin{align*} -\frac{1}{7} \, \cos \left (x\right )^{7} + \frac{2}{5} \, \cos \left (x\right )^{5} - \frac{1}{3} \, \cos \left (x\right )^{3} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/7*cos(x)^7 + 2/5*cos(x)^5 - 1/3*cos(x)^3