### 3.22 $$\int x \sin (4 x) \, dx$$

Optimal. Leaf size=18 $\frac{1}{16} \sin (4 x)-\frac{1}{4} x \cos (4 x)$

[Out]

-(x*Cos[4*x])/4 + Sin[4*x]/16

________________________________________________________________________________________

Rubi [A]  time = 0.0096751, antiderivative size = 18, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 6, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.333, Rules used = {3296, 2637} $\frac{1}{16} \sin (4 x)-\frac{1}{4} x \cos (4 x)$

Antiderivative was successfully veriﬁed.

[In]

Int[x*Sin[4*x],x]

[Out]

-(x*Cos[4*x])/4 + Sin[4*x]/16

Rule 3296

Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> -Simp[((c + d*x)^m*Cos[e + f*x])/f, x] +
Dist[(d*m)/f, Int[(c + d*x)^(m - 1)*Cos[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]

Rule 2637

Int[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

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

Mathematica [A]  time = 0.010573, size = 18, normalized size = 1. $\frac{1}{16} \sin (4 x)-\frac{1}{4} x \cos (4 x)$

Antiderivative was successfully veriﬁed.

[In]

Integrate[x*Sin[4*x],x]

[Out]

-(x*Cos[4*x])/4 + Sin[4*x]/16

________________________________________________________________________________________

Maple [A]  time = 0.008, size = 15, normalized size = 0.8 \begin{align*} -{\frac{x\cos \left ( 4\,x \right ) }{4}}+{\frac{\sin \left ( 4\,x \right ) }{16}} \end{align*}

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

[In]

int(x*sin(4*x),x)

[Out]

-1/4*x*cos(4*x)+1/16*sin(4*x)

________________________________________________________________________________________

Maxima [A]  time = 0.948765, size = 19, normalized size = 1.06 \begin{align*} -\frac{1}{4} \, x \cos \left (4 \, x\right ) + \frac{1}{16} \, \sin \left (4 \, x\right ) \end{align*}

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

[In]

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

[Out]

-1/4*x*cos(4*x) + 1/16*sin(4*x)

________________________________________________________________________________________

Fricas [A]  time = 1.94667, size = 45, normalized size = 2.5 \begin{align*} -\frac{1}{4} \, x \cos \left (4 \, x\right ) + \frac{1}{16} \, \sin \left (4 \, x\right ) \end{align*}

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

[In]

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

[Out]

-1/4*x*cos(4*x) + 1/16*sin(4*x)

________________________________________________________________________________________

Sympy [A]  time = 0.167363, size = 14, normalized size = 0.78 \begin{align*} - \frac{x \cos{\left (4 x \right )}}{4} + \frac{\sin{\left (4 x \right )}}{16} \end{align*}

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

[In]

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

[Out]

-x*cos(4*x)/4 + sin(4*x)/16

________________________________________________________________________________________

Giac [A]  time = 1.0504, size = 19, normalized size = 1.06 \begin{align*} -\frac{1}{4} \, x \cos \left (4 \, x\right ) + \frac{1}{16} \, \sin \left (4 \, x\right ) \end{align*}

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

[In]

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

[Out]

-1/4*x*cos(4*x) + 1/16*sin(4*x)