3.331 \(\int \cos ^3(x) \, dx\)

Optimal. Leaf size=11 \[ \sin (x)-\frac{\sin ^3(x)}{3} \]

[Out]

Sin[x] - Sin[x]^3/3

________________________________________________________________________________________

Rubi [A]  time = 0.0065874, antiderivative size = 11, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 1, integrand size = 4, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.25, Rules used = {2633} \[ \sin (x)-\frac{\sin ^3(x)}{3} \]

Antiderivative was successfully verified.

[In]

Int[Cos[x]^3,x]

[Out]

Sin[x] - Sin[x]^3/3

Rule 2633

Int[sin[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[Expand[(1 - x^2)^((n - 1)/2), x], x], x
, Cos[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[(n - 1)/2, 0]

Rubi steps

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

Mathematica [A]  time = 0.0017568, size = 15, normalized size = 1.36 \[ \frac{3 \sin (x)}{4}+\frac{1}{12} \sin (3 x) \]

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^3,x]

[Out]

(3*Sin[x])/4 + Sin[3*x]/12

________________________________________________________________________________________

Maple [A]  time = 0.003, size = 11, normalized size = 1. \begin{align*}{\frac{ \left ( 2+ \left ( \cos \left ( x \right ) \right ) ^{2} \right ) \sin \left ( x \right ) }{3}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^3,x)

[Out]

1/3*(2+cos(x)^2)*sin(x)

________________________________________________________________________________________

Maxima [A]  time = 0.927702, size = 12, normalized size = 1.09 \begin{align*} -\frac{1}{3} \, \sin \left (x\right )^{3} + \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*sin(x)^3 + sin(x)

________________________________________________________________________________________

Fricas [A]  time = 1.48112, size = 36, normalized size = 3.27 \begin{align*} \frac{1}{3} \,{\left (\cos \left (x\right )^{2} + 2\right )} \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/3*(cos(x)^2 + 2)*sin(x)

________________________________________________________________________________________

Sympy [A]  time = 0.058163, size = 8, normalized size = 0.73 \begin{align*} - \frac{\sin ^{3}{\left (x \right )}}{3} + \sin{\left (x \right )} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-sin(x)**3/3 + sin(x)

________________________________________________________________________________________

Giac [A]  time = 1.0437, size = 12, normalized size = 1.09 \begin{align*} -\frac{1}{3} \, \sin \left (x\right )^{3} + \sin \left (x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/3*sin(x)^3 + sin(x)