3.884 \(\int x \sin (x^2) \, dx\)

Optimal. Leaf size=8 \[ -\frac{1}{2} \cos \left (x^2\right ) \]

[Out]

-Cos[x^2]/2

________________________________________________________________________________________

Rubi [A]  time = 0.0062987, antiderivative size = 8, 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 = {3379, 2638} \[ -\frac{1}{2} \cos \left (x^2\right ) \]

Antiderivative was successfully verified.

[In]

Int[x*Sin[x^2],x]

[Out]

-Cos[x^2]/2

Rule 3379

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 2638

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

Rubi steps

\begin{align*} \int x \sin \left (x^2\right ) \, dx &=\frac{1}{2} \operatorname{Subst}\left (\int \sin (x) \, dx,x,x^2\right )\\ &=-\frac{1}{2} \cos \left (x^2\right )\\ \end{align*}

Mathematica [A]  time = 0.0060461, size = 8, normalized size = 1. \[ -\frac{1}{2} \cos \left (x^2\right ) \]

Antiderivative was successfully verified.

[In]

Integrate[x*Sin[x^2],x]

[Out]

-Cos[x^2]/2

________________________________________________________________________________________

Maple [A]  time = 0.002, size = 7, normalized size = 0.9 \begin{align*} -{\frac{\cos \left ({x}^{2} \right ) }{2}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*sin(x^2),x)

[Out]

-1/2*cos(x^2)

________________________________________________________________________________________

Maxima [A]  time = 0.946036, size = 8, normalized size = 1. \begin{align*} -\frac{1}{2} \, \cos \left (x^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x^2),x, algorithm="maxima")

[Out]

-1/2*cos(x^2)

________________________________________________________________________________________

Fricas [A]  time = 2.35517, size = 20, normalized size = 2.5 \begin{align*} -\frac{1}{2} \, \cos \left (x^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x^2),x, algorithm="fricas")

[Out]

-1/2*cos(x^2)

________________________________________________________________________________________

Sympy [A]  time = 0.158996, size = 7, normalized size = 0.88 \begin{align*} - \frac{\cos{\left (x^{2} \right )}}{2} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x**2),x)

[Out]

-cos(x**2)/2

________________________________________________________________________________________

Giac [A]  time = 1.07883, size = 8, normalized size = 1. \begin{align*} -\frac{1}{2} \, \cos \left (x^{2}\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*sin(x^2),x, algorithm="giac")

[Out]

-1/2*cos(x^2)