Optimal. Leaf size=14 \[ x \sin (x)+\sin (x)-x \cos (x)+\cos (x) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0214771, antiderivative size = 14, normalized size of antiderivative = 1., number of steps used = 6, number of rules used = 4, integrand size = 7, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.571, Rules used = {14, 3296, 2638, 2637} \[ x \sin (x)+\sin (x)-x \cos (x)+\cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 14
Rule 3296
Rule 2638
Rule 2637
Rubi steps
\begin{align*} \int x (\cos (x)+\sin (x)) \, dx &=\int (x \cos (x)+x \sin (x)) \, dx\\ &=\int x \cos (x) \, dx+\int x \sin (x) \, dx\\ &=-x \cos (x)+x \sin (x)+\int \cos (x) \, dx-\int \sin (x) \, dx\\ &=\cos (x)-x \cos (x)+\sin (x)+x \sin (x)\\ \end{align*}
Mathematica [A] time = 0.0045986, size = 14, normalized size = 1. \[ x \sin (x)+\sin (x)-x \cos (x)+\cos (x) \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.011, size = 15, normalized size = 1.1 \begin{align*} \cos \left ( x \right ) -x\cos \left ( x \right ) +\sin \left ( x \right ) +x\sin \left ( x \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 0.938204, size = 19, normalized size = 1.36 \begin{align*} -x \cos \left (x\right ) + x \sin \left (x\right ) + \cos \left (x\right ) + \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.85592, size = 46, normalized size = 3.29 \begin{align*} -{\left (x - 1\right )} \cos \left (x\right ) +{\left (x + 1\right )} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 0.165906, size = 15, normalized size = 1.07 \begin{align*} x \sin{\left (x \right )} - x \cos{\left (x \right )} + \sin{\left (x \right )} + \cos{\left (x \right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.06894, size = 19, normalized size = 1.36 \begin{align*} -x \cos \left (x\right ) + x \sin \left (x\right ) + \cos \left (x\right ) + \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]