3.1.22 \(\int x \sin (4 x) \, dx\) [22]

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

[Out]

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

________________________________________________________________________________________

Rubi [A]
time = 0.01, antiderivative size = 18, normalized size of antiderivative = 1.00, 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 = {3377, 2717} \begin {gather*} \frac {1}{16} \sin (4 x)-\frac {1}{4} x \cos (4 x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

Rule 2717

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

Rule 3377

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]

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.01, size = 18, normalized size = 1.00 \begin {gather*} -\frac {1}{4} x \cos (4 x)+\frac {1}{16} \sin (4 x) \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

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

________________________________________________________________________________________

Mathics [A]
time = 1.86, size = 14, normalized size = 0.78 \begin {gather*} -\frac {x \text {Cos}\left [4 x\right ]}{4}+\frac {\text {Sin}\left [4 x\right ]}{16} \end {gather*}

Antiderivative was successfully verified.

[In]

mathics('Integrate[x*Sin[4*x],x]')

[Out]

-x Cos[4 x] / 4 + Sin[4 x] / 16

________________________________________________________________________________________

Maple [A]
time = 0.02, size = 15, normalized size = 0.83

method result size
derivativedivides \(-\frac {x \cos \left (4 x \right )}{4}+\frac {\sin \left (4 x \right )}{16}\) \(15\)
default \(-\frac {x \cos \left (4 x \right )}{4}+\frac {\sin \left (4 x \right )}{16}\) \(15\)
risch \(-\frac {x \cos \left (4 x \right )}{4}+\frac {\sin \left (4 x \right )}{16}\) \(15\)
meijerg \(\frac {\sqrt {\pi }\, \left (-\frac {2 x \cos \left (4 x \right )}{\sqrt {\pi }}+\frac {\sin \left (4 x \right )}{2 \sqrt {\pi }}\right )}{8}\) \(26\)
norman \(\frac {-\frac {x}{4}+\frac {x \left (\tan ^{2}\left (2 x \right )\right )}{4}+\frac {\tan \left (2 x \right )}{8}}{1+\tan ^{2}\left (2 x \right )}\) \(31\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sin(4*x),x,method=_RETURNVERBOSE)

[Out]

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

________________________________________________________________________________________

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

Verification 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 = 0.35, size = 14, normalized size = 0.78 \begin {gather*} -\frac {1}{4} \, x \cos \left (4 \, x\right ) + \frac {1}{16} \, \sin \left (4 \, x\right ) \end {gather*}

Verification 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.07, size = 14, normalized size = 0.78 \begin {gather*} - \frac {x \cos {\left (4 x \right )}}{4} + \frac {\sin {\left (4 x \right )}}{16} \end {gather*}

Verification 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 = 0.00, size = 18, normalized size = 1.00 \begin {gather*} -\frac {4}{16} x \cos \left (4 x\right )+\frac {\sin \left (4 x\right )}{16} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________

Mupad [B]
time = 0.03, size = 14, normalized size = 0.78 \begin {gather*} \frac {\sin \left (4\,x\right )}{16}-\frac {x\,\cos \left (4\,x\right )}{4} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

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

________________________________________________________________________________________