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

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [A] (verification not implemented)
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 4, antiderivative size = 11 \[ \int \cos ^3(x) \, dx=\sin (x)-\frac {\sin ^3(x)}{3} \]

[Out]

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

Rubi [A] (verified)

Time = 0.01 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {2713} \[ \int \cos ^3(x) \, dx=\sin (x)-\frac {\sin ^3(x)}{3} \]

[In]

Int[Cos[x]^3,x]

[Out]

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

Rule 2713

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*} \text {integral}& = -\text {Subst}\left (\int \left (1-x^2\right ) \, dx,x,-\sin (x)\right ) \\ & = \sin (x)-\frac {\sin ^3(x)}{3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00 \[ \int \cos ^3(x) \, dx=\sin (x)-\frac {\sin ^3(x)}{3} \]

[In]

Integrate[Cos[x]^3,x]

[Out]

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

Maple [A] (verified)

Time = 0.41 (sec) , antiderivative size = 11, normalized size of antiderivative = 1.00

method result size
default \(\frac {\left (2+\cos ^{2}\left (x \right )\right ) \sin \left (x \right )}{3}\) \(11\)
risch \(\frac {3 \sin \left (x \right )}{4}+\frac {\sin \left (3 x \right )}{12}\) \(12\)
parallelrisch \(\frac {3 \sin \left (x \right )}{4}+\frac {\sin \left (3 x \right )}{12}\) \(12\)

[In]

int(cos(x)^3,x,method=_RETURNVERBOSE)

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.25 (sec) , antiderivative size = 10, normalized size of antiderivative = 0.91 \[ \int \cos ^3(x) \, dx=\frac {1}{3} \, {\left (\cos \left (x\right )^{2} + 2\right )} \sin \left (x\right ) \]

[In]

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

[Out]

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

Sympy [A] (verification not implemented)

Time = 0.02 (sec) , antiderivative size = 8, normalized size of antiderivative = 0.73 \[ \int \cos ^3(x) \, dx=- \frac {\sin ^{3}{\left (x \right )}}{3} + \sin {\left (x \right )} \]

[In]

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

[Out]

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

Maxima [A] (verification not implemented)

none

Time = 0.21 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \cos ^3(x) \, dx=-\frac {1}{3} \, \sin \left (x\right )^{3} + \sin \left (x\right ) \]

[In]

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

[Out]

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

Giac [A] (verification not implemented)

none

Time = 0.29 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \cos ^3(x) \, dx=-\frac {1}{3} \, \sin \left (x\right )^{3} + \sin \left (x\right ) \]

[In]

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

[Out]

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

Mupad [B] (verification not implemented)

Time = 0.04 (sec) , antiderivative size = 9, normalized size of antiderivative = 0.82 \[ \int \cos ^3(x) \, dx=\sin \left (x\right )-\frac {{\sin \left (x\right )}^3}{3} \]

[In]

int(cos(x)^3,x)

[Out]

sin(x) - sin(x)^3/3