### 3.374 $$\int \sin ^4(x) \, dx$$

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

[Out]

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

________________________________________________________________________________________

Rubi [A]  time = 0.009457, antiderivative size = 24, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 4, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.5, Rules used = {2635, 8} $\frac{3 x}{8}-\frac{1}{4} \sin ^3(x) \cos (x)-\frac{3}{8} \sin (x) \cos (x)$

Antiderivative was successfully veriﬁed.

[In]

Int[Sin[x]^4,x]

[Out]

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

Rule 2635

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] && Integer
Q[2*n]

Rule 8

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

Rubi steps

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

Mathematica [A]  time = 0.0016437, size = 22, normalized size = 0.92 $\frac{3 x}{8}-\frac{1}{4} \sin (2 x)+\frac{1}{32} \sin (4 x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[Sin[x]^4,x]

[Out]

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

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 18, normalized size = 0.8 \begin{align*} -{\frac{\cos \left ( x \right ) }{4} \left ( \left ( \sin \left ( x \right ) \right ) ^{3}+{\frac{3\,\sin \left ( x \right ) }{2}} \right ) }+{\frac{3\,x}{8}} \end{align*}

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

[In]

int(sin(x)^4,x)

[Out]

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

________________________________________________________________________________________

Maxima [A]  time = 0.919824, size = 22, normalized size = 0.92 \begin{align*} \frac{3}{8} \, x + \frac{1}{32} \, \sin \left (4 \, x\right ) - \frac{1}{4} \, \sin \left (2 \, x\right ) \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Fricas [A]  time = 1.92061, size = 59, normalized size = 2.46 \begin{align*} \frac{1}{8} \,{\left (2 \, \cos \left (x\right )^{3} - 5 \, \cos \left (x\right )\right )} \sin \left (x\right ) + \frac{3}{8} \, x \end{align*}

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

[In]

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

[Out]

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

________________________________________________________________________________________

Sympy [A]  time = 0.056392, size = 24, normalized size = 1. \begin{align*} \frac{3 x}{8} - \frac{\sin ^{3}{\left (x \right )} \cos{\left (x \right )}}{4} - \frac{3 \sin{\left (x \right )} \cos{\left (x \right )}}{8} \end{align*}

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

[In]

integrate(sin(x)**4,x)

[Out]

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

________________________________________________________________________________________

Giac [A]  time = 1.06319, size = 22, normalized size = 0.92 \begin{align*} \frac{3}{8} \, x + \frac{1}{32} \, \sin \left (4 \, x\right ) - \frac{1}{4} \, \sin \left (2 \, x\right ) \end{align*}

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

[In]

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

[Out]

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