3.1.38 \(\int \cos ^4(x) \, dx\) [38]

Optimal. Leaf size=24 \[ \frac {3 x}{8}+\frac {3}{8} \cos (x) \sin (x)+\frac {1}{4} \cos ^3(x) \sin (x) \]

[Out]

3/8*x+3/8*cos(x)*sin(x)+1/4*cos(x)^3*sin(x)

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 24, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {2715, 8} \begin {gather*} \frac {3 x}{8}+\frac {1}{4} \sin (x) \cos ^3(x)+\frac {3}{8} \sin (x) \cos (x) \end {gather*}

Antiderivative was successfully verified.

[In]

Int[Cos[x]^4,x]

[Out]

(3*x)/8 + (3*Cos[x]*Sin[x])/8 + (Cos[x]^3*Sin[x])/4

Rule 8

Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]

Rule 2715

Int[((b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d*x]*((b*Sin[c + d*x])^(n - 1)/(d*n))
, x] + Dist[b^2*((n - 1)/n), Int[(b*Sin[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && Integ
erQ[2*n]

Rubi steps

\begin {align*} \int \cos ^4(x) \, dx &=\frac {1}{4} \cos ^3(x) \sin (x)+\frac {3}{4} \int \cos ^2(x) \, dx\\ &=\frac {3}{8} \cos (x) \sin (x)+\frac {1}{4} \cos ^3(x) \sin (x)+\frac {3 \int 1 \, dx}{8}\\ &=\frac {3 x}{8}+\frac {3}{8} \cos (x) \sin (x)+\frac {1}{4} \cos ^3(x) \sin (x)\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.00, size = 22, normalized size = 0.92 \begin {gather*} \frac {3 x}{8}+\frac {1}{4} \sin (2 x)+\frac {1}{32} \sin (4 x) \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[Cos[x]^4,x]

[Out]

(3*x)/8 + Sin[2*x]/4 + Sin[4*x]/32

________________________________________________________________________________________

Maple [A]
time = 0.10, size = 18, normalized size = 0.75

method result size
risch \(\frac {3 x}{8}+\frac {\sin \left (4 x \right )}{32}+\frac {\sin \left (2 x \right )}{4}\) \(17\)
default \(\frac {\left (\cos ^{3}\left (x \right )+\frac {3 \cos \left (x \right )}{2}\right ) \sin \left (x \right )}{4}+\frac {3 x}{8}\) \(18\)
norman \(\frac {\frac {3 x}{8}-\frac {3 \left (\tan ^{3}\left (\frac {x}{2}\right )\right )}{4}+\frac {3 \left (\tan ^{5}\left (\frac {x}{2}\right )\right )}{4}-\frac {5 \left (\tan ^{7}\left (\frac {x}{2}\right )\right )}{4}+\frac {3 x \left (\tan ^{2}\left (\frac {x}{2}\right )\right )}{2}+\frac {9 x \left (\tan ^{4}\left (\frac {x}{2}\right )\right )}{4}+\frac {3 x \left (\tan ^{6}\left (\frac {x}{2}\right )\right )}{2}+\frac {3 x \left (\tan ^{8}\left (\frac {x}{2}\right )\right )}{8}+\frac {5 \tan \left (\frac {x}{2}\right )}{4}}{\left (1+\tan ^{2}\left (\frac {x}{2}\right )\right )^{4}}\) \(82\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Maxima [A]
time = 4.50, size = 16, normalized size = 0.67 \begin {gather*} \frac {3}{8} \, x + \frac {1}{32} \, \sin \left (4 \, x\right ) + \frac {1}{4} \, \sin \left (2 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3/8*x + 1/32*sin(4*x) + 1/4*sin(2*x)

________________________________________________________________________________________

Fricas [A]
time = 1.06, size = 19, normalized size = 0.79 \begin {gather*} \frac {1}{8} \, {\left (2 \, \cos \left (x\right )^{3} + 3 \, \cos \left (x\right )\right )} \sin \left (x\right ) + \frac {3}{8} \, x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]
time = 0.01, size = 24, normalized size = 1.00 \begin {gather*} \frac {3 x}{8} + \frac {\sin {\left (x \right )} \cos ^{3}{\left (x \right )}}{4} + \frac {3 \sin {\left (x \right )} \cos {\left (x \right )}}{8} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cos(x)**4,x)

[Out]

3*x/8 + sin(x)*cos(x)**3/4 + 3*sin(x)*cos(x)/8

________________________________________________________________________________________

Giac [A]
time = 0.46, size = 16, normalized size = 0.67 \begin {gather*} \frac {3}{8} \, x + \frac {1}{32} \, \sin \left (4 \, x\right ) + \frac {1}{4} \, \sin \left (2 \, x\right ) \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

3/8*x + 1/32*sin(4*x) + 1/4*sin(2*x)

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 16, normalized size = 0.67 \begin {gather*} \frac {3\,x}{8}+\frac {\sin \left (2\,x\right )}{4}+\frac {\sin \left (4\,x\right )}{32} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cos(x)^4,x)

[Out]

(3*x)/8 + sin(2*x)/4 + sin(4*x)/32

________________________________________________________________________________________